aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-05-20 13:48:08 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-05-20 13:48:08 +0200
commitc53911ec23848d13cbbaa10286895d874abd0b08 (patch)
tree4b6f04ae2bfebef8756d8bbe6a25fea1cd1cad3a /protocols/nogaim.c
parent881fd4e3a6d6405e982239e8b315069b724a1d22 (diff)
Fixed a string handling mistake and better stripping of servernames used
in user_t structures.
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r--protocols/nogaim.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index eee104c4..568afe33 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -482,7 +482,14 @@ void add_buddy( struct gaim_connection *gc, char *group, char *handle, char *rea
}
else if( gc->user->proto_opt[0] && *gc->user->proto_opt[0] )
{
- u->host = g_strdup( gc->user->proto_opt[0] );
+ char *colon;
+
+ if( ( colon = strchr( gc->user->proto_opt[0], ':' ) ) )
+ u->host = g_strndup( gc->user->proto_opt[0],
+ colon - gc->user->proto_opt[0] );
+ else
+ u->host = g_strdup( gc->user->proto_opt[0] );
+
u->user = g_strdup( handle );
/* s/ /_/ ... important for AOL screennames */