diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-09 10:50:26 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-09 10:50:26 +0000 |
commit | 998d526600b866b26bf2d865f21716b5a7eb6c71 (patch) | |
tree | 52ddfd2ac3884e18aeae60dc1e21cd34e25d25dc /src/users.cpp | |
parent | 87faee0b4cdb984d3b899b0a9e5538018e56a739 (diff) |
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
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
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; + } + } + } } } } |