summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp4
-rw-r--r--src/modules.cpp2
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_cban.cpp2
-rw-r--r--src/modules/m_denychans.cpp2
-rw-r--r--src/modules/m_joinflood.cpp2
-rw-r--r--src/modules/m_kicknorejoin.cpp2
-rw-r--r--src/modules/m_ojoin.cpp2
-rw-r--r--src/modules/m_operchans.cpp2
-rw-r--r--src/modules/m_operprefix.cpp2
-rw-r--r--src/modules/m_override.cpp4
-rw-r--r--src/modules/m_redirect.cpp2
-rw-r--r--src/modules/m_regonlycreate.cpp2
-rw-r--r--src/modules/m_restrictchans.cpp4
-rw-r--r--src/modules/m_services_account.cpp5
-rw-r--r--src/modules/m_sslmodes.cpp2
16 files changed, 18 insertions, 23 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index b8406a65a..f2b0b457a 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -291,7 +291,7 @@ Channel* Channel::JoinUser(User* user, std::string cname, bool override, const s
if (IS_LOCAL(user) && override == false)
{
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, NULL, cname, privs, key));
+ FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (IS_LOCAL(user), NULL, cname, privs, key));
if (MOD_RESULT == MOD_RES_DENY)
return NULL;
}
@@ -311,7 +311,7 @@ Channel* Channel::JoinUser(User* user, std::string cname, bool override, const s
if (IS_LOCAL(user) && override == false)
{
ModResult MOD_RESULT;
- FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (user, Ptr, cname, privs, key));
+ FIRST_MOD_RESULT(OnUserPreJoin, MOD_RESULT, (IS_LOCAL(user), Ptr, cname, privs, key));
if (MOD_RESULT == MOD_RES_DENY)
{
return NULL;
diff --git a/src/modules.cpp b/src/modules.cpp
index 7ac4d2062..e14e33811 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -97,7 +97,7 @@ void Module::OnUserPart(Membership*, std::string&, CUList&) { }
void Module::OnPreRehash(User*, const std::string&) { }
void Module::OnModuleRehash(User*, const std::string&) { }
void Module::OnRehash(User*) { }
-ModResult Module::OnUserPreJoin(User*, Channel*, const std::string&, std::string&, const std::string&) { return MOD_RES_PASSTHRU; }
+ModResult Module::OnUserPreJoin(LocalUser*, Channel*, const std::string&, std::string&, const std::string&) { return MOD_RES_PASSTHRU; }
void Module::OnMode(User*, void*, int, const std::vector<std::string>&, const std::vector<TranslateType>&) { }
void Module::OnOper(User*, const std::string&) { }
void Module::OnPostOper(User*, const std::string&, const std::string &) { }
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 8fda26ba6..2bb1357db 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -271,7 +271,7 @@ class ModuleBanRedirect : public Module
}
}
- virtual ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string &privs, const std::string &keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (chan)
{
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 1ecb7f9d4..35daba328 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -178,7 +178,7 @@ class ModuleCBan : public Module
return MOD_RES_DENY;
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
XLine *rl = ServerInstance->XLines->MatchesLine("CBAN", cname);
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 9d9296c25..47db28978 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -83,7 +83,7 @@ class ModuleDenyChannels : public Module
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
ConfigTagList tags = ServerInstance->Config->ConfTags("badchan");
for (ConfigIter j = tags.first; j != tags.second; ++j)
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index 1a30b7479..39cbf783f 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -205,7 +205,7 @@ class ModuleJoinFlood : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (chan)
{
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp
index 9163be7f6..5f19e5d0c 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -73,7 +73,7 @@ public:
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (chan)
{
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp
index f630f827c..5ac67a649 100644
--- a/src/modules/m_ojoin.cpp
+++ b/src/modules/m_ojoin.cpp
@@ -193,7 +193,7 @@ class ModuleOjoin : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (mycommand.active)
{
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index e986b632a..83d94bdb0 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -49,7 +49,7 @@ class ModuleOperChans : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (chan && chan->IsModeSet('O') && !user->IsOper())
{
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp
index 0df2ac6d8..2eeefb2b3 100644
--- a/src/modules/m_operprefix.cpp
+++ b/src/modules/m_operprefix.cpp
@@ -96,7 +96,7 @@ class ModuleOperPrefixMode : public Module
mw_added = ServerInstance->Modes->AddModeWatcher(&hideoperwatcher);
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
/* The user may have the +H umode on himself, but +H does not necessarily correspond
* to the +H of m_hideoper.
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 29996fc8f..394c770d7 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -116,9 +116,9 @@ class ModuleOverride : public Module
return MOD_RES_PASSTHRU;
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
- if (IS_LOCAL(user) && user->IsOper())
+ if (user->IsOper())
{
if (chan)
{
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 4d59c34ba..72a3649d0 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -131,7 +131,7 @@ class ModuleRedirect : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (chan)
{
diff --git a/src/modules/m_regonlycreate.cpp b/src/modules/m_regonlycreate.cpp
index 98250d2a7..9605ed563 100644
--- a/src/modules/m_regonlycreate.cpp
+++ b/src/modules/m_regonlycreate.cpp
@@ -34,7 +34,7 @@ class ModuleRegOnlyCreate : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if (chan)
return MOD_RES_PASSTHRU;
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 435738834..372ee1caa 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -53,11 +53,9 @@ class ModuleRestrictChans : public Module
ReadConfig();
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
irc::string x(cname.c_str());
- if (!IS_LOCAL(user))
- return MOD_RES_PASSTHRU;
// channel does not yet exist (record is null, about to be created IF we were to allow it)
if (!chan)
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index bdd47b4bc..7c4eb5f0b 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -245,11 +245,8 @@ class ModuleServicesAccount : public Module
return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
- if (!IS_LOCAL(user))
- return MOD_RES_PASSTHRU;
-
std::string *account = accountname.get(user);
bool is_registered = account && !account->empty();
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index d862a0706..bfd05238d 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -92,7 +92,7 @@ class ModuleSSLModes : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+ ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
{
if(chan && chan->IsModeSet('z'))
{