diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 14 | ||||
-rw-r--r-- | src/modes.cpp | 87 | ||||
-rw-r--r-- | src/protocol/bahamut.c | 52 | ||||
-rw-r--r-- | src/protocol/inspircd11.c | 79 | ||||
-rw-r--r-- | src/protocol/inspircd12.cpp | 118 | ||||
-rw-r--r-- | src/protocol/ratbox.c | 38 | ||||
-rw-r--r-- | src/protocol/unreal32.c | 120 |
7 files changed, 260 insertions, 248 deletions
diff --git a/src/channels.c b/src/channels.c index 594388c2f..564989bd3 100644 --- a/src/channels.c +++ b/src/channels.c @@ -978,25 +978,25 @@ char *chan_get_modes(Channel * chan, int complete, int plus) char params[BUFSIZE]; char *end = res, *value, *pend = params, *pend2 = params; std::string param; - ChannelMode *cm; - ChannelModeParam *cmp; - std::map<char, ChannelMode *>::iterator it; if (chan->HasModes()) { - for (it = ModeManager::ChannelModesByChar.begin(); it != ModeManager::ChannelModesByChar.end(); ++it) + for (std::list<Mode *>::iterator it = ModeManager::Modes.begin(); it != ModeManager::Modes.end(); ++it) { - cm = it->second; + if ((*it)->Class != MC_CHANNEL) + continue; + + ChannelMode *cm = dynamic_cast<ChannelMode *>(*it); if (chan->HasMode(cm->Name)) { - *end++ = it->first; + *end++ = cm->ModeChar; if (complete) { if (cm->Type == MODE_PARAM) { - cmp = dynamic_cast<ChannelModeParam *>(cm); + ChannelModeParam *cmp = dynamic_cast<ChannelModeParam *>(cm); if (plus || !cmp->MinusNoArg) { diff --git a/src/modes.cpp b/src/modes.cpp index c915ca351..fa3a3fc1b 100644 --- a/src/modes.cpp +++ b/src/modes.cpp @@ -25,6 +25,8 @@ std::map<ChannelModeName, ChannelMode *> ModeManager::ChannelModesByName; * the pointers in each are the same. This is used to increase * efficiency. */ +/* List of all modes Anope knows about */ +std::list<Mode *> ModeManager::Modes; /* Default mlocked modes on */ std::bitset<128> DefMLockOn; @@ -95,12 +97,25 @@ void SetDefaultMLock() } /** Default constructor + * @param mClass The type of mode this is + * @param modeChar The mode char + */ +Mode::Mode(ModeClass mClass, char modeChar) : Class(mClass), ModeChar(modeChar) +{ +} + +/** Default destructor + */ +Mode::~Mode() +{ +} + +/** Default constructor * @param mName The mode name + * @param modeChar The mode char */ -UserMode::UserMode(UserModeName mName) +UserMode::UserMode(UserModeName mName, char modeChar) : Mode(MC_USER, modeChar), Name(mName), Type(MODE_REGULAR) { - this->Name = mName; - this->Type = MODE_REGULAR; } /** Default destructor @@ -109,18 +124,21 @@ UserMode::~UserMode() { } -UserModeParam::UserModeParam(UserModeName mName) : UserMode(mName) +/** Default constructor + * @param mName The mode name + * @param modeChar The mode char + */ +UserModeParam::UserModeParam(UserModeName mName, char modeChar) : UserMode(mName, modeChar) { this->Type = MODE_PARAM; } /** Default constrcutor * @param mName The mode name + * @param modeChar The mode char */ -ChannelMode::ChannelMode(ChannelModeName mName) +ChannelMode::ChannelMode(ChannelModeName mName, char modeChar) : Mode(MC_CHANNEL, modeChar), Name(mName), Type(MODE_REGULAR) { - this->Name = mName; - this->Type = MODE_REGULAR; } /** Default destructor @@ -131,8 +149,9 @@ ChannelMode::~ChannelMode() /** Default constructor * @param mName The mode name + * @param modeChar The mode char */ -ChannelModeList::ChannelModeList(ChannelModeName mName) : ChannelMode(mName) +ChannelModeList::ChannelModeList(ChannelModeName mName, char modeChar) : ChannelMode(mName, modeChar) { this->Type = MODE_LIST; } @@ -145,12 +164,12 @@ ChannelModeList::~ChannelModeList() /** Default constructor * @param mName The mode name + * @param modeChar The mode char * @param MinusArg true if the mode sends no arg when unsetting */ -ChannelModeParam::ChannelModeParam(ChannelModeName mName, bool MinusArg) : ChannelMode(mName) +ChannelModeParam::ChannelModeParam(ChannelModeName mName, char modeChar, bool MinusArg) : ChannelMode(mName, modeChar), MinusNoArg(MinusArg) { this->Type = MODE_PARAM; - this->MinusNoArg = MinusArg; } /** Default destructor @@ -161,12 +180,12 @@ ChannelModeParam::~ChannelModeParam() /** Default constructor * @param mName The mode name + * @param modeChar The mode char * @param mSymbol The symbol for the mode, eg @ % + */ -ChannelModeStatus::ChannelModeStatus(ChannelModeName mName, char mSymbol) : ChannelMode(mName) +ChannelModeStatus::ChannelModeStatus(ChannelModeName mName, char modeChar, char mSymbol) : ChannelMode(mName, modeChar), Symbol(mSymbol) { this->Type = MODE_STATUS; - this->Symbol = mSymbol; } /** Default destructor @@ -479,17 +498,17 @@ std::list<std::string> ModeManager::BuildModeStrings(StackerInfo *info) std::string buf, parambuf; ChannelMode *cm = NULL; UserMode *um = NULL; - unsigned Modes = 0; + unsigned NModes = 0; buf = "+"; for (it = info->AddModes.begin(); it != info->AddModes.end(); ++it) { - if (++Modes > ircd->maxmodes) + if (++NModes > ircd->maxmodes) { ret.push_back(buf + parambuf); buf = "+"; parambuf.clear(); - Modes = 1; + NModes = 1; } if (info->Type == ST_CHANNEL) @@ -513,12 +532,12 @@ std::list<std::string> ModeManager::BuildModeStrings(StackerInfo *info) buf += "-"; for (it = info->DelModes.begin(); it != info->DelModes.end(); ++it) { - if (++Modes > ircd->maxmodes) + if (++NModes > ircd->maxmodes) { ret.push_back(buf + parambuf); buf = "-"; parambuf.clear(); - Modes = 1; + NModes = 1; } if (info->Type == ST_CHANNEL) @@ -591,46 +610,44 @@ void ModeManager::StackerAddInternal(BotInfo *bi, void *Object, void *Mode, bool } /** Add a user mode to Anope - * @param Mode The mode * @param um A UserMode or UserMode derived class * @return true on success, false on error */ -bool ModeManager::AddUserMode(char Mode, UserMode *um) +bool ModeManager::AddUserMode(UserMode *um) { - um->ModeChar = Mode; - bool ret = ModeManager::UserModesByChar.insert(std::make_pair(Mode, um)).second; - if (ret) - ret = ModeManager::UserModesByName.insert(std::make_pair(um->Name, um)).second; - - if (ret) + if (ModeManager::UserModesByChar.insert(std::make_pair(um->ModeChar, um)).second) { + ModeManager::UserModesByName.insert(std::make_pair(um->Name, um)).second; + ModeManager::Modes.push_back(um); + FOREACH_MOD(I_OnUserModeAdd, OnUserModeAdd(um)); + + return true; } - return ret; + return false; } /** Add a channel mode to Anope - * @param Mode The mode * @param cm A ChannelMode or ChannelMode derived class * @return true on success, false on error */ -bool ModeManager::AddChannelMode(char Mode, ChannelMode *cm) +bool ModeManager::AddChannelMode(ChannelMode *cm) { - cm->ModeChar = Mode; - bool ret = ModeManager::ChannelModesByChar.insert(std::make_pair(Mode, cm)).second; - if (ret) - ret = ModeManager::ChannelModesByName.insert(std::make_pair(cm->Name, cm)).second; - - if (ret) + if (ModeManager::ChannelModesByChar.insert(std::make_pair(cm->ModeChar, cm)).second) { + ModeManager::ChannelModesByName.insert(std::make_pair(cm->Name, cm)).second; + ModeManager::Modes.push_back(cm); + /* Apply this mode to the new default mlock if its used */ SetDefaultMLock(); FOREACH_MOD(I_OnChannelModeAdd, OnChannelModeAdd(cm)); + + return true; } - return ret; + return false; } /** Find a channel mode * @param Mode The mode diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c index 14407eb6b..34886126c 100644 --- a/src/protocol/bahamut.c +++ b/src/protocol/bahamut.c @@ -775,38 +775,38 @@ void moduleAddIRCDMsgs() { void moduleAddModes() { /* Add user modes */ - ModeManager::AddUserMode('A', new UserMode(UMODE_SERV_ADMIN)); - ModeManager::AddUserMode('R', new UserMode(UMODE_REGPRIV)); - ModeManager::AddUserMode('a', new UserMode(UMODE_ADMIN)); - ModeManager::AddUserMode('i', new UserMode(UMODE_INVIS)); - ModeManager::AddUserMode('o', new UserMode(UMODE_OPER)); - ModeManager::AddUserMode('r', new UserMode(UMODE_REGISTERED)); - ModeManager::AddUserMode('s', new UserMode(UMODE_SNOMASK)); - ModeManager::AddUserMode('w', new UserMode(UMODE_WALLOPS)); - ModeManager::AddUserMode('d', new UserMode(UMODE_DEAF)); + ModeManager::AddUserMode(new UserMode(UMODE_SERV_ADMIN, 'A')); + ModeManager::AddUserMode(new UserMode(UMODE_REGPRIV, 'R')); + ModeManager::AddUserMode(new UserMode(UMODE_ADMIN, 'a')); + ModeManager::AddUserMode(new UserMode(UMODE_INVIS, 'i')); + ModeManager::AddUserMode(new UserMode(UMODE_OPER, 'o')); + ModeManager::AddUserMode(new UserMode(UMODE_REGISTERED, 'r')); + ModeManager::AddUserMode(new UserMode(UMODE_SNOMASK, 's')); + ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w')); + ModeManager::AddUserMode(new UserMode(UMODE_DEAF, 'd')); /* b/e/I */ - ModeManager::AddChannelMode('b', new ChannelModeBan()); + ModeManager::AddChannelMode(new ChannelModeBan('b')); /* v/h/o/a/q */ - ModeManager::AddChannelMode('v', new ChannelModeStatus(CMODE_VOICE, '+')); - ModeManager::AddChannelMode('o', new ChannelModeStatus(CMODE_OP, '@')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_VOICE, 'v', '+')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OP, 'o', '@')); /* Add channel modes */ - ModeManager::AddChannelMode('c', new ChannelMode(CMODE_BLOCKCOLOR)); - ModeManager::AddChannelMode('i', new ChannelMode(CMODE_INVITE)); - ModeManager::AddChannelMode('j', new ChannelModeFlood()); - ModeManager::AddChannelMode('k', new ChannelModeKey()); - ModeManager::AddChannelMode('l', new ChannelModeParam(CMODE_LIMIT)); - ModeManager::AddChannelMode('m', new ChannelMode(CMODE_MODERATED)); - ModeManager::AddChannelMode('n', new ChannelMode(CMODE_NOEXTERNAL)); - ModeManager::AddChannelMode('p', new ChannelMode(CMODE_PRIVATE)); - ModeManager::AddChannelMode('r', new ChannelModeRegistered()); - ModeManager::AddChannelMode('s', new ChannelMode(CMODE_SECRET)); - ModeManager::AddChannelMode('t', new ChannelMode(CMODE_TOPIC)); - ModeManager::AddChannelMode('M', new ChannelMode(CMODE_REGMODERATED)); - ModeManager::AddChannelMode('O', new ChannelModeOper()); - ModeManager::AddChannelMode('R', new ChannelMode(CMODE_REGISTEREDONLY)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCOLOR, 'c')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_INVITE, 'i')); + ModeManager::AddChannelMode(new ChannelModeFlood('f')); + ModeManager::AddChannelMode(new ChannelModeKey('k')); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_LIMIT, 'l')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_MODERATED, 'm')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOEXTERNAL, 'n')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_PRIVATE, 'p')); + ModeManager::AddChannelMode(new ChannelModeRegistered('r')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SECRET, 's')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_TOPIC, 't')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_REGMODERATED, 'M')); + ModeManager::AddChannelMode(new ChannelModeOper('O')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_REGISTEREDONLY, 'R')); } class ProtoBahamut : public Module diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c index 95f93e652..59f7710a7 100644 --- a/src/protocol/inspircd11.c +++ b/src/protocol/inspircd11.c @@ -912,13 +912,13 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'b': - ModeManager::AddChannelMode('b', new ChannelModeBan()); + ModeManager::AddChannelMode(new ChannelModeBan('b')); continue; case 'e': - ModeManager::AddChannelMode('e', new ChannelModeExcept()); + ModeManager::AddChannelMode(new ChannelModeExcept('e')); continue; case 'I': - ModeManager::AddChannelMode('I', new ChannelModeInvite()); + ModeManager::AddChannelMode(new ChannelModeInvite('I')); continue; } } @@ -929,7 +929,7 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'k': - ModeManager::AddChannelMode('k', new ChannelModeKey()); + ModeManager::AddChannelMode(new ChannelModeKey('k')); continue; } } @@ -940,12 +940,13 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'f': - ModeManager::AddChannelMode('f', new ChannelModeFlood()); + ModeManager::AddChannelMode(new ChannelModeFlood('f')); + continue; case 'l': - ModeManager::AddChannelMode('l', new ChannelModeParam(CMODE_LIMIT, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_LIMIT, 'l', true)); continue; case 'L': - ModeManager::AddChannelMode('L', new ChannelModeParam(CMODE_REDIRECT, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_REDIRECT, 'L', true)); continue; } } @@ -956,64 +957,64 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'i': - ModeManager::AddChannelMode('i', new ChannelMode(CMODE_INVITE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_INVITE, 'i')); continue; case 'm': - ModeManager::AddChannelMode('m', new ChannelMode(CMODE_MODERATED)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_MODERATED, 'm')); continue; case 'n': - ModeManager::AddChannelMode('n', new ChannelMode(CMODE_NOEXTERNAL)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOEXTERNAL, 'n')); continue; case 'p': - ModeManager::AddChannelMode('p', new ChannelMode(CMODE_PRIVATE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_PRIVATE, 'p')); continue; case 's': - ModeManager::AddChannelMode('s', new ChannelMode(CMODE_SECRET)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SECRET, 's')); continue; case 't': - ModeManager::AddChannelMode('t', new ChannelMode(CMODE_TOPIC)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_TOPIC, 't')); continue; case 'r': - ModeManager::AddChannelMode('r', new ChannelModeRegistered()); + ModeManager::AddChannelMode(new ChannelModeRegistered('r')); continue; case 'c': - ModeManager::AddChannelMode('c', new ChannelMode(CMODE_BLOCKCOLOR)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCOLOR, 'c')); continue; case 'u': - ModeManager::AddChannelMode('u', new ChannelMode(CMODE_AUDITORIUM)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_AUDITORIUM, 'u')); continue; case 'z': - ModeManager::AddChannelMode('z', new ChannelMode(CMODE_SSL)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SSL, 'z')); continue; case 'A': - ModeManager::AddChannelMode('A', new ChannelMode(CMODE_ALLINVITE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_ALLINVITE, 'A')); continue; case 'C': - ModeManager::AddChannelMode('C', new ChannelMode(CMODE_NOCTCP)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOCTCP, 'C')); continue; case 'G': - ModeManager::AddChannelMode('G', new ChannelMode(CMODE_FILTER)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_FILTER, 'G')); continue; case 'K': - ModeManager::AddChannelMode('K', new ChannelMode(CMODE_NOKNOCK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOKNOCK, 'K')); continue; case 'N': - ModeManager::AddChannelMode('N', new ChannelMode(CMODE_NONICK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NONICK, 'N')); continue; case 'O': - ModeManager::AddChannelMode('O', new ChannelModeOper()); + ModeManager::AddChannelMode(new ChannelModeOper('O')); continue; case 'Q': - ModeManager::AddChannelMode('Q', new ChannelMode(CMODE_NOKICK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOKICK, 'Q')); continue; case 'R': - ModeManager::AddChannelMode('R', new ChannelMode(CMODE_REGISTEREDONLY)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_REGISTEREDONLY, 'R')); continue; case 'S': - ModeManager::AddChannelMode('S', new ChannelMode(CMODE_STRIPCOLOR)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_STRIPCOLOR, 'S')); continue; case 'V': - ModeManager::AddChannelMode('V', new ChannelMode(CMODE_NOINVITE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOINVITE, 'V')); continue; } } @@ -1028,19 +1029,19 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modes[t]) { case 'q': - ModeManager::AddChannelMode('q', new ChannelModeStatus(CMODE_OWNER, '~')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OWNER, 'q', '~')); continue; case 'a': - ModeManager::AddChannelMode('a', new ChannelModeStatus(CMODE_PROTECT, '&')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_PROTECT, 'a', '&')); continue; case 'o': - ModeManager::AddChannelMode('o', new ChannelModeStatus(CMODE_OP, '@')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OP, 'o', '@')); continue; case 'h': - ModeManager::AddChannelMode('h', new ChannelModeStatus(CMODE_HALFOP, '%')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_HALFOP, 'h', '%')); continue; case 'v': - ModeManager::AddChannelMode('v', new ChannelModeStatus(CMODE_VOICE, '+')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_VOICE, 'v', '+')); continue; } } @@ -1141,13 +1142,13 @@ bool ChannelModeFlood::IsValid(const std::string &value) static void AddModes() { - ModeManager::AddUserMode('g', new UserMode(UMODE_CALLERID)); - ModeManager::AddUserMode('h', new UserMode(UMODE_HELPOP)); - ModeManager::AddUserMode('i', new UserMode(UMODE_INVIS)); - ModeManager::AddUserMode('o', new UserMode(UMODE_OPER)); - ModeManager::AddUserMode('r', new UserMode(UMODE_REGISTERED)); - ModeManager::AddUserMode('w', new UserMode(UMODE_WALLOPS)); - ModeManager::AddUserMode('x', new UserMode(UMODE_CLOAK)); + ModeManager::AddUserMode(new UserMode(UMODE_CALLERID, 'g')); + ModeManager::AddUserMode(new UserMode(UMODE_HELPOP, 'h')); + ModeManager::AddUserMode(new UserMode(UMODE_INVIS, 'i')); + ModeManager::AddUserMode(new UserMode(UMODE_OPER, 'o')); + ModeManager::AddUserMode(new UserMode(UMODE_REGISTERED, 'r')); + ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w')); + ModeManager::AddUserMode(new UserMode(UMODE_CLOAK, 'x')); } class ProtoInspIRCd : public Module diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 698cc86ea..98d993eec 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -1003,16 +1003,13 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'b': - ModeManager::AddChannelMode('b', new ChannelModeBan()); + ModeManager::AddChannelMode(new ChannelModeBan('b')); continue; case 'e': - ModeManager::AddChannelMode('e', new ChannelModeExcept()); + ModeManager::AddChannelMode(new ChannelModeExcept('e')); continue; case 'I': - ModeManager::AddChannelMode('I', new ChannelModeInvite()); - continue; - case 'g': - ModeManager::AddUserMode('g', new UserMode(UMODE_CALLERID)); + ModeManager::AddChannelMode(new ChannelModeInvite('I')); continue; } } @@ -1023,7 +1020,7 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'k': - ModeManager::AddChannelMode('k', new ChannelModeKey()); + ModeManager::AddChannelMode(new ChannelModeKey('k')); continue; } } @@ -1034,22 +1031,22 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'F': - ModeManager::AddChannelMode('F', new ChannelModeParam(CMODE_NICKFLOOD, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_NICKFLOOD, 'F', true)); continue; case 'J': - ModeManager::AddChannelMode('J', new ChannelModeParam(CMODE_JOINFLOOD, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_JOINFLOOD, 'J', true)); continue; case 'L': - ModeManager::AddChannelMode('L', new ChannelModeParam(CMODE_REDIRECT, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_REDIRECT, true)); continue; case 'f': - ModeManager::AddChannelMode('f', new ChannelModeFlood()); + ModeManager::AddChannelMode(new ChannelModeFlood('f')); continue; case 'j': - ModeManager::AddChannelMode('j', new ChannelModeParam(CMODE_JOINFLOOD, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_JOINFLOOD, 'j', true)); continue; case 'l': - ModeManager::AddChannelMode('l', new ChannelModeParam(CMODE_LIMIT, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_LIMIT, 'l', true)); continue; } } @@ -1060,76 +1057,73 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'A': - ModeManager::AddChannelMode('A', new ChannelMode(CMODE_ALLINVITE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_ALLINVITE, 'A')); continue; case 'B': - ModeManager::AddChannelMode('B', new ChannelMode(CMODE_BLOCKCAPS)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCAPS, 'B')); continue; case 'C': - ModeManager::AddChannelMode('C', new ChannelMode(CMODE_NOCTCP)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOCTCP, 'C')); continue; case 'D': - ModeManager::AddChannelMode('D', new ChannelMode(CMODE_DELAYEDJOIN)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_DELAYEDJOIN, 'D')); continue; case 'G': - ModeManager::AddChannelMode('G', new ChannelMode(CMODE_FILTER)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_FILTER, 'G')); continue; case 'K': - ModeManager::AddChannelMode('K', new ChannelMode(CMODE_NOKNOCK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOKNOCK, 'K')); continue; case 'M': - ModeManager::AddChannelMode('M', new ChannelMode(CMODE_REGMODERATED)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_REGMODERATED, 'M')); continue; case 'N': - ModeManager::AddChannelMode('N', new ChannelMode(CMODE_NONICK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NONICK, 'N')); continue; case 'O': - ModeManager::AddChannelMode('O', new ChannelModeOper()); + ModeManager::AddChannelMode(new ChannelModeOper('O')); continue; case 'P': - ModeManager::AddChannelMode('P', new ChannelMode(CMODE_PERM)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_PERM, 'P')); continue; case 'Q': - ModeManager::AddChannelMode('Q', new ChannelMode(CMODE_NOKICK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOKICK, 'Q')); continue; case 'R': - ModeManager::AddUserMode('R', new UserMode(UMODE_REGPRIV)); + ModeManager::AddUserMode(new UserMode(UMODE_REGPRIV, 'R')); continue; case 'S': - ModeManager::AddChannelMode('S', new ChannelMode(CMODE_STRIPCOLOR)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_STRIPCOLOR, 'S')); continue; case 'T': - ModeManager::AddChannelMode('T', new ChannelMode(CMODE_NONOTICE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NONOTICE, 'T')); continue; case 'i': - ModeManager::AddChannelMode('i', new ChannelMode(CMODE_INVITE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_INVITE, 'i')); continue; case 'm': - ModeManager::AddChannelMode('m', new ChannelMode(CMODE_MODERATED)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_MODERATED, 'm')); continue; case 'n': - ModeManager::AddChannelMode('n', new ChannelMode(CMODE_NOEXTERNAL)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOEXTERNAL, 'n')); continue; case 'p': - ModeManager::AddChannelMode('p', new ChannelMode(CMODE_PRIVATE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_PRIVATE, 'p')); continue; case 'r': - ModeManager::AddChannelMode('r', new ChannelModeRegistered()); + ModeManager::AddChannelMode(new ChannelModeRegistered('r')); continue; case 's': - ModeManager::AddChannelMode('s', new ChannelMode(CMODE_SECRET)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SECRET, 's')); continue; case 't': - ModeManager::AddChannelMode('t', new ChannelMode(CMODE_TOPIC)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_TOPIC, 't')); continue; case 'u': - ModeManager::AddChannelMode('u', new ChannelMode(CMODE_AUDITORIUM)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_AUDITORIUM, 'u')); continue; case 'z': - ModeManager::AddChannelMode('u', new ChannelMode(CMODE_AUDITORIUM)); - continue; - case 'h': - ModeManager::AddUserMode('h', new UserMode(UMODE_HELPOP)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SSL, 'z')); continue; } } @@ -1147,58 +1141,58 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 's': - ModeManager::AddUserMode('S', new UserMode(UMODE_STRIPCOLOR)); + ModeManager::AddUserMode(new UserMode(UMODE_STRIPCOLOR, 'S')); continue; case 'B': - ModeManager::AddUserMode('B', new UserMode(UMODE_BOT)); + ModeManager::AddUserMode(new UserMode(UMODE_BOT, 'B')); continue; case 'G': - ModeManager::AddUserMode('G', new UserMode(UMODE_FILTER)); + ModeManager::AddUserMode(new UserMode(UMODE_FILTER, 'G')); continue; case 'H': - ModeManager::AddUserMode('H', new UserMode(UMODE_HIDEOPER)); + ModeManager::AddUserMode(new UserMode(UMODE_HIDEOPER, 'H')); continue; case 'I': - ModeManager::AddUserMode('I', new UserMode(UMODE_PRIV)); + ModeManager::AddUserMode(new UserMode(UMODE_PRIV, 'I')); continue; case 'Q': - ModeManager::AddUserMode('Q', new UserMode(UMODE_HIDDEN)); + ModeManager::AddUserMode(new UserMode(UMODE_HIDDEN, 'Q')); continue; case 'R': - ModeManager::AddUserMode('R', new UserMode(UMODE_REGPRIV)); + ModeManager::AddUserMode(new UserMode(UMODE_REGPRIV, 'R')); continue; case 'S': - ModeManager::AddUserMode('S', new UserMode(UMODE_STRIPCOLOR)); + ModeManager::AddUserMode(new UserMode(UMODE_STRIPCOLOR, 'S')); continue; case 'W': - ModeManager::AddUserMode('W', new UserMode(UMODE_WHOIS)); + ModeManager::AddUserMode(new UserMode(UMODE_WHOIS, 'W')); continue; case 'c': - ModeManager::AddUserMode('c', new UserMode(UMODE_COMMONCHANS)); + ModeManager::AddUserMode(new UserMode(UMODE_COMMONCHANS, 'c')); continue; case 'g': - ModeManager::AddUserMode('g', new UserMode(UMODE_CALLERID)); + ModeManager::AddUserMode(new UserMode(UMODE_CALLERID, 'g')); continue; case 'i': - ModeManager::AddUserMode('i', new UserMode(UMODE_INVIS)); + ModeManager::AddUserMode(new UserMode(UMODE_INVIS, 'i')); continue; case 'k': - ModeManager::AddUserMode('k', new UserMode(UMODE_PROTECTED)); + ModeManager::AddUserMode(new UserMode(UMODE_PROTECTED, 'k')); continue; case 'o': - ModeManager::AddUserMode('o', new UserMode(UMODE_OPER)); + ModeManager::AddUserMode(new UserMode(UMODE_OPER, 'o')); continue; case 'r': - ModeManager::AddUserMode('r', new UserMode(UMODE_REGISTERED)); + ModeManager::AddUserMode(new UserMode(UMODE_REGISTERED, 'r')); continue; case 'w': - ModeManager::AddUserMode('w', new UserMode(UMODE_WALLOPS)); + ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w')); continue; case 'x': - ModeManager::AddUserMode('x', new UserMode(UMODE_CLOAK)); + ModeManager::AddUserMode(new UserMode(UMODE_CLOAK, 'x')); continue; case 'd': - ModeManager::AddUserMode('d', new UserMode(UMODE_DEAF)); + ModeManager::AddUserMode(new UserMode(UMODE_DEAF, 'd')); continue; } } @@ -1214,19 +1208,19 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modes[t]) { case 'q': - ModeManager::AddChannelMode('q', new ChannelModeStatus(CMODE_OWNER, chars[t])); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OWNER, 'q', chars[t])); continue; case 'a': - ModeManager::AddChannelMode('a', new ChannelModeStatus(CMODE_PROTECT, chars[t])); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_PROTECT, 'a', chars[t])); continue; case 'o': - ModeManager::AddChannelMode('o', new ChannelModeStatus(CMODE_OP, chars[t])); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OP, 'o', chars[t])); continue; case 'h': - ModeManager::AddChannelMode('h', new ChannelModeStatus(CMODE_HALFOP, chars[t])); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_HALFOP, 'h', chars[t])); continue; case 'v': - ModeManager::AddChannelMode('v', new ChannelModeStatus(CMODE_VOICE, chars[t])); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_VOICE, 'v', chars[t])); continue; } } diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c index 3fd7315fe..61eb1518d 100644 --- a/src/protocol/ratbox.c +++ b/src/protocol/ratbox.c @@ -848,31 +848,31 @@ void moduleAddIRCDMsgs() void moduleAddModes() { /* Add user modes */ - ModeManager::AddUserMode('a', new UserMode(UMODE_ADMIN)); - ModeManager::AddUserMode('i', new UserMode(UMODE_INVIS)); - ModeManager::AddUserMode('o', new UserMode(UMODE_OPER)); - ModeManager::AddUserMode('r', new UserMode(UMODE_REGISTERED)); - ModeManager::AddUserMode('s', new UserMode(UMODE_SNOMASK)); - ModeManager::AddUserMode('w', new UserMode(UMODE_WALLOPS)); + ModeManager::AddUserMode(new UserMode(UMODE_ADMIN, 'a')); + ModeManager::AddUserMode(new UserMode(UMODE_INVIS, 'i')); + ModeManager::AddUserMode(new UserMode(UMODE_OPER, 'o')); + ModeManager::AddUserMode(new UserMode(UMODE_REGISTERED, 'r')); + ModeManager::AddUserMode(new UserMode(UMODE_SNOMASK, 's')); + ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w')); /* b/e/I */ - ModeManager::AddChannelMode('b', new ChannelModeBan()); - ModeManager::AddChannelMode('e', new ChannelModeExcept()); - ModeManager::AddChannelMode('I', new ChannelModeInvite()); + ModeManager::AddChannelMode(new ChannelModeBan('b')); + ModeManager::AddChannelMode(new ChannelModeExcept('e')); + ModeManager::AddChannelMode(new ChannelModeInvite('I')); /* v/h/o/a/q */ - ModeManager::AddChannelMode('v', new ChannelModeStatus(CMODE_VOICE, '+')); - ModeManager::AddChannelMode('o', new ChannelModeStatus(CMODE_OP, '@')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_VOICE, 'v', '+')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OP, 'o', '@')); /* Add channel modes */ - ModeManager::AddChannelMode('i', new ChannelMode(CMODE_INVITE)); - ModeManager::AddChannelMode('k', new ChannelModeKey()); - ModeManager::AddChannelMode('l', new ChannelModeParam(CMODE_LIMIT)); - ModeManager::AddChannelMode('m', new ChannelMode(CMODE_MODERATED)); - ModeManager::AddChannelMode('n', new ChannelMode(CMODE_NOEXTERNAL)); - ModeManager::AddChannelMode('p', new ChannelMode(CMODE_PRIVATE)); - ModeManager::AddChannelMode('s', new ChannelMode(CMODE_SECRET)); - ModeManager::AddChannelMode('t', new ChannelMode(CMODE_TOPIC)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_INVITE, 'i')); + ModeManager::AddChannelMode(new ChannelModeKey('k')); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_LIMIT, 'l')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_MODERATED, 'm')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOEXTERNAL, 'n')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_PRIVATE, 'p')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SECRET, 's')); + ModeManager::AddChannelMode(new ChannelMode(CMODE_TOPIC, 't')); } class ProtoRatbox : public Module diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index 4016a5f18..35ced626c 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -457,13 +457,13 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'b': - ModeManager::AddChannelMode('b', new ChannelModeBan()); + ModeManager::AddChannelMode(new ChannelModeBan('b')); continue; case 'e': - ModeManager::AddChannelMode('e', new ChannelModeExcept()); + ModeManager::AddChannelMode(new ChannelModeExcept('e')); continue; case 'I': - ModeManager::AddChannelMode('I', new ChannelModeInvite()); + ModeManager::AddChannelMode(new ChannelModeInvite('I')); continue; } } @@ -474,13 +474,13 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'k': - ModeManager::AddChannelMode('k', new ChannelModeKey()); + ModeManager::AddChannelMode(new ChannelModeKey('k')); continue; case 'f': - ModeManager::AddChannelMode('f', new ChannelModeFlood()); + ModeManager::AddChannelMode(new ChannelModeFlood('f')); continue; case 'L': - ModeManager::AddChannelMode('L', new ChannelModeParam(CMODE_REDIRECT)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_REDIRECT, 'L')); continue; } } @@ -491,10 +491,10 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'l': - ModeManager::AddChannelMode('l', new ChannelModeParam(CMODE_LIMIT, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_LIMIT, 'l', true)); continue; case 'j': - ModeManager::AddChannelMode('j', new ChannelModeParam(CMODE_JOINFLOOD, true)); + ModeManager::AddChannelMode(new ChannelModeParam(CMODE_JOINFLOOD, 'j', true)); continue; } } @@ -505,70 +505,70 @@ int anope_event_capab(const char *source, int ac, const char **av) switch (modebuf[t]) { case 'p': - ModeManager::AddChannelMode('p', new ChannelMode(CMODE_PRIVATE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_PRIVATE, 'p')); continue; case 's': - ModeManager::AddChannelMode('s', new ChannelMode(CMODE_SECRET)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SECRET, 's')); continue; case 'm': - ModeManager::AddChannelMode('m', new ChannelMode(CMODE_MODERATED)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_MODERATED, 'm')); continue; case 'n': - ModeManager::AddChannelMode('n', new ChannelMode(CMODE_NOEXTERNAL)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOEXTERNAL, 'n')); continue; case 't': - ModeManager::AddChannelMode('t', new ChannelMode(CMODE_TOPIC)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_TOPIC, 't')); continue; case 'i': - ModeManager::AddChannelMode('i', new ChannelMode(CMODE_INVITE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_INVITE, 'i')); continue; case 'r': - ModeManager::AddChannelMode('r', new ChannelModeRegistered()); + ModeManager::AddChannelMode(new ChannelModeRegistered('r')); continue; case 'R': - ModeManager::AddChannelMode('R', new ChannelMode(CMODE_REGISTEREDONLY)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_REGISTEREDONLY, 'R')); continue; case 'c': - ModeManager::AddChannelMode('c', new ChannelMode(CMODE_BLOCKCOLOR)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCOLOR, 'c')); continue; case 'O': - ModeManager::AddChannelMode('O', new ChannelModeOper()); + ModeManager::AddChannelMode(new ChannelModeOper('O')); continue; case 'A': - ModeManager::AddChannelMode('A', new ChannelModeAdmin()); + ModeManager::AddChannelMode(new ChannelModeAdmin('A')); continue; case 'Q': - ModeManager::AddChannelMode('Q', new ChannelMode(CMODE_NOKICK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOKICK, 'Q')); continue; case 'K': - ModeManager::AddChannelMode('K', new ChannelMode(CMODE_NOKNOCK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOKNOCK, 'K')); continue; case 'V': - ModeManager::AddChannelMode('V', new ChannelMode(CMODE_NOINVITE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOINVITE, 'V')); continue; case 'C': - ModeManager::AddChannelMode('C', new ChannelMode(CMODE_NOCTCP)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NOCTCP, 'C')); continue; case 'u': - ModeManager::AddChannelMode('u', new ChannelMode(CMODE_AUDITORIUM)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_AUDITORIUM, 'u')); continue; case 'z': - ModeManager::AddChannelMode('z', new ChannelMode(CMODE_SSL)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_SSL, 'z')); continue; case 'N': - ModeManager::AddChannelMode('N', new ChannelMode(CMODE_NONICK)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NONICK, 'N')); continue; case 'S': - ModeManager::AddChannelMode('S', new ChannelMode(CMODE_STRIPCOLOR)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_STRIPCOLOR, 'S')); continue; case 'M': - ModeManager::AddChannelMode('M', new ChannelMode(CMODE_REGMODERATED)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_REGMODERATED, 'M')); continue; case 'T': - ModeManager::AddChannelMode('T', new ChannelMode(CMODE_NONOTICE)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_NONOTICE, 'T')); continue; case 'G': - ModeManager::AddChannelMode('G', new ChannelMode(CMODE_FILTER)); + ModeManager::AddChannelMode(new ChannelMode(CMODE_FILTER, 'G')); continue; } } @@ -1319,39 +1319,39 @@ bool ChannelModeFlood::IsValid(const std::string &value2) static void AddModes() { - ModeManager::AddChannelMode('v', new ChannelModeStatus(CMODE_VOICE, '+')); - ModeManager::AddChannelMode('h', new ChannelModeStatus(CMODE_HALFOP, '%')); - ModeManager::AddChannelMode('o', new ChannelModeStatus(CMODE_OP, '@')); - ModeManager::AddChannelMode('a', new ChannelModeStatus(CMODE_PROTECT, '&')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_VOICE, 'v', '+')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_HALFOP, 'h', '%')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OP, 'o', '@')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_PROTECT, 'a', '&')); /* Unreal sends +q as * */ - ModeManager::AddChannelMode('q', new ChannelModeStatus(CMODE_OWNER, '*')); + ModeManager::AddChannelMode(new ChannelModeStatus(CMODE_OWNER, 'q', '*')); /* Add user modes */ - ModeManager::AddUserMode('A', new UserMode(UMODE_SERV_ADMIN)); - ModeManager::AddUserMode('B', new UserMode(UMODE_BOT)); - ModeManager::AddUserMode('C', new UserMode(UMODE_CO_ADMIN)); - ModeManager::AddUserMode('G', new UserMode(UMODE_FILTER)); - ModeManager::AddUserMode('H', new UserMode(UMODE_HIDEOPER)); - ModeManager::AddUserMode('N', new UserMode(UMODE_NETADMIN)); - ModeManager::AddUserMode('R', new UserMode(UMODE_REGPRIV)); - ModeManager::AddUserMode('S', new UserMode(UMODE_PROTECTED)); - ModeManager::AddUserMode('T', new UserMode(UMODE_NO_CTCP)); - ModeManager::AddUserMode('V', new UserMode(UMODE_WEBTV)); - ModeManager::AddUserMode('W', new UserMode(UMODE_WHOIS)); - ModeManager::AddUserMode('a', new UserMode(UMODE_ADMIN)); - ModeManager::AddUserMode('d', new UserMode(UMODE_DEAF)); - ModeManager::AddUserMode('g', new UserMode(UMODE_GLOBOPS)); - ModeManager::AddUserMode('h', new UserMode(UMODE_HELPOP)); - ModeManager::AddUserMode('i', new UserMode(UMODE_INVIS)); - ModeManager::AddUserMode('o', new UserMode(UMODE_OPER)); - ModeManager::AddUserMode('p', new UserMode(UMODE_PRIV)); - ModeManager::AddUserMode('q', new UserMode(UMODE_GOD)); - ModeManager::AddUserMode('r', new UserMode(UMODE_REGISTERED)); - ModeManager::AddUserMode('s', new UserMode(UMODE_SNOMASK)); - ModeManager::AddUserMode('t', new UserMode(UMODE_VHOST)); - ModeManager::AddUserMode('w', new UserMode(UMODE_WALLOPS)); - ModeManager::AddUserMode('x', new UserMode(UMODE_CLOAK)); - ModeManager::AddUserMode('z', new UserMode(UMODE_SSL)); + ModeManager::AddUserMode(new UserMode(UMODE_SERV_ADMIN, 'A')); + ModeManager::AddUserMode(new UserMode(UMODE_BOT, 'B')); + ModeManager::AddUserMode(new UserMode(UMODE_CO_ADMIN, 'C')); + ModeManager::AddUserMode(new UserMode(UMODE_FILTER, 'G')); + ModeManager::AddUserMode(new UserMode(UMODE_HIDEOPER, 'H')); + ModeManager::AddUserMode(new UserMode(UMODE_NETADMIN, 'N')); + ModeManager::AddUserMode(new UserMode(UMODE_REGPRIV, 'R')); + ModeManager::AddUserMode(new UserMode(UMODE_PROTECTED, 'S')); + ModeManager::AddUserMode(new UserMode(UMODE_NO_CTCP, 'T')); + ModeManager::AddUserMode(new UserMode(UMODE_WEBTV, 'V')); + ModeManager::AddUserMode(new UserMode(UMODE_WHOIS, 'W')); + ModeManager::AddUserMode(new UserMode(UMODE_ADMIN, 'a')); + ModeManager::AddUserMode(new UserMode(UMODE_DEAF, 'd')); + ModeManager::AddUserMode(new UserMode(UMODE_GLOBOPS, 'g')); + ModeManager::AddUserMode(new UserMode(UMODE_HELPOP, 'h')); + ModeManager::AddUserMode(new UserMode(UMODE_INVIS, 'i')); + ModeManager::AddUserMode(new UserMode(UMODE_OPER, 'o')); + ModeManager::AddUserMode(new UserMode(UMODE_PRIV, 'p')); + ModeManager::AddUserMode(new UserMode(UMODE_GOD, 'q')); + ModeManager::AddUserMode(new UserMode(UMODE_REGISTERED, 'r')); + ModeManager::AddUserMode(new UserMode(UMODE_SNOMASK, 's')); + ModeManager::AddUserMode(new UserMode(UMODE_VHOST, 't')); + ModeManager::AddUserMode(new UserMode(UMODE_WALLOPS, 'w')); + ModeManager::AddUserMode(new UserMode(UMODE_CLOAK, 'x')); + ModeManager::AddUserMode(new UserMode(UMODE_SSL, 'z')); } class ProtoUnreal : public Module |