From 0ae832406f989194761528a1b8d49aa115c7fb3b Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 1 Apr 2004 20:21:06 +0000 Subject: Fixed tags Stability fixes/bounds checks UDP tunneling working for server->server git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@350 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index b179fabdd..4a9ada90d 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -50,11 +50,14 @@ bool userrec::IsInvited(char* channel) { for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) { - if (!strcasecmp(i->channel,channel)) - { - return true; + if (i->channel) { + if (!strcasecmp(i->channel,channel)) + { + return true; + } } } + return false; } void userrec::InviteTo(char* channel) @@ -68,10 +71,12 @@ void userrec::RemoveInvite(char* channel) { for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) { - if (!strcasecmp(i->channel,channel)) - { - invites.erase(i); - return; + if (i->channel) { + if (!strcasecmp(i->channel,channel)) + { + invites.erase(i); + return; + } } } } -- cgit v1.3.1-10-gc9f91