aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--irc_im.c20
-rw-r--r--protocols/jabber/jabber.c4
-rw-r--r--protocols/twitter/twitter.c12
3 files changed, 22 insertions, 14 deletions
diff --git a/irc_im.c b/irc_im.c
index 074d8d2c..15c5783d 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -512,6 +512,26 @@ static gboolean bee_irc_user_ctcp( irc_user_t *iu, char *const *ctcp )
return TRUE;
}
}
+ else if( g_strcasecmp( ctcp[0], "HELP" ) == 0 && iu->bu )
+ {
+ GString *supp = g_string_new( "Supported CTCPs:" );
+ GList *l;
+
+ if( iu->bu->ic && iu->bu->ic->acc->prpl->transfer_request )
+ g_string_append( supp, " DCC SEND," );
+ if( iu->bu->ic && iu->bu->ic->acc->prpl->send_typing )
+ g_string_append( supp, " TYPING," );
+ if( iu->bu->ic->acc->prpl->buddy_action_list )
+ for( l = iu->bu->ic->acc->prpl->buddy_action_list( iu->bu ); l; l = l->next )
+ {
+ struct buddy_action *ba = l->data;
+ g_string_append_printf( supp, " %s (%s),",
+ ba->name, ba->description );
+ }
+ g_string_truncate( supp, supp->len - 1 );
+ irc_send_msg_f( iu, "NOTICE", iu->irc->user->nick, "\001HELP %s\001", supp->str );
+ g_string_free( supp, TRUE );
+ }
else if( iu->bu && iu->bu->ic && iu->bu->ic->acc->prpl->buddy_action )
{
iu->bu->ic->acc->prpl->buddy_action( iu->bu, ctcp[0], ctcp + 1, NULL );
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index e5bc3c14..802158c1 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -569,11 +569,11 @@ GList *jabber_buddy_action_list( bee_user_t *bu )
if( ret == NULL )
{
- struct buddy_action ba[2] = {
+ static const struct buddy_action ba[2] = {
{ "VERSION", "Get client (version) information" },
};
- ret = g_list_prepend( ret, ba + 0 );
+ ret = g_list_prepend( ret, (void*) ba + 0 );
}
return ret;
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index 2f28f746..286d6c3c 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -376,11 +376,6 @@ static void twitter_chat_leave( struct groupchat *c )
td->home_timeline_gc = NULL;
}
-static struct groupchat *twitter_chat_with( struct im_connection *ic, char *who )
-{
- return NULL;
-}
-
static void twitter_keepalive( struct im_connection *ic )
{
}
@@ -401,11 +396,6 @@ static void twitter_rem_deny( struct im_connection *ic, char *who )
{
}
-static int twitter_send_typing( struct im_connection *ic, char *who, int typing )
-{
- return( 1 );
-}
-
//static char *twitter_set_display_name( set_t *set, char *value )
//{
// return value;
@@ -551,13 +541,11 @@ void twitter_initmodule()
ret->chat_msg = twitter_chat_msg;
ret->chat_invite = twitter_chat_invite;
ret->chat_leave = twitter_chat_leave;
- ret->chat_with = twitter_chat_with;
ret->keepalive = twitter_keepalive;
ret->add_permit = twitter_add_permit;
ret->rem_permit = twitter_rem_permit;
ret->add_deny = twitter_add_deny;
ret->rem_deny = twitter_rem_deny;
- ret->send_typing = twitter_send_typing;
ret->buddy_data_add = twitter_buddy_data_add;
ret->buddy_data_free = twitter_buddy_data_free;
ret->handle_cmp = g_strcasecmp;