X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_customprefix.cpp;h=107c6d684b4e0497478e56ed1f417f1e973481a9;hb=a4f222ee1b05e2fdb2744c1694f9140f8099b009;hp=bda11e8b31761ad932279780322d2d5f08c8baf0;hpb=1031f333332cf1b09db4fd632f141143ee637c34;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index bda11e8b3..107c6d684 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 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 @@ -75,7 +69,7 @@ class ModuleCustomPrefix : public Module } catch (ModuleException& e) { - throw ModuleException(e.err + " (while creating mode from " + tag->getTagLocation() + ")"); + throw ModuleException(e.GetReason() + " (while creating mode from " + tag->getTagLocation() + ")"); } } }