Changeset f7ca587 for irc_channel.c
- Timestamp:
- 2010-07-29T18:18:54Z (14 years ago)
- Branches:
- master
- Children:
- 1521a85
- Parents:
- 2fe5eb9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_channel.c
r2fe5eb9 rf7ca587 481 481 { 482 482 irc_t *irc = ic->irc; 483 irc_user_t *iu; 483 484 const char *s; 484 485 … … 489 490 { 490 491 char to[s-msg+1]; 491 irc_user_t *iu;492 492 493 493 memset( to, 0, sizeof( to ) ); 494 494 strncpy( to, msg, s - msg ); 495 495 while( *(++s) && isspace( *s ) ) {} 496 497 iu = irc_user_by_name( irc, to ); 498 if( iu && iu->f->privmsg ) 499 { 500 iu->last_channel = ic; 501 iu->f->privmsg( iu, s ); 502 } 496 msg = s; 497 498 if( !( iu = irc_user_by_name( irc, to ) ) ) 499 irc_channel_printf( ic, "User does not exist: %s", to ); 503 500 else 504 { 505 irc_channel_printf( ic, "User does not exist: %s", to ); 506 } 507 } 501 ic->last_target = iu; 502 } 503 else if( g_strcasecmp( set_getstr( &irc->b->set, "default_target" ), "last" ) == 0 && 504 ic->last_target && g_slist_find( irc->users, ic->last_target ) ) 505 iu = ic->last_target; 508 506 else 509 { 510 /* TODO: Maybe just use root->privmsg here now? */ 511 char cmd[strlen(msg)+1]; 512 513 g_free( ic->irc->last_root_cmd ); 514 ic->irc->last_root_cmd = g_strdup( ic->name ); 515 516 strcpy( cmd, msg ); 517 root_command_string( ic->irc, cmd ); 507 iu = irc->root; 508 509 if( iu && iu->f->privmsg ) 510 { 511 iu->last_channel = ic; 512 iu->f->privmsg( iu, msg ); 518 513 } 519 514
Note: See TracChangeset
for help on using the changeset viewer.