- Timestamp:
- 2010-05-08T12:37:49Z (14 years ago)
- Branches:
- master
- Children:
- 9e27f18
- Parents:
- bfb99ee
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_im.c
rbfb99ee rd343eaa 338 338 } 339 339 340 static gboolean bee_irc_chat_name_hint( bee_t *bee, struct groupchat *c, const char *name ) 341 { 342 irc_t *irc = bee->ui_data; 343 irc_channel_t *ic = c->ui_data; 344 char stripped[MAX_NICK_LENGTH+1], *full_name; 345 346 /* Don't rename a channel if the user's in it already. */ 347 if( ic->flags & IRC_CHANNEL_JOINED ) 348 return FALSE; 349 350 strncpy( stripped, name, MAX_NICK_LENGTH ); 351 stripped[MAX_NICK_LENGTH] = '\0'; 352 nick_strip( stripped ); 353 if( set_getbool( &bee->set, "lcnicks" ) ) 354 nick_lc( stripped ); 355 356 full_name = g_strdup_printf( "&%s", stripped ); 357 358 if( stripped[0] && irc_channel_by_name( irc, full_name ) == NULL ) 359 { 360 g_free( ic->name ); 361 ic->name = full_name; 362 } 363 else 364 { 365 g_free( full_name ); 366 } 367 368 return TRUE; 369 } 370 340 371 /* IRC->IM */ 341 372 static gboolean bee_irc_channel_chat_privmsg( irc_channel_t *ic, const char *msg ) … … 362 393 static const struct irc_channel_funcs irc_channel_im_chat_funcs = { 363 394 bee_irc_channel_chat_privmsg, 364 NULL, 395 NULL, /* join */ 365 396 bee_irc_channel_chat_part, 397 NULL, /* topic */ 366 398 }; 367 399 … … 407 439 bee_irc_chat_add_user, 408 440 bee_irc_chat_remove_user, 441 bee_irc_chat_name_hint, 409 442 410 443 bee_irc_ft_in_start,
Note: See TracChangeset
for help on using the changeset viewer.