aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-07 22:38:56 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-07 22:38:56 +0100
commit91cec2ff02f956ec248dae6c8b8939f263ff8cfd (patch)
tree62d2c4c9e714ee1bee97f4b59f48b4af673ca48d
parent123cac724c5907365e0c4bd939806cc240e764f0 (diff)
It'd be nice to not crash when the user goes away. :-)
Don't export no-op set_away() funcs/etc and make nogaim detect that and give up in time.
-rw-r--r--protocols/nogaim.c4
-rw-r--r--protocols/twitter/twitter.c12
2 files changed, 4 insertions, 12 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index 0c2094e2..53e459b5 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -1207,6 +1207,10 @@ int imc_away_send_update( struct im_connection *ic )
{
char *away, *msg = NULL;
+ if( ic->acc->prpl->away_states == NULL ||
+ ic->acc->prpl->set_away == NULL )
+ return 0;
+
away = set_getstr( &ic->acc->set, "away" ) ?
: set_getstr( &ic->irc->set, "away" );
if( away && *away )
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c
index f62aeada..812e0796 100644
--- a/protocols/twitter/twitter.c
+++ b/protocols/twitter/twitter.c
@@ -126,16 +126,6 @@ static int twitter_buddy_msg( struct im_connection *ic, char *who, char *message
/**
*
*/
-static GList *twitter_away_states( struct im_connection *ic )
-{
- static GList *l = NULL;
- return l;
-}
-
-static void twitter_set_away( struct im_connection *ic, char *state, char *message )
-{
-}
-
static void twitter_set_my_name( struct im_connection *ic, char *info )
{
}
@@ -210,8 +200,6 @@ void twitter_initmodule()
ret->init = twitter_init;
ret->logout = twitter_logout;
ret->buddy_msg = twitter_buddy_msg;
- ret->away_states = twitter_away_states;
- ret->set_away = twitter_set_away;
ret->get_info = twitter_get_info;
ret->set_my_name = twitter_set_my_name;
ret->add_buddy = twitter_add_buddy;