aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-06-04 14:36:51 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2007-06-04 14:36:51 +0100
commite0e2a71ed3e7937ed5da85af95be016a8441547b (patch)
tree67cdfc8d9b8cb87f247f463499f2831414dc5032
parentd06eabf19ec3f849d8bab22c13d43e4eba9a48ee (diff)
Fixed retarded use of strcpy() and no longer using Jabber fullnames for
nickname generation. IM fullnames and IRC nicknames are just *different*.
-rw-r--r--bitlbee.c2
-rw-r--r--protocols/jabber/iq.c3
-rw-r--r--protocols/nogaim.c5
3 files changed, 4 insertions, 6 deletions
diff --git a/bitlbee.c b/bitlbee.c
index 6a3625ee..c4a2da1e 100644
--- a/bitlbee.c
+++ b/bitlbee.c
@@ -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 );