summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-20 16:20:19 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-20 16:20:19 +0200
commit1442193c79016ea60a8a6e7df66f758040b77c76 (patch)
treefdbfac6cbfa63f1f4e2286a97fa386812b1aee92 /src/modules
parent3323226c38c959392e61f406ec62f9d5f24fce15 (diff)
Change the type of the user parameter in the OnUserPreNick() hook from User to LocalUser
No remote users were passed to this hook before. Remove needless IS_LOCAL() checks.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_nickflood.cpp2
-rw-r--r--src/modules/m_nicklock.cpp5
-rw-r--r--src/modules/m_nonicks.cpp5
-rw-r--r--src/modules/m_svshold.cpp2
4 files changed, 4 insertions, 10 deletions
diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp
index f74a18422..cd1bddce4 100644
--- a/src/modules/m_nickflood.cpp
+++ b/src/modules/m_nickflood.cpp
@@ -126,7 +126,7 @@ class ModuleNickFlood : public Module
{
}
- ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE
+ ModResult OnUserPreNick(LocalUser* user, const std::string& newnick) CXX11_OVERRIDE
{
for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
{
diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp
index b8d4ac4df..21f02fe11 100644
--- a/src/modules/m_nicklock.cpp
+++ b/src/modules/m_nicklock.cpp
@@ -153,11 +153,8 @@ class ModuleNickLock : public Module
return Version("Provides the NICKLOCK command, allows an oper to change a users nick and lock them to it until they quit", VF_OPTCOMMON | VF_VENDOR);
}
- ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE
+ ModResult OnUserPreNick(LocalUser* user, const std::string& newnick) CXX11_OVERRIDE
{
- if (!IS_LOCAL(user))
- return MOD_RES_PASSTHRU;
-
if (locked.get(user))
{
user->WriteNumeric(ERR_CANTCHANGENICK, ":You cannot change your nickname (your nick is locked)");
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index 15ee4e7f8..5a45bbb4a 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -46,11 +46,8 @@ class ModuleNoNickChange : public Module
tokens["EXTBAN"].push_back('N');
}
- ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE
+ ModResult OnUserPreNick(LocalUser* user, const std::string& newnick) CXX11_OVERRIDE
{
- if (!IS_LOCAL(user))
- return MOD_RES_PASSTHRU;
-
for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
{
Channel* curr = (*i)->chan;
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index af306ce62..a623e1553 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -192,7 +192,7 @@ class ModuleSVSHold : public Module
return MOD_RES_DENY;
}
- ModResult OnUserPreNick(User *user, const std::string &newnick) CXX11_OVERRIDE
+ ModResult OnUserPreNick(LocalUser* user, const std::string& newnick) CXX11_OVERRIDE
{
XLine *rl = ServerInstance->XLines->MatchesLine("SVSHOLD", newnick);