1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 11:46:37 +02:00

Make ChannelModeStatus level mandatory

Levels are used in Channel::SetCorrectModes() when removing modes.
This commit is contained in:
Federico G. Schwindt
2013-07-23 14:39:50 +01:00
parent 378c9203df
commit e908dc0dc7
4 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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
*/
+2 -2
View File
@@ -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]));
+2 -2
View File
@@ -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();
+5 -5
View File
@@ -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'));