X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ojoin.cpp;h=e4314873bcb073998cb14d0013dde61e5e9569ce;hb=f45a8e2a14329860ad07b903797cef00a925e8cb;hp=83a0494805a5aa4a0b9f8ec5385d5d787177e584;hpb=c202dea024542b9c6c6b771bb9a3a081d9eacdc5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index 83a049480..e4314873b 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -84,16 +84,14 @@ class CommandOjoin : public SplitCommand /** channel mode +Y */ -class NetworkPrefix : public ModeHandler +class NetworkPrefix : public PrefixMode { public: NetworkPrefix(Module* parent, char NPrefix) - : ModeHandler(parent, "official-join", 'Y', PARAM_ALWAYS, MODETYPE_CHANNEL) + : PrefixMode(parent, "official-join", 'Y') { - list = true; prefix = NPrefix; levelrequired = INT_MAX; - m_paramtype = TR_NICK; prefixrank = NETWORK_VALUE; } @@ -106,12 +104,6 @@ class NetworkPrefix : public ModeHandler return MOD_RES_PASSTHRU; } - - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) - { - return MODEACTION_ALLOW; - } - }; class ModuleOjoin : public Module @@ -138,7 +130,6 @@ class ModuleOjoin : public Module mycommand.npmh = np; ServerInstance->Modules->AddService(*np); - ServerInstance->Modules->AddService(mycommand); } ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE @@ -171,7 +162,7 @@ class ModuleOjoin : public Module if (source == memb->user) return MOD_RES_PASSTHRU; - source->WriteNumeric(484, source->nick+" "+memb->chan->name+" :Can't kick "+memb->user->nick+" as they're on official network business."); + source->WriteNumeric(ERR_RESTRICTED, memb->chan->name+" :Can't kick "+memb->user->nick+" as they're on official network business."); return MOD_RES_DENY; }