summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/chanserv.example.conf20
-rw-r--r--modules/protocol/charybdis.cpp12
-rw-r--r--modules/protocol/hybrid.cpp3
-rw-r--r--modules/protocol/plexus.cpp41
-rw-r--r--modules/protocol/ratbox.cpp47
5 files changed, 92 insertions, 31 deletions
diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf
index 986479471..2e098bd46 100644
--- a/data/chanserv.example.conf
+++ b/data/chanserv.example.conf
@@ -131,13 +131,6 @@ module
#opersonly = yes
/*
- * Default modes for mode lock, these are set on newly registered channels.
- *
- * If not set, the default is +nrt.
- */
- mlock = "+nrt"
-
- /*
* Modes that will not be allowed to be locked. Oper only modes such as +O
* are always restricted from regular users and are not affected by this.
* Comment out for no restrictions.
@@ -1032,7 +1025,18 @@ command { service = "ChanServ"; name = "LOG"; command = "chanserv/log"; group =
*
* Used for changing mode locks and changing modes.
*/
-module { name = "cs_mode" }
+module
+{
+ name = "cs_mode"
+
+ /*
+ * Default modes for mode lock, these are set on newly registered channels.
+ *
+ * If not set, the default is +nrt.
+ */
+ mlock = "+nrt"
+}
+
command { service = "ChanServ"; name = "MODE"; command = "chanserv/mode"; group = "chanserv/management"; }
command { service = "ChanServ"; name = "OWNER"; command = "chanserv/modes"; group = "chanserv/status"; set = "OWNER" }
diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp
index 490092a67..ae8a67c49 100644
--- a/modules/protocol/charybdis.cpp
+++ b/modules/protocol/charybdis.cpp
@@ -362,17 +362,10 @@ class ProtoCharybdis : public Module
void AddModes()
{
/* Add user modes */
- ModeManager::AddUserMode(new UserModeOperOnly("DEAF", 'D'));
- ModeManager::AddUserMode(new UserMode("CALLERID", 'g'));
+ ModeManager::AddUserMode(new UserMode("NOFORWARD", 'Q'));
ModeManager::AddUserMode(new UserMode("REGPRIV", 'R'));
- ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z'));
- ModeManager::AddUserMode(new UserModeOperOnly("LOCOPS", 'l'));
ModeManager::AddUserMode(new UserModeOperOnly("OPERWALLS", 'z'));
- ModeManager::AddUserMode(new UserModeNoone("PROTECTED", 'S'));
- ModeManager::AddUserMode(new UserMode("NOFORWARD", 'Q'));
-
- // charybdis has no usermode for registered users
- ModeManager::RemoveUserMode(ModeManager::FindUserModeByName("REGISTERED"));
+ ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z'));
/* b/e/I */
ModeManager::AddChannelMode(new ChannelModeList("QUIET", 'q'));
@@ -387,7 +380,6 @@ class ProtoCharybdis : public Module
ModeManager::AddChannelMode(new ChannelModeLargeBan("LBAN", 'L'));
ModeManager::AddChannelMode(new ChannelMode("PERM", 'P'));
ModeManager::AddChannelMode(new ChannelMode("NOFORWARD", 'Q'));
- ModeManager::AddChannelMode(new ChannelMode("REGISTEREDONLY", 'r'));
ModeManager::AddChannelMode(new ChannelMode("OPMODERATED", 'z'));
}
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index 07977b961..a07cb62fb 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -622,7 +622,8 @@ public:
message_sjoin(this), message_svsmode(this), message_tburst(this), message_tmode(this), message_uid(this),
message_certfp(this)
{
- this->AddModes();
+ if (Config->GetModule(this))
+ this->AddModes();
}
void OnUserNickChange(User *u, const Anope::string &) anope_override
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp
index 1839b1fb9..6a2b65794 100644
--- a/modules/protocol/plexus.cpp
+++ b/modules/protocol/plexus.cpp
@@ -323,26 +323,59 @@ class ProtoPlexus : public Module
void AddModes()
{
/* Add user modes */
- ModeManager::RemoveUserMode(ModeManager::FindUserModeByName("HIDEOPER"));
+ ModeManager::AddUserMode(new UserModeOperOnly("ADMIN", 'a'));
ModeManager::AddUserMode(new UserMode("NOCTCP", 'C'));
+ ModeManager::AddUserMode(new UserMode("DEAF", 'D'));
ModeManager::AddUserMode(new UserMode("SOFTCALLERID", 'G'));
+ ModeManager::AddUserMode(new UserMode("CALLERID", 'g'));
+ ModeManager::AddUserMode(new UserMode("INVIS", 'i'));
+ ModeManager::AddUserMode(new UserModeOperOnly("LOCOPS", 'l'));
+ ModeManager::AddUserMode(new UserMode("OPER", 'o'));
+ ModeManager::AddUserMode(new UserMode("PRIV", 'p'));
ModeManager::AddUserMode(new UserModeOperOnly("NETADMIN", 'N'));
+ ModeManager::AddUserMode(new UserModeNoone("REGISTERED", 'r'));
+ ModeManager::AddUserMode(new UserMode("REGPRIV", 'R'));
+ ModeManager::AddUserMode(new UserModeOperOnly("SNOMASK", 's'));
+ ModeManager::AddUserMode(new UserModeNoone("SSL", 'S'));
+ ModeManager::AddUserMode(new UserMode("WALLOPS", 'w'));
ModeManager::AddUserMode(new UserModeNoone("WEBIRC", 'W'));
- ModeManager::AddUserMode(new UserMode("PRIV", 'p'));
ModeManager::AddUserMode(new UserMode("CLOAK", 'x'));
+ ModeManager::AddUserMode(new UserModeOperOnly("OPERWALLS", 'z'));
+
+ /* b/e/I */
+ ModeManager::AddChannelMode(new ChannelModeList("BAN", 'b'));
+ ModeManager::AddChannelMode(new ChannelModeList("EXCEPT", 'e'));
+ ModeManager::AddChannelMode(new ChannelModeList("INVITEOVERRIDE", 'I'));
ModeManager::AddUserMode(new UserModeNoone("PROTECTED", 'U'));
/* v/h/o/a/q */
+ ModeManager::AddChannelMode(new ChannelModeStatus("VOICE", 'v', '+', 0));
+ ModeManager::AddChannelMode(new ChannelModeStatus("HALFOP", 'h', '%', 1));
+ ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@', 2));
ModeManager::AddChannelMode(new ChannelModeStatus("PROTECT", 'a', '&', 3));
ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", 'q', '~', 4));
+ /* l/k */
+ ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l'));
+ ModeManager::AddChannelMode(new ChannelModeKey('k'));
+
/* Add channel modes */
- ModeManager::RemoveChannelMode(ModeManager::FindChannelModeByName("REGISTERED"));
ModeManager::AddChannelMode(new ChannelMode("BANDWIDTH", 'B'));
ModeManager::AddChannelMode(new ChannelMode("NOCTCP", 'C'));
+ ModeManager::AddChannelMode(new ChannelMode("BLOCKCOLOR", 'c'));
+ ModeManager::AddChannelMode(new ChannelMode("INVITE", 'i'));
+ ModeManager::AddChannelMode(new ChannelMode("MODERATED", 'm'));
ModeManager::AddChannelMode(new ChannelMode("REGMODERATED", 'M'));
+ ModeManager::AddChannelMode(new ChannelMode("NOEXTERNAL", 'n'));
ModeManager::AddChannelMode(new ChannelMode("NONOTICE", 'N'));
- ModeManager::AddChannelMode(new ChannelMode("BLOCKCOLOR", 'c'));
+ ModeManager::AddChannelMode(new ChannelMode("PRIVATE", 'p'));
+ ModeManager::AddChannelMode(new ChannelModeNoone("REGISTERED", 'r'));
+ ModeManager::AddChannelMode(new ChannelMode("SECRET", 's'));
+ ModeManager::AddChannelMode(new ChannelMode("TOPIC", 't'));
+ ModeManager::AddChannelMode(new ChannelModeOperOnly("OPERONLY", 'O'));
+ ModeManager::AddChannelMode(new ChannelMode("REGMODERATED", 'M'));
+ ModeManager::AddChannelMode(new ChannelMode("REGISTEREDONLY", 'R'));
+ ModeManager::AddChannelMode(new ChannelMode("SSL", 'S'));
ModeManager::AddChannelMode(new ChannelMode("PERM", 'z'));
}
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index 98b7bae6c..b7716bce1 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -218,19 +218,50 @@ class ProtoRatbox : public Module
void AddModes()
{
/* user modes */
- ModeManager::RemoveUserMode(ModeManager::FindUserModeByName("HIDEOPER"));
- ModeManager::RemoveUserMode(ModeManager::FindUserModeByName("REGPRIV"));
- ModeManager::RemoveUserMode(ModeManager::FindUserModeByName("SSL"));
+ ModeManager::AddUserMode(new UserModeOperOnly("ADMIN", 'a'));
+ ModeManager::AddUserMode(new UserModeOperOnly("BOT", 'b'));
+ // c/C = con
+ // d = debug?
+ ModeManager::AddUserMode(new UserMode("DEAF", 'D'));
+ // f = full?
+ ModeManager::AddUserMode(new UserMode("CALLERID", 'g'));
+ ModeManager::AddUserMode(new UserMode("INVIS", 'i'));
+ // k = skill?
+ ModeManager::AddUserMode(new UserModeOperOnly("LOCOPS", 'l'));
+ // n = nchange
+ ModeManager::AddUserMode(new UserMode("OPER", 'o'));
+ // r = rej
+ ModeManager::AddUserMode(new UserModeOperOnly("SNOMASK", 's'));
ModeManager::AddUserMode(new UserModeNoone("PROTECTED", 'S'));
+ // u = unauth?
+ ModeManager::AddUserMode(new UserMode("WALLOPS", 'w'));
+ // x = external?
+ // y = spy?
+ ModeManager::AddUserMode(new UserModeOperOnly("OPERWALLS", 'z'));
+ // Z = spy?
+
+ /* b/e/I */
+ ModeManager::AddChannelMode(new ChannelModeList("BAN", 'b'));
+ ModeManager::AddChannelMode(new ChannelModeList("EXCEPT", 'e'));
+ ModeManager::AddChannelMode(new ChannelModeList("INVITEOVERRIDE", 'I'));
/* v/h/o/a/q */
- ModeManager::RemoveChannelMode(ModeManager::FindChannelModeByName("HALFOP"));
+ ModeManager::AddChannelMode(new ChannelModeStatus("VOICE", 'v', '+', 0));
+ ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@', 1));
+
+ /* l/k */
+ ModeManager::AddChannelMode(new ChannelModeParam("LIMIT", 'l'));
+ ModeManager::AddChannelMode(new ChannelModeKey('k'));
/* channel modes */
- ModeManager::RemoveChannelMode(ModeManager::FindChannelModeByName("REGISTERED"));
- ModeManager::RemoveChannelMode(ModeManager::FindChannelModeByName("OPERONLY"));
- ModeManager::RemoveChannelMode(ModeManager::FindChannelModeByName("REGISTEREDONLY"));
- ModeManager::RemoveChannelMode(ModeManager::FindChannelModeByName("SSL"));
+ ModeManager::AddChannelMode(new ChannelMode("INVITE", 'i'));
+ ModeManager::AddChannelMode(new ChannelMode("MODERATED", 'm'));
+ ModeManager::AddChannelMode(new ChannelMode("NOEXTERNAL", 'n'));
+ ModeManager::AddChannelMode(new ChannelMode("PRIVATE", 'p'));
+ ModeManager::AddChannelMode(new ChannelModeNoone("REGISTEREDONLY", 'r'));
+ ModeManager::AddChannelMode(new ChannelMode("SECRET", 's'));
+ ModeManager::AddChannelMode(new ChannelMode("TOPIC", 't'));
+ ModeManager::AddChannelMode(new ChannelMode("SSL", 'S'));
}
public: