From 998d526600b866b26bf2d865f21716b5a7eb6c71 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 9 Apr 2004 10:50:26 +0000 Subject: Added flood= value to connect allow classes, added checking for flooding git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@462 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 4c7173e30..eb4954897 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -23,7 +23,7 @@ userrec::userrec() strcpy(server,""); strcpy(awaymsg,""); fd = lastping = signon = idle_lastmsg = nping = registered = 0; - port = bytes_in = bytes_out = cmds_in = cmds_out = 0; + flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; haspassed = false; strcpy(result,""); for (int i = 0; i < MAXCHANS; i++) @@ -72,17 +72,21 @@ void userrec::InviteTo(char* channel) void userrec::RemoveInvite(char* channel) { log(DEBUG,"Removing invites"); - if (invites.size()) + if (channel) { - for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) - { - if (i->channel) { - if (!strcasecmp(i->channel,channel)) + if (invites.size()) + { + for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) + { + if (i->channel) { - invites.erase(i); - return; - } - } + if (!strcasecmp(i->channel,channel)) + { + invites.erase(i); + return; + } + } + } } } } -- cgit v1.3.1-10-gc9f91