comparison mcabber/src/commands.c @ 164:faf534be8ff0

[/trunk] Changeset 176 by mikael * Add roster_free() * Empty roster when disconnecting from the server / going offline * Don't display buddies status when we're offline * Fix a bug when the roster is empty and we try to send a message (commands.c)
author mikael
date Mon, 02 May 2005 20:31:01 +0000
parents 6531bcf030ae
children aa5b635520ef
comparison
equal deleted inserted replaced
163:a8f7dc0a56cb 164:faf534be8ff0
317 update_roster = TRUE; 317 update_roster = TRUE;
318 } 318 }
319 319
320 void do_say(char *arg) 320 void do_say(char *arg)
321 { 321 {
322 gpointer bud = BUDDATA(current_buddy); 322 gpointer bud;
323 323
324 scr_set_chatmode(TRUE); 324 scr_set_chatmode(TRUE);
325 if (current_buddy) { 325
326 if (!(buddy_gettype(bud) & ROSTER_TYPE_USER)) { 326 if (!current_buddy) {
327 scr_LogPrint("This is not a user");
328 return;
329 }
330 buddy_setflags(bud, ROSTER_FLAG_LOCK, TRUE);
331 send_message(arg);
332 } else {
333 scr_LogPrint("Who are you talking to??"); 327 scr_LogPrint("Who are you talking to??");
334 } 328 return;
335 } 329 }
336 330
331 bud = BUDDATA(current_buddy);
332 if (!(buddy_gettype(bud) & ROSTER_TYPE_USER)) {
333 scr_LogPrint("This is not a user");
334 return;
335 }
336
337 buddy_setflags(bud, ROSTER_FLAG_LOCK, TRUE);
338 send_message(arg);
339 }
340