]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ojoin.cpp
m_spanningtree Allow multiple valid ips for link blocks as a result of SecurityIPResolver
[user/henk/code/inspircd.git] / src / modules / m_ojoin.cpp
index 1444f93ad691a3ab37174b02e10f51e0dfdcf755..2573e8b78e93636c53115ca06c43d2d76832fedf 100644 (file)
@@ -58,9 +58,9 @@ class CommandOjoin : public SplitCommand
 
                        if (notice)
                        {
-                               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.");
+                               const std::string msg = user->nick + " joined on official network business.";
+                               channel->WriteNotice(msg);
+                               ServerInstance->PI->SendChannelNotice(channel, 0, msg);
                        }
                }
                else
@@ -139,14 +139,14 @@ class ModuleOjoin : public Module
        ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason) CXX11_OVERRIDE
        {
                // Don't do anything if they're not +Y
-               if (!memb->hasMode(np.GetModeChar()))
+               if (!memb->HasMode(&np))
                        return MOD_RES_PASSTHRU;
 
                // Let them do whatever they want to themselves.
                if (source == memb->user)
                        return MOD_RES_PASSTHRU;
 
-               source->WriteNumeric(ERR_RESTRICTED, 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;
        }