summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-25 17:52:27 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-25 17:52:27 +0000
commitf07a2aa0866a8f953b41ba21592919f05d3a315e (patch)
treefe3004a94b41de89e7c8ab3301de5d8f9bc7f203
parentfdba9740cb1627afb119ab3bc0b3f969b0ef1611 (diff)
All done.
Modules may now change the privialges each user gets as they join, in OnUserPreJoin. For the first user in, this value defaults to a string containing "@" otherwise it defaults to a string containing nothing. If you change it, they get the new prefixes instead, and yes module-based prefixes ARE supported and its all automatically networked. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5327 e03df62e-2008-0410-955e-edbf42e46eb7
-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_operchans.cpp2
-rw-r--r--src/modules/m_override.cpp2
-rw-r--r--src/modules/m_redirect.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
11 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp
index ce2550ba3..2cc893504 100644
--- a/src/modules/m_cban.cpp
+++ b/src/modules/m_cban.cpp
@@ -158,7 +158,7 @@ class ModuleCBan : public Module
return 0;
}
- virtual int OnUserPreJoin(userrec *user, chanrec *chan, const char *cname)
+ virtual int OnUserPreJoin(userrec *user, chanrec *chan, const char *cname, std::string &privs)
{
ExpireBans();
diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp
index 04d0a3033..611bb5e03 100644
--- a/src/modules/m_denychans.cpp
+++ b/src/modules/m_denychans.cpp
@@ -58,7 +58,7 @@ class ModuleDenyChannels : public Module
List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
for (int j =0; j < Conf->Enumerate("badchan"); j++)
{
diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp
index 8557ad11f..c1c50f2d4 100644
--- a/src/modules/m_joinflood.cpp
+++ b/src/modules/m_joinflood.cpp
@@ -229,7 +229,7 @@ class ModuleJoinFlood : public Module
ServerInstance->AddMode(jf, 'j');
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
if (chan)
{
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp
index ea97367a0..56322507c 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -121,7 +121,7 @@ public:
ServerInstance->AddMode(kr, 'J');
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
if (chan)
{
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 53d21cae9..29ce267bc 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -70,7 +70,7 @@ class ModuleOperChans : public Module
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
if (!*user->oper)
{
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 026b2798d..a4aac46d5 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -240,7 +240,7 @@ class ModuleOverride : public Module
return ACR_DEFAULT;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
if (*user->oper)
{
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index efd9b8b1c..2abdabb9a 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -119,7 +119,7 @@ class ModuleRedirect : public Module
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
if (chan)
{
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 1b7d4104a..03d28c3ac 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -64,7 +64,7 @@ class ModuleRestrictChans : public Module
List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
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 c949d7f68..d783952db 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -267,7 +267,7 @@ class ModuleServices : public Module
return OnUserPreMessage(user,dest,target_type,text,status);
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
if (chan)
{
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 739ad6119..66e1898d3 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -197,7 +197,7 @@ class ModuleServicesAccount : public Module
return OnUserPreMessage(user, dest, target_type, text, status);
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
std::string *account;
user->GetExt("accountname", account);
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index 1304abe01..1d48d99ad 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -87,7 +87,7 @@ class ModuleSSLModes : public Module
List[I_OnUserPreJoin] = 1;
}
- virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname)
+ virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
{
if(chan && chan->IsModeSet('z'))
{