Mercurial > hg
comparison mcabber/src/commands.c @ 540:887c1bd37617
Prevent deletion from rooms we haven't left
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 25 Nov 2005 23:48:49 +0100 |
parents | ffdfddd351b8 |
children | 448e299e45da |
comparison
equal
deleted
inserted
replaced
539:ffdfddd351b8 | 540:887c1bd37617 |
---|---|
542 | 542 |
543 if (!current_buddy) return; | 543 if (!current_buddy) return; |
544 jid = buddy_getjid(BUDDATA(current_buddy)); | 544 jid = buddy_getjid(BUDDATA(current_buddy)); |
545 if (!jid) return; | 545 if (!jid) return; |
546 | 546 |
547 if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_ROOM) { | |
548 // This is a chatroom | |
549 // If there are resources, we haven't left | |
550 if (buddy_isresource(BUDDATA(current_buddy))) { | |
551 scr_LogPrint(LPRINT_NORMAL, "You haven't left this room!"); | |
552 return; | |
553 } | |
554 } | |
555 | |
547 scr_LogPrint(LPRINT_LOGNORM, "Removing <%s>...", jid); | 556 scr_LogPrint(LPRINT_LOGNORM, "Removing <%s>...", jid); |
548 jb_delbuddy(jid); | 557 jb_delbuddy(jid); |
549 } | 558 } |
550 | 559 |
551 static void do_group(char *arg) | 560 static void do_group(char *arg) |