diff options
-rw-r--r-- | bitlbee.c | 2 | ||||
-rw-r--r-- | protocols/jabber/iq.c | 3 | ||||
-rw-r--r-- | protocols/nogaim.c | 5 |
3 files changed, 4 insertions, 6 deletions
@@ -124,7 +124,7 @@ int bitlbee_daemon_init() else if( i != 0 ) exit( 0 ); - chdir( "/" ); +// chdir( "/" ); /* Sometimes std* are already closed (for example when we're in a RESTARTed BitlBee process. So let's only close TTY-fds. */ diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c index 62e6a183..0050fb5b 100644 --- a/protocols/jabber/iq.c +++ b/protocols/jabber/iq.c @@ -373,10 +373,7 @@ static xt_status jabber_parse_roster( struct im_connection *ic, struct xt_node * group->text : NULL ); if( name ) - { imcb_rename_buddy( ic, jid, name ); - imcb_buddy_nick_hint( ic, jid, name ); - } } else if( strcmp( sub, "remove" ) == 0 ) { diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 71cebacd..06bd8e4b 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -448,13 +448,14 @@ void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick ) user_t *u = user_findhandle( ic, handle ); char newnick[MAX_NICK_LENGTH+1]; - if( !u->online && !nick_saved( ic->acc, handle ) ) + if( u && !u->online && !nick_saved( ic->acc, handle ) ) { /* Only do this if the person isn't online yet (which should be the case if we just added it) and if the user hasn't assigned a nickname to this buddy already. */ - strcpy( newnick, nick ); + strncpy( newnick, nick, MAX_NICK_LENGTH ); + newnick[MAX_NICK_LENGTH] = 0; /* Some processing to make sure this string is a valid IRC nickname. */ nick_strip( newnick ); |