summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@lodoss.net>2013-07-23 14:39:50 +0100
committerFederico G. Schwindt <fgsch@lodoss.net>2013-07-23 18:03:32 +0100
commite908dc0dc75c63699ffbffe9246e30420ee51f04 (patch)
tree4b5f9de4213ac3e8faa4217014f4fe2822c71eda
parent378c9203df121244f2e23e78f2b134755f491d4c (diff)
Make ChannelModeStatus level mandatory
Levels are used in Channel::SetCorrectModes() when removing modes.
-rw-r--r--include/modes.h2
-rw-r--r--modules/protocol/inspircd12.cpp4
-rw-r--r--modules/protocol/inspircd20.cpp4
-rw-r--r--modules/protocol/ngircd.cpp10
4 files changed, 10 insertions, 10 deletions
diff --git a/include/modes.h b/include/modes.h
index 1e5d7f7c1..807b91c25 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -193,7 +193,7 @@ class CoreExport ChannelModeStatus : public ChannelMode
* @param msymbol The symbol for the mode, eg @ %
* @param mlevel A level for the mode, which is usually determined by the PREFIX capab
*/
- ChannelModeStatus(const Anope::string &name, char mc, char msymbol, short mlevel = 0);
+ ChannelModeStatus(const Anope::string &name, char mc, char msymbol, short mlevel);
/** destructor
*/
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index 228f082bc..2e880b631 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -487,10 +487,10 @@ struct IRCDMessageCapab : Message::Capab
continue;
/* InspIRCd sends q and a here if they have no prefixes */
case 'q':
- ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", 'q', '@'));
+ ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", 'q', '@', 4));
continue;
case 'a':
- ModeManager::AddChannelMode(new ChannelModeStatus("PROTECT" , 'a', '@'));
+ ModeManager::AddChannelMode(new ChannelModeStatus("PROTECT" , 'a', '@', 3));
continue;
default:
ModeManager::AddChannelMode(new ChannelModeList("", modebuf[t]));
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp
index d87284038..803e86bf7 100644
--- a/modules/protocol/inspircd20.cpp
+++ b/modules/protocol/inspircd20.cpp
@@ -358,7 +358,7 @@ struct IRCDMessageCapab : Message::Capab
else if (modename.equals_cs("nonotice"))
cm = new ChannelMode("NONOTICE", modechar[0]);
else if (modename.equals_cs("op"))
- cm = new ChannelModeStatus("OP", modechar.length() > 1 ? modechar[1] : modechar[0], modechar.length() > 1 ? modechar[0] : 2);
+ cm = new ChannelModeStatus("OP", modechar.length() > 1 ? modechar[1] : modechar[0], modechar.length() > 1 ? modechar[0] : 0, 2);
else if (modename.equals_cs("operonly"))
cm = new ChannelModeOper(modechar[0]);
else if (modename.equals_cs("permanent"))
@@ -383,7 +383,7 @@ struct IRCDMessageCapab : Message::Capab
cm = new ChannelModeStatus("VOICE", modechar.length() > 1 ? modechar[1] : modechar[0], modechar.length() > 1 ? modechar[0] : 0, 0);
/* Unknown status mode, (customprefix) - add it */
else if (modechar.length() == 2)
- cm = new ChannelModeStatus(modename.upper(), modechar[1], modechar[0]);
+ cm = new ChannelModeStatus(modename.upper(), modechar[1], modechar[0], -1);
/* Unknown non status mode, add it to our list for later */
else
chmodes[modechar[0]] = modename.upper();
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
index ff34d80bf..0b76cddb8 100644
--- a/modules/protocol/ngircd.cpp
+++ b/modules/protocol/ngircd.cpp
@@ -618,11 +618,11 @@ class ProtongIRCd : public Module
ModeManager::AddChannelMode(new ChannelModeList("INVITEOVERRIDE", 'I'));
/* Add channel user modes */
- ModeManager::AddChannelMode(new ChannelModeStatus("VOICE", 'v', '+'));
- ModeManager::AddChannelMode(new ChannelModeStatus("HALFOP", 'h', '%'));
- ModeManager::AddChannelMode(new ChannelModeStatus("OP", 'o', '@'));
- ModeManager::AddChannelMode(new ChannelModeStatus("PROTECT", 'a', '&'));
- ModeManager::AddChannelMode(new ChannelModeStatus("OWNER", '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));
/* Add channel modes */
ModeManager::AddChannelMode(new ChannelMode("INVITE", 'i'));