Mercurial > hg
changeset 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 | 87165382e4ce |
files | mcabber/src/commands.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/commands.c Fri Nov 25 23:44:47 2005 +0100 +++ b/mcabber/src/commands.c Fri Nov 25 23:48:49 2005 +0100 @@ -544,6 +544,15 @@ jid = buddy_getjid(BUDDATA(current_buddy)); if (!jid) return; + if (buddy_gettype(BUDDATA(current_buddy)) & ROSTER_TYPE_ROOM) { + // This is a chatroom + // If there are resources, we haven't left + if (buddy_isresource(BUDDATA(current_buddy))) { + scr_LogPrint(LPRINT_NORMAL, "You haven't left this room!"); + return; + } + } + scr_LogPrint(LPRINT_LOGNORM, "Removing <%s>...", jid); jb_delbuddy(jid); }