diff options
| author | 2013-09-01 14:25:15 +0200 | |
|---|---|---|
| committer | 2013-09-11 12:10:07 +0200 | |
| commit | 34fa5627de0a0431ca76f34445c680a76a9a7dc5 (patch) | |
| tree | 4b63f6ce49983e161051f70e066ecf9bf974cc88 /src/modules/m_customprefix.cpp | |
| parent | Add a type id field to ModeHandler (diff) | |
| download | inspircd++-34fa5627de0a0431ca76f34445c680a76a9a7dc5.tar.gz inspircd++-34fa5627de0a0431ca76f34445c680a76a9a7dc5.tar.bz2 inspircd++-34fa5627de0a0431ca76f34445c680a76a9a7dc5.zip | |
Create a base class for prefix modes
Move Channel::SetPrefix() into Membership
Diffstat (limited to 'src/modules/m_customprefix.cpp')
| -rw-r--r-- | src/modules/m_customprefix.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index bda11e8b3..f0b6d88e3 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -19,17 +19,16 @@ #include "inspircd.h" -class CustomPrefixMode : public ModeHandler +class CustomPrefixMode : public PrefixMode { public: reference<ConfigTag> tag; bool depriv; CustomPrefixMode(Module* parent, ConfigTag* Tag) - : ModeHandler(parent, Tag->getString("name"), 0, PARAM_ALWAYS, MODETYPE_CHANNEL), tag(Tag) + : PrefixMode(parent, Tag->getString("name"), 0) + , tag(Tag) { - list = true; - m_paramtype = TR_NICK; std::string v = tag->getString("prefix"); prefix = v.c_str()[0]; v = tag->getString("letter"); @@ -45,11 +44,6 @@ class CustomPrefixMode : public ModeHandler return MOD_RES_ALLOW; return MOD_RES_PASSTHRU; } - - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) - { - return MODEACTION_ALLOW; - } }; class ModuleCustomPrefix : public Module |
