summaryrefslogtreecommitdiff
path: root/src/actions.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-22 00:50:33 -0500
committerAdam <Adam@anope.org>2012-11-22 00:50:33 -0500
commitd33a0f75a5c0c584fbb7cc0076da36d494f39494 (patch)
tree7b2274cc833c793c0f5595660cbd4d715de52ffd /src/actions.cpp
parent368d469631763e9c8bf399980d0ac7c5b5664d39 (diff)
Pretty large coding style cleanup, in source doc
cleanup, and allow protocol mods to depend on each other
Diffstat (limited to 'src/actions.cpp')
-rw-r--r--src/actions.cpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
deleted file mode 100644
index 512a0fa52..000000000
--- a/src/actions.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Various routines to perform simple actions.
- *
- * (C) 2003-2012 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- */
-
-#include "services.h"
-#include "users.h"
-#include "config.h"
-#include "regchannel.h"
-#include "channels.h"
-#include "extern.h"
-
-/*************************************************************************/
-
-/**
- * Note a bad password attempt for the given user. If they've used up
- * their limit, toss them off.
- * @param u the User to check
- * @return true if the user was killed, otherwise false
- */
-bool bad_password(User *u)
-{
- if (!u || !Config->BadPassLimit)
- return false;
-
- if (Config->BadPassTimeout > 0 && u->invalid_pw_time > 0 && u->invalid_pw_time < Anope::CurTime - Config->BadPassTimeout)
- u->invalid_pw_count = 0;
- ++u->invalid_pw_count;
- u->invalid_pw_time = Anope::CurTime;
- if (u->invalid_pw_count >= Config->BadPassLimit)
- {
- u->Kill(Config->ServerName, "Too many invalid passwords");
- return true;
- }
-
- return false;
-}
-
-/*************************************************************************/
-
-
-/**
- * Unban the user from a channel
- * @param ci channel info for the channel
- * @param u The user to unban
- * @param full True to match against the users real host and IP
- * @return void
- */
-void common_unban(const ChannelInfo *ci, User *u, bool full)
-{
- if (!u || !ci || !ci->c || !ci->c->HasMode(CMODE_BAN))
- return;
-
- std::pair<Channel::ModeList::iterator, Channel::ModeList::iterator> bans = ci->c->GetModeList(CMODE_BAN);
- for (; bans.first != bans.second;)
- {
- Entry ban(CMODE_BAN, bans.first->second);
- ++bans.first;
- if (ban.Matches(u, full))
- ci->c->RemoveMode(NULL, CMODE_BAN, ban.GetMask());
- }
-}
-
-/*************************************************************************/