summaryrefslogtreecommitdiff
path: root/modules/pseudoclients
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pseudoclients')
-rw-r--r--modules/pseudoclients/botserv.cpp9
-rw-r--r--modules/pseudoclients/nickserv.cpp4
-rw-r--r--modules/pseudoclients/operserv.cpp10
3 files changed, 9 insertions, 14 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp
index 6f9046957..3d4bf33f2 100644
--- a/modules/pseudoclients/botserv.cpp
+++ b/modules/pseudoclients/botserv.cpp
@@ -150,14 +150,11 @@ class BotServCore : public Module
if (MOD_RESULT == EVENT_STOP)
return;
- Reference<User> user_reference(u);
Reference<NickCore> nc_reference(u->Account());
cmd->Execute(source, params);
-
- if (user_reference && nc_reference)
- {
- FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, cmd, params));
- }
+ if (!nc_reference)
+ source.nc = NULL;
+ FOREACH_MOD(I_OnPostCommand, OnPostCommand(source, cmd, params));
}
void OnJoinChannel(User *user, Channel *c) anope_override
diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp
index 9e15667f5..b48f2f0f4 100644
--- a/modules/pseudoclients/nickserv.cpp
+++ b/modules/pseudoclients/nickserv.cpp
@@ -303,9 +303,9 @@ class NickServCore : public Module
}
}
- void OnUserConnect(Reference<User> &u, bool &exempt) anope_override
+ void OnUserConnect(User *u, bool &exempt) anope_override
{
- if (!u || !u->server->IsSynced())
+ if (u->Quitting() || !u->server->IsSynced())
return;
const NickAlias *na = NickAlias::Find(u->nick);
diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp
index 02ec216f4..7fd11b73d 100644
--- a/modules/pseudoclients/operserv.cpp
+++ b/modules/pseudoclients/operserv.cpp
@@ -237,9 +237,9 @@ class OperServCore : public Module
Log(u, "oper", OperServ) << "is no longer an IRC operator";
}
- void OnUserConnect(Reference<User> &u, bool &exempt) anope_override
+ void OnUserConnect(User *u, bool &exempt) anope_override
{
- if (u && !exempt)
+ if (!u->Quitting() && !exempt)
XLineManager::CheckAll(u);
}
@@ -249,11 +249,9 @@ class OperServCore : public Module
this->sqlines.CheckAllXLines(u);
}
- EventReturn OnCheckKick(User *u, ChannelInfo *ci, bool &kick) anope_override
+ EventReturn OnCheckKick(User *u, ChannelInfo *ci, Anope::string &mask, Anope::string &reason) anope_override
{
- if (this->sqlines.CheckChannel(ci->c))
- kick = true;
- return EVENT_CONTINUE;
+ return this->sqlines.CheckChannel(ci->c) ? EVENT_STOP : EVENT_CONTINUE;
}
EventReturn OnPreHelp(CommandSource &source, const std::vector<Anope::string> &params) anope_override