Changeset bce78c8
- Timestamp:
- 2010-05-02T18:48:26Z (15 years ago)
- Branches:
- master
- Children:
- e54112f
- Parents:
- a4cdf43
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_channel.c
ra4cdf43 rbce78c8 145 145 static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg ) 146 146 { 147 char cmd[strlen(msg)+1]; 147 irc_t *irc = ic->irc; 148 const char *s; 148 149 149 g_free( ic->irc->last_root_cmd );150 ic->irc->last_root_cmd = g_strdup( ic->name );150 /* Scan for non-whitespace chars followed by a colon: */ 151 for( s = msg; *s && !isspace( *s ) && *s != ':'; s ++ ) {} 151 152 152 strcpy( cmd, msg ); 153 root_command_string( ic->irc, cmd ); 153 if( *s == ':' ) 154 { 155 char to[s-msg+1]; 156 irc_user_t *iu; 157 158 strncpy( to, msg, s - msg ); 159 while( *(++s) && isspace( *s ) ) {} 160 161 iu = irc_user_by_name( irc, to ); 162 if( iu && iu->f->privmsg ) 163 { 164 iu->flags &= ~IRC_USER_PRIVATE; 165 iu->f->privmsg( iu, s ); 166 } 167 } 168 else 169 { 170 /* TODO: Maybe just use root->privmsg here now? */ 171 char cmd[strlen(msg)+1]; 172 173 g_free( ic->irc->last_root_cmd ); 174 ic->irc->last_root_cmd = g_strdup( ic->name ); 175 176 strcpy( cmd, msg ); 177 root_command_string( ic->irc, cmd ); 178 } 154 179 155 180 return TRUE; -
irc_commands.c
ra4cdf43 rbce78c8 288 288 } 289 289 else if( iu->f->privmsg ) 290 { 291 iu->flags |= IRC_USER_PRIVATE; 290 292 iu->f->privmsg( iu, cmd[2] ); 293 } 291 294 } 292 295 else -
irc_im.c
ra4cdf43 rbce78c8 126 126 { 127 127 dst = ic->name; 128 prefix = g_strdup_printf( "%s%s%s", irc->user->nick, set_getstr( &bee->set, "to_char" ), ts );128 prefix = g_strdup_printf( "%s%s%s", irc->user->nick, set_getstr( &bee->set, "to_char" ), ts ? : "" ); 129 129 } 130 130
Note: See TracChangeset
for help on using the changeset viewer.