diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-03 23:17:11 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-03 23:17:11 +0100 |
commit | 4469e7ecb15f57151452c59040360a483e4f5ee9 (patch) | |
tree | 03e5df6f2dd30b2eda66f83126cbe34b1527827c /irc_im.c | |
parent | 7b71feb6f88b7e14199b8f7e9930f76d5324e356 (diff) |
Support for the /topic command.
Diffstat (limited to 'irc_im.c')
-rw-r--r-- | irc_im.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -476,7 +476,18 @@ static gboolean bee_irc_channel_chat_part( irc_channel_t *ic, const char *msg ) static gboolean bee_irc_channel_chat_topic( irc_channel_t *ic, const char *new ) { - return TRUE; + struct groupchat *c = ic->data; + char *topic = g_strdup( new ); /* TODO: Need more const goodness here, sigh */ + + if( c->ic->acc->prpl->chat_topic == NULL ) + irc_send_num( ic->irc, 482, "%s :IM network does not support channel topics", ic->name ); + else + { + c->ic->acc->prpl->chat_topic( c, topic ); + return TRUE; + } + + return FALSE; } static gboolean bee_irc_channel_chat_invite( irc_channel_t *ic, irc_user_t *iu ) |