summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-16 00:36:20 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-16 00:36:20 +0000
commit3039e0663f7e45a45e9574a6aa7463bbe77e849f (patch)
tree936c1bf5f4c9ba2ade1dc722932d75a5f2a6dde9 /src/modules
parentf9b71ed0ed739d08ebfd1c9610eb952fb14bdd95 (diff)
Change that allows the m_override module to not announce a key override for a user that specified the right key
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9516 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_banredirect.cpp2
-rw-r--r--src/modules/m_cban.cpp2
-rw-r--r--src/modules/m_chanprotect.cpp2
-rw-r--r--src/modules/m_denychans.cpp2
-rw-r--r--src/modules/m_foobar.cpp2
-rw-r--r--src/modules/m_joinflood.cpp2
-rw-r--r--src/modules/m_kicknorejoin.cpp2
-rw-r--r--src/modules/m_operchans.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.cpp2
-rw-r--r--src/modules/m_services.cpp2
-rw-r--r--src/modules/m_services_account.cpp2
-rw-r--r--src/modules/m_sslmodes.cpp2
15 files changed, 16 insertions, 16 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index bb59cde3d..3e61e198e 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -258,7 +258,7 @@ class ModuleBanRedirect : public Module
ExceptionModule = ServerInstance->Modules->Find("m_banexception.so");
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
/* This prevents recursion when a user sets multiple ban redirects in a chain
* (thanks Potter)
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index 79adf9fcf..10948caf7 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -177,7 +177,7 @@ class ModuleCBan : public Module
return 0;
}
- virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs)
+ virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven)
{
XLine *rl = ServerInstance->XLines->MatchesLine("CBAN", cname);
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index e85744d06..fdb69d307 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -394,7 +394,7 @@ class ModuleChanProtect : public Module
}
}
- virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs)
+ virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven)
{
// if the user is the first user into the channel, mark them as the founder, but only if
// the config option for it is set
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index c45f07818..cab26122d 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -87,7 +87,7 @@ class ModuleDenyChannels : public Module
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
for (int j =0; j < Conf->Enumerate("badchan"); j++)
{
diff --git a/src/modules/m_foobar.cpp b/src/modules/m_foobar.cpp
index d9254c435..6ab156fb0 100644
--- a/src/modules/m_foobar.cpp
+++ b/src/modules/m_foobar.cpp
@@ -86,7 +86,7 @@ class ModuleFoobar : public Module
ServerInstance->Logs->Log("m_foobar",DEBUG,"Foobar: User "+b+" parted "+c);
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (chan->IsExtBanned(user, 'n'))
return 1;
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index 5f8c329cc..c406c1701 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -222,7 +222,7 @@ class ModuleJoinFlood : public Module
ServerInstance->Modules->Attach(eventlist, this, 3);
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* 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 794a7f9ef..16def4d79 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -130,7 +130,7 @@ public:
ServerInstance->Modules->Attach(eventlist, this, 4);
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (chan)
{
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index d73fb58cf..d1111fd86 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -61,7 +61,7 @@ class ModuleOperChans : public Module
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (!IS_OPER(user))
{
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index a20d2fd02..af7201882 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -224,7 +224,7 @@ class ModuleOverride : public Module
return ACR_DEFAULT;
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (IS_OPER(user))
{
@@ -243,7 +243,7 @@ class ModuleOverride : public Module
return -1;
}
- if ((*chan->key) && (CanOverride(user,"KEY")))
+ if ((*chan->key) && (CanOverride(user,"KEY")) && !strcasecmp(keygiven.c_str(), chan->key))
{
if (NoisyOverride)
chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel key", cname, user->nick);
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index 47e76c00b..44cea9b0b 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -112,7 +112,7 @@ class ModuleRedirect : public Module
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* 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 e4f928468..eea6b7876 100644
--- a/src/modules/m_regonlycreate.cpp
+++ b/src/modules/m_regonlycreate.cpp
@@ -26,7 +26,7 @@ class ModuleRegOnlyCreate : public Module
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (chan)
return 0;
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 8543e9719..1838338bd 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -51,7 +51,7 @@ class ModuleRestrictChans : public Module
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
irc::string x = cname;
// user is not an oper and its not in the allow list
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 54690c39b..5b39de931 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -258,7 +258,7 @@ class ModuleServices : public Module
return OnUserPreMessage(user,dest,target_type,text,status, exempt_list);
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (chan)
{
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 8077007dc..70539ddde 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -192,7 +192,7 @@ class ModuleServicesAccount : public Module
return OnUserPreMessage(user, dest, target_type, text, status, exempt_list);
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
std::string *account;
user->GetExt("accountname", account);
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index fa8dd9815..8e0439169 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -82,7 +82,7 @@ class ModuleSSLModes : public Module
}
- virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
+ virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if(chan && chan->IsModeSet('z'))
{