summaryrefslogtreecommitdiff
path: root/src/regchannel.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-07-14 02:31:12 -0400
committerAdam <Adam@anope.org>2011-07-14 02:31:12 -0400
commitf858164deed48f2dcacd5ffc06a55398a54da7e8 (patch)
tree89c3cf36bd8e94942370135218d67d6d17ee222e /src/regchannel.cpp
parent924f6849fee4598a1a3a7f1a98d96b79e5ffd3b4 (diff)
Rewrote how commands are handled within Anope.
This allows naming commands and having spaces within command names.
Diffstat (limited to 'src/regchannel.cpp')
-rw-r--r--src/regchannel.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index cf2cb42df..131fdf29c 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -11,8 +11,6 @@
#include "services.h"
#include "modules.h"
-#include "chanserv.h"
-#include "nickserv.h"
ChanAccess::ChanAccess(const Anope::string &umask)
{
@@ -193,9 +191,14 @@ NickCore *ChannelInfo::GetFounder() const
*/
BotInfo *ChannelInfo::WhoSends()
{
- if (!this || !this->bi || !this->c || !this->botflags.HasFlag(BS_SYMBIOSIS) || !this->c->FindUser(this->bi))
- return chanserv ? chanserv->Bot() : (nickserv ? nickserv->Bot() : NULL);
- return this->bi;
+ if (this && this->bi)
+ return this->bi;
+ BotInfo *bi = findbot(Config->ChanServ);
+ if (bi)
+ return bi;
+ else if (!BotListByNick.empty())
+ return BotListByNick.begin()->second;
+ return NULL;
}
/** Add an entry to the channel access list
@@ -786,8 +789,11 @@ bool ChannelInfo::CheckKick(User *user)
return false;
bool set_modes = false, do_kick = false;
- if (ircd->chansqline && SQLineManager::Check(this->c))
- do_kick = true;
+
+ EventReturn MOD_RESULT;
+ FOREACH_MOD(I_OnCheckKick, OnCheckKick(user, this, do_kick));
+ if (MOD_RESULT == EVENT_ALLOW)
+ return false;
Anope::string mask, reason;
if (!user->HasMode(UMODE_OPER) && this->HasFlag(CI_SUSPENDED))