diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-08 23:34:01 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-08 23:34:01 +0000 |
commit | c4d6ce8c5e1802e5b834d5845e31c3adf7700585 (patch) | |
tree | ca3e729b91e7f01f240d90d40665cb764d4f474e | |
parent | 7e843c22e16c81054bad18073d24fe1a07026431 (diff) |
Add names for all modes (part 1 of named channel mode list)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11809 e03df62e-2008-0410-955e-edbf42e46eb7
58 files changed, 79 insertions, 87 deletions
diff --git a/include/mode.h b/include/mode.h index 1b02efeaa..beb493810 100644 --- a/include/mode.h +++ b/include/mode.h @@ -116,7 +116,7 @@ class CoreExport ModeHandler : public classbase /** * The mode letter you're implementing. */ - char mode; + const char mode; /** Mode prefix, or 0 */ @@ -158,28 +158,20 @@ class CoreExport ModeHandler : public classbase public: /** Module that created this mode. NULL for core modes */ Module* const creator; + /** Long-form name + */ + const std::string name; /** * The constructor for ModeHandler initalizes the mode handler. * The constructor of any class you derive from ModeHandler should * probably call this constructor with the parameters set correctly. + * @param name A one-word name for the mode * @param modeletter The mode letter you wish to handle - * @param parameters_on The number of parameters your mode takes when being set. Note that any nonzero value is treated as 1. - * @param parameters_off The number of parameters your mode takes when being unset. Note that any nonzero value is treated as 1. - * @param listmode Set to true if your mode is a listmode, e.g. it will respond to MODE #channel +modechar with a list of items - * @param ModeType Set this to MODETYPE_USER for a usermode, or MODETYPE_CHANNEL for a channelmode. - * @param operonly Set this to true if only opers should be allowed to set or unset the mode. - * @param mprefix For listmodes where parameters are NICKNAMES which are on the channel (for example, +ohv), you may define a prefix. - * When you define a prefix, it can be returned in NAMES, WHO etc if it has the highest value (as returned by GetPrefixRank()) - * In the core, the only modes to implement prefixes are +ovh (ops, voice, halfop) which define the prefix characters @, % and + - * and the rank values OP_VALUE, HALFOP_VALUE and VOICE_VALUE respectively. Any prefixes you define should have unique values proportional - * to these three defaults or proportional to another mode in a module you depend on. See src/cmode_o.cpp as an example. - * @param prefixrequired The prefix required to change this mode - */ - ModeHandler(Module* me, char modeletter, ParamSpec params, ModeType type); - /** - * The default destructor does nothing + * @param params Parameters taken by the mode + * @param type Type of the mode (MODETYPE_USER or MODETYPE_CHANNEL) */ + ModeHandler(Module* me, const std::string& name, char modeletter, ParamSpec params, ModeType type); virtual ~ModeHandler(); /** * Returns true if the mode is a list mode @@ -338,8 +330,8 @@ class CoreExport ModeHandler : public classbase class CoreExport SimpleUserModeHandler : public ModeHandler { public: - SimpleUserModeHandler(Module* Creator, char modeletter) - : ModeHandler(Creator, modeletter, PARAM_NONE, MODETYPE_USER) {} + SimpleUserModeHandler(Module* Creator, const std::string& Name, char modeletter) + : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_USER) {} virtual ~SimpleUserModeHandler() {} virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); }; @@ -352,8 +344,8 @@ class CoreExport SimpleUserModeHandler : public ModeHandler class CoreExport SimpleChannelModeHandler : public ModeHandler { public: - SimpleChannelModeHandler(Module* Creator, char modeletter) - : ModeHandler(Creator, modeletter, PARAM_NONE, MODETYPE_CHANNEL) {} + SimpleChannelModeHandler(Module* Creator, const std::string& Name, char modeletter) + : ModeHandler(Creator, Name, modeletter, PARAM_NONE, MODETYPE_CHANNEL) {} virtual ~SimpleChannelModeHandler() {} virtual ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); }; diff --git a/include/u_listmode.h b/include/u_listmode.h index 86749b8ab..981e2a369 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -88,10 +88,10 @@ class ListModeBase : public ModeHandler * @param autotidy Automatically tidy list entries on add * @param ctag Configuration tag to get limits from */ - ListModeBase(Module* Creator, char modechar, const std::string &eolstr, unsigned int lnum, unsigned int eolnum, bool autotidy, const std::string &ctag = "banlist") - : ModeHandler(Creator, modechar, PARAM_ALWAYS, MODETYPE_CHANNEL), + ListModeBase(Module* Creator, const std::string& Name, char modechar, const std::string &eolstr, unsigned int lnum, unsigned int eolnum, bool autotidy, const std::string &ctag = "banlist") + : ModeHandler(Creator, Name, modechar, PARAM_ALWAYS, MODETYPE_CHANNEL), listnumeric(lnum), endoflistnumeric(eolnum), endofliststring(eolstr), tidy(autotidy), - configtag(ctag), extItem("listbase_mode_" + std::string(1, mode) + "_list", Creator) + configtag(ctag), extItem("listbase_mode_" + name + "_list", Creator) { list = true; this->DoRehash(); diff --git a/src/mode.cpp b/src/mode.cpp index 5bb1dab8e..c37407223 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -49,9 +49,9 @@ /* +s (server notice masks) */ #include "modes/umode_s.h" -ModeHandler::ModeHandler(Module* Creator, char modeletter, ParamSpec Params, ModeType type) +ModeHandler::ModeHandler(Module* Creator, const std::string& Name, char modeletter, ParamSpec Params, ModeType type) : m_paramtype(TR_TEXT), parameters_taken(Params), mode(modeletter), prefix(0), oper(false), - list(false), m_type(type), count(0), levelrequired(HALFOP_VALUE), creator(Creator) + list(false), m_type(type), count(0), levelrequired(HALFOP_VALUE), creator(Creator), name(Name) { } diff --git a/src/modes/cmode_b.cpp b/src/modes/cmode_b.cpp index 119660ff5..477d87544 100644 --- a/src/modes/cmode_b.cpp +++ b/src/modes/cmode_b.cpp @@ -25,7 +25,7 @@ #include "hashcomp.h" #include "modes/cmode_b.h" -ModeChannelBan::ModeChannelBan() : ModeHandler(NULL, 'b', PARAM_ALWAYS, MODETYPE_CHANNEL) +ModeChannelBan::ModeChannelBan() : ModeHandler(NULL, "ban", 'b', PARAM_ALWAYS, MODETYPE_CHANNEL) { list = true; } diff --git a/src/modes/cmode_h.cpp b/src/modes/cmode_h.cpp index d5472c154..9ca050de2 100644 --- a/src/modes/cmode_h.cpp +++ b/src/modes/cmode_h.cpp @@ -19,7 +19,7 @@ #include "modules.h" #include "modes/cmode_h.h" -ModeChannelHalfOp::ModeChannelHalfOp() : ModeHandler(NULL, 'h', PARAM_ALWAYS, MODETYPE_CHANNEL) +ModeChannelHalfOp::ModeChannelHalfOp() : ModeHandler(NULL, "halfop", 'h', PARAM_ALWAYS, MODETYPE_CHANNEL) { list = true; prefix = '%'; diff --git a/src/modes/cmode_i.cpp b/src/modes/cmode_i.cpp index ac9245d62..3b79d6a15 100644 --- a/src/modes/cmode_i.cpp +++ b/src/modes/cmode_i.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_i.h" -ModeChannelInviteOnly::ModeChannelInviteOnly() : SimpleChannelModeHandler(NULL, 'i') +ModeChannelInviteOnly::ModeChannelInviteOnly() : SimpleChannelModeHandler(NULL, "invite", 'i') { } diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index 4105660d1..5b273cdd1 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_k.h" -ModeChannelKey::ModeChannelKey() : ModeHandler(NULL, 'k', PARAM_ALWAYS, MODETYPE_CHANNEL) +ModeChannelKey::ModeChannelKey() : ModeHandler(NULL, "key", 'k', PARAM_ALWAYS, MODETYPE_CHANNEL) { } diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp index d177150b6..0fddf2af0 100644 --- a/src/modes/cmode_l.cpp +++ b/src/modes/cmode_l.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_l.h" -ModeChannelLimit::ModeChannelLimit() : ModeHandler(NULL, 'l', PARAM_SETONLY, MODETYPE_CHANNEL) +ModeChannelLimit::ModeChannelLimit() : ModeHandler(NULL, "limit", 'l', PARAM_SETONLY, MODETYPE_CHANNEL) { } diff --git a/src/modes/cmode_m.cpp b/src/modes/cmode_m.cpp index 13f39fd79..f9851059e 100644 --- a/src/modes/cmode_m.cpp +++ b/src/modes/cmode_m.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_m.h" -ModeChannelModerated::ModeChannelModerated() : SimpleChannelModeHandler(NULL, 'm') +ModeChannelModerated::ModeChannelModerated() : SimpleChannelModeHandler(NULL, "moderated", 'm') { } diff --git a/src/modes/cmode_n.cpp b/src/modes/cmode_n.cpp index 4aac083e0..3a30c329d 100644 --- a/src/modes/cmode_n.cpp +++ b/src/modes/cmode_n.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_n.h" -ModeChannelNoExternal::ModeChannelNoExternal() : SimpleChannelModeHandler(NULL, 'n') +ModeChannelNoExternal::ModeChannelNoExternal() : SimpleChannelModeHandler(NULL, "noextmsg", 'n') { } diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp index 8160a38a6..1bab9db26 100644 --- a/src/modes/cmode_o.cpp +++ b/src/modes/cmode_o.cpp @@ -19,7 +19,7 @@ #include "modules.h" #include "modes/cmode_o.h" -ModeChannelOp::ModeChannelOp() : ModeHandler(NULL, 'o', PARAM_ALWAYS, MODETYPE_CHANNEL) +ModeChannelOp::ModeChannelOp() : ModeHandler(NULL, "op", 'o', PARAM_ALWAYS, MODETYPE_CHANNEL) { list = true; prefix = '@'; diff --git a/src/modes/cmode_p.cpp b/src/modes/cmode_p.cpp index 92f44f18a..d44f7ce49 100644 --- a/src/modes/cmode_p.cpp +++ b/src/modes/cmode_p.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_p.h" -ModeChannelPrivate::ModeChannelPrivate() : SimpleChannelModeHandler(NULL, 'p') +ModeChannelPrivate::ModeChannelPrivate() : SimpleChannelModeHandler(NULL, "private", 'p') { } diff --git a/src/modes/cmode_s.cpp b/src/modes/cmode_s.cpp index 486520899..c5a922bde 100644 --- a/src/modes/cmode_s.cpp +++ b/src/modes/cmode_s.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_s.h" -ModeChannelSecret::ModeChannelSecret() : SimpleChannelModeHandler(NULL, 's') +ModeChannelSecret::ModeChannelSecret() : SimpleChannelModeHandler(NULL, "secret", 's') { } diff --git a/src/modes/cmode_t.cpp b/src/modes/cmode_t.cpp index 627717f33..b85922b06 100644 --- a/src/modes/cmode_t.cpp +++ b/src/modes/cmode_t.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/cmode_t.h" -ModeChannelTopicOps::ModeChannelTopicOps() : ModeHandler(NULL, 't', PARAM_NONE, MODETYPE_CHANNEL) +ModeChannelTopicOps::ModeChannelTopicOps() : ModeHandler(NULL, "topic", 't', PARAM_NONE, MODETYPE_CHANNEL) { } diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp index f744623a6..b791f5574 100644 --- a/src/modes/cmode_v.cpp +++ b/src/modes/cmode_v.cpp @@ -20,7 +20,7 @@ #include "modules.h" #include "modes/cmode_v.h" -ModeChannelVoice::ModeChannelVoice() : ModeHandler(NULL, 'v', PARAM_ALWAYS, MODETYPE_CHANNEL) +ModeChannelVoice::ModeChannelVoice() : ModeHandler(NULL, "voice", 'v', PARAM_ALWAYS, MODETYPE_CHANNEL) { list = true; prefix = '+'; diff --git a/src/modes/umode_i.cpp b/src/modes/umode_i.cpp index 515ffd10e..e652b803a 100644 --- a/src/modes/umode_i.cpp +++ b/src/modes/umode_i.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/umode_i.h" -ModeUserInvisible::ModeUserInvisible() : SimpleUserModeHandler(NULL, 'i') +ModeUserInvisible::ModeUserInvisible() : SimpleUserModeHandler(NULL, "invisible", 'i') { } diff --git a/src/modes/umode_o.cpp b/src/modes/umode_o.cpp index 3c0eb37a1..d5014fc68 100644 --- a/src/modes/umode_o.cpp +++ b/src/modes/umode_o.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/umode_o.h" -ModeUserOperator::ModeUserOperator() : ModeHandler(NULL, 'o', PARAM_NONE, MODETYPE_USER) +ModeUserOperator::ModeUserOperator() : ModeHandler(NULL, "oper", 'o', PARAM_NONE, MODETYPE_USER) { oper = true; } diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp index 9d4d09329..b85b92e92 100644 --- a/src/modes/umode_s.cpp +++ b/src/modes/umode_s.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/umode_s.h" -ModeUserServerNoticeMask::ModeUserServerNoticeMask() : ModeHandler(NULL, 's', PARAM_SETONLY, MODETYPE_USER) +ModeUserServerNoticeMask::ModeUserServerNoticeMask() : ModeHandler(NULL, "snomask", 's', PARAM_SETONLY, MODETYPE_USER) { oper = true; } diff --git a/src/modes/umode_w.cpp b/src/modes/umode_w.cpp index e1608169e..13656ec2d 100644 --- a/src/modes/umode_w.cpp +++ b/src/modes/umode_w.cpp @@ -17,7 +17,7 @@ #include "users.h" #include "modes/umode_w.h" -ModeUserWallops::ModeUserWallops() : SimpleUserModeHandler(NULL, 'w') +ModeUserWallops::ModeUserWallops() : SimpleUserModeHandler(NULL, "wallops", 'w') { } diff --git a/src/modules/m_allowinvite.cpp b/src/modules/m_allowinvite.cpp index 46e4fcf90..ae6c14c1f 100644 --- a/src/modules/m_allowinvite.cpp +++ b/src/modules/m_allowinvite.cpp @@ -18,7 +18,7 @@ class AllowInvite : public SimpleChannelModeHandler { public: - AllowInvite(Module* Creator) : SimpleChannelModeHandler(Creator, 'A') { } + AllowInvite(Module* Creator) : SimpleChannelModeHandler(Creator, "allowinvite", 'A') { } }; class ModuleAllowInvite : public Module diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index ec321bb35..d7a0f055c 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -18,7 +18,7 @@ class AuditoriumMode : public ModeHandler { public: - AuditoriumMode(Module* Creator) : ModeHandler(Creator, 'u', PARAM_NONE, MODETYPE_CHANNEL) + AuditoriumMode(Module* Creator) : ModeHandler(Creator, "auditorium", 'u', PARAM_NONE, MODETYPE_CHANNEL) { levelrequired = OP_VALUE; } diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 31e593fdf..aac8fe776 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -31,7 +31,7 @@ class BanException : public ListModeBase { public: - BanException(Module* Creator) : ListModeBase(Creator, 'e', "End of Channel Exception List", 348, 349, true) { } + BanException(Module* Creator) : ListModeBase(Creator, "banexception", 'e', "End of Channel Exception List", 348, 349, true) { } }; diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index 326ba9986..7a696035a 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -21,7 +21,7 @@ class BlockCaps : public SimpleChannelModeHandler { public: - BlockCaps(Module* Creator) : SimpleChannelModeHandler(Creator, 'B') { } + BlockCaps(Module* Creator) : SimpleChannelModeHandler(Creator, "blockcaps", 'B') { } }; class ModuleBlockCAPS : public Module diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index ce8325e45..eba648126 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -20,7 +20,7 @@ class BlockColor : public SimpleChannelModeHandler { public: - BlockColor(Module* Creator) : SimpleChannelModeHandler(Creator, 'c') { } + BlockColor(Module* Creator) : SimpleChannelModeHandler(Creator, "blockcolor", 'c') { } }; class ModuleBlockColour : public Module diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index cc792027c..c3d56fd8b 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -20,7 +20,7 @@ class BotMode : public SimpleUserModeHandler { public: - BotMode(Module* Creator) : SimpleUserModeHandler(Creator, 'B') { } + BotMode(Module* Creator) : SimpleUserModeHandler(Creator, "bot", 'B') { } }; class ModuleBotMode : public Module diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 4f7017a1b..ae3ec1450 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -128,7 +128,7 @@ struct CallerIDExtInfo : public ExtensionItem class User_g : public SimpleUserModeHandler { public: - User_g(Module* Creator) : SimpleUserModeHandler(Creator, 'g') { } + User_g(Module* Creator) : SimpleUserModeHandler(Creator, "callerid", 'g') { } }; class CommandAccept : public Command diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 62d7a54d0..fc640624c 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -26,7 +26,7 @@ typedef std::map<irc::string,irc::string> censor_t; class CensorUser : public SimpleUserModeHandler { public: - CensorUser(Module* Creator) : SimpleUserModeHandler(Creator, 'G') { } + CensorUser(Module* Creator) : SimpleUserModeHandler(Creator, "censor", 'G') { } }; /** Handles channel mode +G @@ -34,7 +34,7 @@ class CensorUser : public SimpleUserModeHandler class CensorChannel : public SimpleChannelModeHandler { public: - CensorChannel(Module* Creator) : SimpleChannelModeHandler(Creator, 'G') { } + CensorChannel(Module* Creator) : SimpleChannelModeHandler(Creator, "censor", 'G') { } }; class ModuleCensor : public Module diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index bae2143d7..d87de1207 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -25,7 +25,7 @@ class ChanFilter : public ListModeBase { public: - ChanFilter(Module* Creator) : ListModeBase(Creator, 'g', "End of channel spamfilter list", 941, 940, false, "chanfilter") { } + ChanFilter(Module* Creator) : ListModeBase(Creator, "filter", 'g', "End of channel spamfilter list", 941, 940, false, "chanfilter") { } virtual bool ValidateParam(User* user, Channel* chan, std::string &word) { diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index abfd98278..9164d9992 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -125,7 +125,7 @@ class ChanFounder : public ModeHandler, public FounderProtectBase { public: ChanFounder(Module* Creator) - : ModeHandler(Creator, 'q', PARAM_ALWAYS, MODETYPE_CHANNEL), + : ModeHandler(Creator, "founder", 'q', PARAM_ALWAYS, MODETYPE_CHANNEL), FounderProtectBase('q', "founder", 386, 387) { ModeHandler::list = true; @@ -196,7 +196,7 @@ class ChanProtect : public ModeHandler, public FounderProtectBase { public: ChanProtect(Module* Creator) - : ModeHandler(Creator, 'a', PARAM_ALWAYS, MODETYPE_CHANNEL), + : ModeHandler(Creator, "protected", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL), FounderProtectBase('a',"protected user", 388, 389) { ModeHandler::list = true; diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index ade4339b8..ddea8737c 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -64,7 +64,7 @@ class CloakUser : public ModeHandler } CloakUser(Module* source, Module* Hash) - : ModeHandler(source, 'x', PARAM_NONE, MODETYPE_USER), HashProvider(Hash), + : ModeHandler(source, "cloak", 'x', PARAM_NONE, MODETYPE_USER), HashProvider(Hash), ext("cloaked_host", source) { } diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index b6dc7af2c..4cddb651e 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -20,7 +20,7 @@ class PrivacyMode : public ModeHandler { public: - PrivacyMode(Module* Creator) : ModeHandler(Creator, 'c', PARAM_NONE, MODETYPE_USER) { } + PrivacyMode(Module* Creator) : ModeHandler(Creator, "deaf_commonchan", 'c', PARAM_NONE, MODETYPE_USER) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index 2d13be98b..d6b549de4 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -20,7 +20,7 @@ class User_d : public ModeHandler { public: - User_d(Module* Creator) : ModeHandler(Creator, 'd', PARAM_NONE, MODETYPE_USER) { } + User_d(Module* Creator) : ModeHandler(Creator, "deaf", 'd', PARAM_NONE, MODETYPE_USER) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 1db0e7c0d..5c545c2f6 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -19,7 +19,7 @@ class DelayJoinMode : public ModeHandler private: CUList empty; public: - DelayJoinMode(Module* Parent) : ModeHandler(Parent, 'D', PARAM_NONE, MODETYPE_CHANNEL) + DelayJoinMode(Module* Parent) : ModeHandler(Parent, "delayjoin", 'D', PARAM_NONE, MODETYPE_CHANNEL) { levelrequired = OP_VALUE; } diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index ecc1b5b5e..75a1df19a 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -22,7 +22,7 @@ class DelayMsgMode : public ModeHandler CUList empty; public: LocalIntExt jointime; - DelayMsgMode(Module* Parent) : ModeHandler(Parent, 'd', PARAM_SETONLY, MODETYPE_CHANNEL) + DelayMsgMode(Module* Parent) : ModeHandler(Parent, "delaymsg", 'd', PARAM_SETONLY, MODETYPE_CHANNEL) , jointime("delaymsg", Parent) { levelrequired = OP_VALUE; diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index c1b669d3f..716b9bfb7 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -22,7 +22,7 @@ static std::map<irc::string, std::string> helpop_map; class Helpop : public ModeHandler { public: - Helpop(Module* Creator) : ModeHandler(Creator, 'h', PARAM_NONE, MODETYPE_USER) + Helpop(Module* Creator) : ModeHandler(Creator, "helpop", 'h', PARAM_NONE, MODETYPE_USER) { oper = true; } diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index e5869f5e6..5af5c2b6f 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -20,7 +20,7 @@ class HideChans : public ModeHandler { public: - HideChans(Module* Creator) : ModeHandler(Creator, 'I', PARAM_NONE, MODETYPE_USER) { } + HideChans(Module* Creator) : ModeHandler(Creator, "hidechans", 'I', PARAM_NONE, MODETYPE_USER) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 62dbca127..b18172786 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -20,7 +20,7 @@ class HideOper : public ModeHandler { public: - HideOper(Module* Creator) : ModeHandler(Creator, 'H', PARAM_NONE, MODETYPE_USER) + HideOper(Module* Creator) : ModeHandler(Creator, "hideoper", 'H', PARAM_NONE, MODETYPE_USER) { oper = true; } diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index 1114949ee..12e0cfa84 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -19,7 +19,7 @@ class InvisibleMode : public ModeHandler { public: - InvisibleMode(Module* Creator) : ModeHandler(Creator, 'Q', PARAM_NONE, MODETYPE_USER) + InvisibleMode(Module* Creator) : ModeHandler(Creator, "invis-oper", 'Q', PARAM_NONE, MODETYPE_USER) { oper = true; } diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 91f4e22c8..7fe7d40dc 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -32,7 +32,7 @@ class InviteException : public ListModeBase { public: - InviteException(Module* Creator) : ListModeBase(Creator, 'I', "End of Channel Invite Exception List", 346, 347, true) { } + InviteException(Module* Creator) : ListModeBase(Creator, "invex", 'I', "End of Channel Invite Exception List", 346, 347, true) { } }; class ModuleInviteException : public Module diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 015954b73..2d15fee68 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -85,7 +85,7 @@ class JoinFlood : public ModeHandler { public: SimpleExtItem<joinfloodsettings> ext; - JoinFlood(Module* Creator) : ModeHandler(Creator, 'j', PARAM_SETONLY, MODETYPE_CHANNEL), + JoinFlood(Module* Creator) : ModeHandler(Creator, "joinflood", 'j', PARAM_SETONLY, MODETYPE_CHANNEL), ext("joinflood", Creator) { } ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index c8b3e059f..5a8233a8f 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -31,7 +31,7 @@ class KickRejoin : public ModeHandler { public: SimpleExtItem<delaylist> ext; - KickRejoin(Module* Creator) : ModeHandler(Creator, 'J', PARAM_SETONLY, MODETYPE_CHANNEL), + KickRejoin(Module* Creator) : ModeHandler(Creator, "kicknorejoin", 'J', PARAM_SETONLY, MODETYPE_CHANNEL), ext("norejoinusers", Creator) { } ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 4c0e02731..1d80781b0 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -77,7 +77,7 @@ class CommandKnock : public Command class Knock : public SimpleChannelModeHandler { public: - Knock(Module* Creator) : SimpleChannelModeHandler(Creator, 'K') { } + Knock(Module* Creator) : SimpleChannelModeHandler(Creator, "noknock", 'K') { } }; class ModuleKnock : public Module diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index da413516b..542aedd41 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -77,7 +77,7 @@ class MsgFlood : public ModeHandler { public: SimpleExtItem<floodsettings> ext; - MsgFlood(Module* Creator) : ModeHandler(Creator, 'f', PARAM_SETONLY, MODETYPE_CHANNEL), + MsgFlood(Module* Creator) : ModeHandler(Creator, "flood", 'f', PARAM_SETONLY, MODETYPE_CHANNEL), ext("messageflood", Creator) { } ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index 733b55b64..748ecf1d5 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -89,7 +89,7 @@ class NickFlood : public ModeHandler { public: SimpleExtItem<nickfloodsettings> ext; - NickFlood(Module* Creator) : ModeHandler(Creator, 'F', PARAM_SETONLY, MODETYPE_CHANNEL), + NickFlood(Module* Creator) : ModeHandler(Creator, "nickflood", 'F', PARAM_SETONLY, MODETYPE_CHANNEL), ext("nickflood", Creator) { } ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index b9f5d581b..5dfbf76d2 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -18,7 +18,7 @@ class NoCTCP : public ModeHandler { public: - NoCTCP(Module* Creator) : ModeHandler(Creator, 'C', PARAM_NONE, MODETYPE_CHANNEL) { } + NoCTCP(Module* Creator) : ModeHandler(Creator, "noctcp", 'C', PARAM_NONE, MODETYPE_CHANNEL) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index 157ec34f7..60935c30c 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -18,7 +18,7 @@ class NoKicks : public SimpleChannelModeHandler { public: - NoKicks(Module* Creator) : SimpleChannelModeHandler(Creator, 'Q') { } + NoKicks(Module* Creator) : SimpleChannelModeHandler(Creator, "nokick", 'Q') { } }; class ModuleNoKicks : public Module diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index eeea20941..e811b8e67 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -18,7 +18,7 @@ class NoNicks : public ModeHandler { public: - NoNicks(Module* Creator) : ModeHandler(Creator, 'N', PARAM_NONE, MODETYPE_CHANNEL) { } + NoNicks(Module* Creator) : ModeHandler(Creator, "nonick", 'N', PARAM_NONE, MODETYPE_CHANNEL) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index dcc69f997..169626e61 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -18,7 +18,7 @@ class NoNotice : public SimpleChannelModeHandler { public: - NoNotice(Module* Creator) : SimpleChannelModeHandler(Creator, 'T') { } + NoNotice(Module* Creator) : SimpleChannelModeHandler(Creator, "nonotice", 'T') { } }; class ModuleNoNotice : public Module diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index d64c5a267..d5f7b9443 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -95,7 +95,7 @@ class CommandOjoin : public Command class NetworkPrefix : public ModeHandler { public: - NetworkPrefix(Module* parent) : ModeHandler(parent, 'Y', PARAM_ALWAYS, MODETYPE_CHANNEL) + NetworkPrefix(Module* parent) : ModeHandler(parent, "official-join", 'Y', PARAM_ALWAYS, MODETYPE_CHANNEL) { list = true; prefix = NPrefix; diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index eecf4e1b9..e1d7d6f9a 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -19,7 +19,7 @@ class OperChans : public ModeHandler { public: /* This is an oper-only mode */ - OperChans(Module* Creator) : ModeHandler(Creator, 'O', PARAM_NONE, MODETYPE_CHANNEL) { oper = true; } + OperChans(Module* Creator) : ModeHandler(Creator, "operonly", 'O', PARAM_NONE, MODETYPE_CHANNEL) { oper = true; } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp index 3a5fa2e7f..0144e5c23 100644 --- a/src/modules/m_operprefix.cpp +++ b/src/modules/m_operprefix.cpp @@ -24,7 +24,7 @@ class OperPrefixMode : public ModeHandler { public: - OperPrefixMode(Module* Creator, char pfx) : ModeHandler(Creator, 'y', PARAM_ALWAYS, MODETYPE_CHANNEL) + OperPrefixMode(Module* Creator, char pfx) : ModeHandler(Creator, "operprefix", 'y', PARAM_ALWAYS, MODETYPE_CHANNEL) { list = true; prefix = pfx; diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 7fdc12f88..bd358e4dc 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -110,7 +110,7 @@ static bool WriteDatabase() class PermChannel : public ModeHandler { public: - PermChannel(Module* Creator) : ModeHandler(Creator, 'P', PARAM_NONE, MODETYPE_CHANNEL) { } + PermChannel(Module* Creator) : ModeHandler(Creator, "permanent", 'P', PARAM_NONE, MODETYPE_CHANNEL) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index d98b8a54b..7d1878283 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -20,7 +20,7 @@ class Redirect : public ModeHandler { public: - Redirect(Module* Creator) : ModeHandler(Creator, 'L', PARAM_SETONLY, MODETYPE_CHANNEL) { } + Redirect(Module* Creator) : ModeHandler(Creator, "redirect", 'L', PARAM_SETONLY, MODETYPE_CHANNEL) { } ModePair ModeSet(User* source, User* dest, Channel* channel, const std::string ¶meter) { diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 159f5ec0f..45baaf90e 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -22,7 +22,7 @@ class Channel_r : public ModeHandler { public: - Channel_r(Module* Creator) : ModeHandler(Creator, 'r', PARAM_NONE, MODETYPE_CHANNEL) { } + Channel_r(Module* Creator) : ModeHandler(Creator, "registered", 'r', PARAM_NONE, MODETYPE_CHANNEL) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { @@ -52,7 +52,7 @@ class User_r : public ModeHandler { public: - User_r(Module* Creator) : ModeHandler(Creator, 'r', PARAM_NONE, MODETYPE_USER) { } + User_r(Module* Creator) : ModeHandler(Creator, "registered", 'r', PARAM_NONE, MODETYPE_USER) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { @@ -78,7 +78,7 @@ class User_r : public ModeHandler class AChannel_R : public SimpleChannelModeHandler { public: - AChannel_R(Module* Creator) : SimpleChannelModeHandler(Creator, 'R') { } + AChannel_R(Module* Creator) : SimpleChannelModeHandler(Creator, "reginvite", 'R') { } }; /** User mode +R - unidentified users cannot message @@ -86,7 +86,7 @@ class AChannel_R : public SimpleChannelModeHandler class AUser_R : public SimpleUserModeHandler { public: - AUser_R(Module* Creator) : SimpleUserModeHandler(Creator, 'R') { } + AUser_R(Module* Creator) : SimpleUserModeHandler(Creator, "regdeaf", 'R') { } }; /** Channel mode +M - unidentified users cannot message channel @@ -94,7 +94,7 @@ class AUser_R : public SimpleUserModeHandler class AChannel_M : public SimpleChannelModeHandler { public: - AChannel_M(Module* Creator) : SimpleChannelModeHandler(Creator, 'M') { } + AChannel_M(Module* Creator) : SimpleChannelModeHandler(Creator, "regmoderated", 'M') { } }; class ModuleServicesAccount : public Module diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index b38f18cc9..94662e3a5 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -20,7 +20,7 @@ class ServProtectMode : public ModeHandler { public: - ServProtectMode(Module* Creator) : ModeHandler(Creator, 'k', PARAM_NONE, MODETYPE_USER) { oper = true; } + ServProtectMode(Module* Creator) : ModeHandler(Creator, "servprotect", 'k', PARAM_NONE, MODETYPE_USER) { oper = true; } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index c14769d50..24c502ee4 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -20,7 +20,7 @@ class SeeWhois : public ModeHandler { public: - SeeWhois(Module* Creator, bool IsOpersOnly) : ModeHandler(Creator, 'W', PARAM_NONE, MODETYPE_USER) + SeeWhois(Module* Creator, bool IsOpersOnly) : ModeHandler(Creator, "showwhois", 'W', PARAM_NONE, MODETYPE_USER) { oper = IsOpersOnly; } diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index d6768904c..fd185999a 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -21,7 +21,7 @@ class SSLMode : public ModeHandler { public: - SSLMode(Module* Creator) : ModeHandler(Creator, 'z', PARAM_NONE, MODETYPE_CHANNEL) { } + SSLMode(Module* Creator) : ModeHandler(Creator, "sslonly", 'z', PARAM_NONE, MODETYPE_CHANNEL) { } ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) { diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index bf3308080..e610987d3 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -20,7 +20,7 @@ class ChannelStripColor : public SimpleChannelModeHandler { public: - ChannelStripColor(Module* Creator) : SimpleChannelModeHandler(Creator, 'S') { } + ChannelStripColor(Module* Creator) : SimpleChannelModeHandler(Creator, "stripcolor", 'S') { } }; /** Handles user mode +S @@ -28,7 +28,7 @@ class ChannelStripColor : public SimpleChannelModeHandler class UserStripColor : public SimpleUserModeHandler { public: - UserStripColor(Module* Creator) : SimpleUserModeHandler(Creator, 'S') { } + UserStripColor(Module* Creator) : SimpleUserModeHandler(Creator, "stripcolor", 'S') { } }; |