From dae8024a466a0a90f03222d31e34555b9b612509 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 4 Apr 2004 21:30:41 +0000 Subject: Completed support for module-handled umodes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@377 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 4a9ada90d..857e2f1d6 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -69,14 +69,18 @@ void userrec::InviteTo(char* channel) void userrec::RemoveInvite(char* channel) { - for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) - { - if (i->channel) { - if (!strcasecmp(i->channel,channel)) - { - invites.erase(i); - return; - } - } + log(DEBUG,"Removing invites"); + if (invites.size()) + { + for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) + { + if (i->channel) { + if (!strcasecmp(i->channel,channel)) + { + invites.erase(i); + return; + } + } + } } } -- cgit v1.3.1-10-gc9f91