aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-06-03 23:17:11 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-06-03 23:17:11 +0100
commit4469e7ecb15f57151452c59040360a483e4f5ee9 (patch)
tree03e5df6f2dd30b2eda66f83126cbe34b1527827c /irc_im.c
parent7b71feb6f88b7e14199b8f7e9930f76d5324e356 (diff)
Support for the /topic command.
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/irc_im.c b/irc_im.c
index 6e257b03..bdfbc597 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -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 )