summaryrefslogtreecommitdiff
path: root/src/chanserv.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/chanserv.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/chanserv.cpp')
-rw-r--r--src/chanserv.cpp105
1 files changed, 0 insertions, 105 deletions
diff --git a/src/chanserv.cpp b/src/chanserv.cpp
deleted file mode 100644
index 4456ce37c..000000000
--- a/src/chanserv.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/* ChanServ functions.
- *
- * (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 "anope.h"
-#include "regchannel.h"
-#include "users.h"
-#include "channels.h"
-#include "access.h"
-#include "account.h"
-
-ChannelInfo* cs_findchan(const Anope::string &chan)
-{
- registered_channel_map::const_iterator it = RegisteredChannelList->find(chan);
- if (it != RegisteredChannelList->end())
- {
- it->second->QueueUpdate();
- return it->second;
- }
-
- return NULL;
-}
-
-/*************************************************************************/
-
-/** Is the user the real founder?
- * @param user The user
- * @param ci The channel
- * @return true or false
- */
-bool IsFounder(const User *user, const ChannelInfo *ci)
-{
- if (!user || !ci)
- return false;
-
- if (user->SuperAdmin)
- return true;
-
- if (user->Account() && user->Account() == ci->GetFounder())
- return true;
-
- return false;
-}
-
-/*************************************************************************/
-
-void update_cs_lastseen(User *user, ChannelInfo *ci)
-{
- if (!ci || !user)
- return;
-
- AccessGroup u_access = ci->AccessFor(user);
- for (unsigned i = u_access.size(); i > 0; --i)
- u_access[i - 1]->last_seen = Anope::CurTime;
-}
-
-/*************************************************************************/
-
-/* Returns the best ban possible for a user depending of the bantype
- value. */
-
-int get_idealban(const ChannelInfo *ci, User *u, Anope::string &ret)
-{
- Anope::string mask;
-
- if (!ci || !u)
- return 0;
-
- Anope::string vident = u->GetIdent();
-
- switch (ci->bantype)
- {
- case 0:
- ret = "*!" + vident + "@" + u->GetDisplayedHost();
- return 1;
- case 1:
- if (vident[0] == '~')
- ret = "*!*" + vident + "@" + u->GetDisplayedHost();
- else
- ret = "*!" + vident + "@" + u->GetDisplayedHost();
-
- return 1;
- case 2:
- ret = "*!*@" + u->GetDisplayedHost();
- return 1;
- case 3:
- mask = create_mask(u);
- ret = "*!" + mask;
- return 1;
-
- default:
- return 0;
- }
-}
-