]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ojoin.cpp
m_exemptchanops Fix parameter validation
[user/henk/code/inspircd.git] / src / modules / m_ojoin.cpp
index 0a5a57f4036c67b91974b9bcb22a4f4479aaeee9..120715429cfdcdcb28a544198701582da77060c7 100644 (file)
@@ -57,7 +57,6 @@ class CommandOjoin : public SplitCommand
 
                        if (notice)
                        {
-                               channel = ServerInstance->FindChan(parameters[0]);
                                channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s joined on official network business.",
                                        parameters[0].c_str(), user->nick.c_str());
                                ServerInstance->PI->SendChannelNotice(channel, 0, user->nick + " joined on official network business.");
@@ -162,7 +161,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;
        }