diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
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; + } + } + } } } |