Changeset 9779c18 for irc_commands.c
- Timestamp:
- 2006-06-03T20:20:43Z (18 years ago)
- Branches:
- master
- Children:
- 5973412
- Parents:
- a15c097 (diff), fb62f81f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_commands.c
ra15c097 r9779c18 177 177 if( !u->gc->prpl->chat_open( u->gc, u->handle ) ) 178 178 { 179 irc_usermsg( irc, "Could not open a groupchat with %s , maybe you don't have a connection to him/her yet?", u->nick );179 irc_usermsg( irc, "Could not open a groupchat with %s.", u->nick ); 180 180 } 181 181 } … … 321 321 { 322 322 user_t *u; 323 char buff[IRC_MAX_LINE] ;323 char buff[IRC_MAX_LINE], *s; 324 324 int lenleft, i; 325 325 … … 331 331 for( i = 1; cmd[i]; i ++ ) 332 332 { 333 if( ( u = user_find( irc, cmd[i] ) ) && u->online ) 334 { 335 /* [SH] Make sure we don't use too much buffer space. */ 336 lenleft -= strlen( u->nick ) + 1; 337 338 if( lenleft < 0 ) 333 char *this, *next; 334 335 this = cmd[i]; 336 while( *this ) 337 { 338 if( ( next = strchr( this, ' ' ) ) ) 339 *next = 0; 340 341 if( ( u = user_find( irc, this ) ) && u->online ) 342 { 343 lenleft -= strlen( u->nick ) + 1; 344 345 if( lenleft < 0 ) 346 break; 347 348 strcat( buff, u->nick ); 349 strcat( buff, " " ); 350 } 351 352 if( next ) 353 { 354 *next = ' '; 355 this = next + 1; 356 } 357 else 339 358 { 340 359 break; 341 } 342 343 /* [SH] Add the nick to the buffer. Note 344 * that an extra space is always added. Even 345 * if it's the last nick in the list. Who 346 * cares? 347 */ 348 349 strcat( buff, u->nick ); 350 strcat( buff, " " ); 351 } 352 } 353 354 /* [WvG] Well, maybe someone cares, so why not remove it? */ 360 } 361 } 362 363 /* *sigh* */ 364 if( lenleft < 0 ) 365 break; 366 } 367 355 368 if( strlen( buff ) > 0 ) 356 369 buff[strlen(buff)-1] = '\0'; … … 385 398 386 399 if( u && u->online ) 387 irc_reply( irc, 604, "%s %s %s %d :%s", u->nick, u->user, u->host, time( NULL ), "is online" );400 irc_reply( irc, 604, "%s %s %s %d :%s", u->nick, u->user, u->host, (int) time( NULL ), "is online" ); 388 401 else 389 irc_reply( irc, 605, "%s %s %s %d :%s", nick, "*", "*", time( NULL ), "is offline" );402 irc_reply( irc, 605, "%s %s %s %d :%s", nick, "*", "*", (int) time( NULL ), "is offline" ); 390 403 } 391 404 else if( cmd[i][0] == '-' ) … … 448 461 449 462 if( gc && gc->flags & OPT_LOGGED_IN ) 450 proto_away( gc, u->away );463 bim_set_away( gc, u->away ); 451 464 } 452 465 }
Note: See TracChangeset
for help on using the changeset viewer.