active = false;
}
- CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user)
+ CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE
{
// Make sure the channel name is allowable.
if (!ServerInstance->IsChannel(parameters[0]))
ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used OJOIN to join "+channel->name);
if (notice)
- {
- const std::string msg = user->nick + " joined on official network business.";
- channel->WriteNotice(msg);
- ServerInstance->PI->SendChannelNotice(channel, 0, msg);
- }
+ channel->WriteNotice(user->nick + " joined on official network business.");
}
else
{
NetworkPrefix(Module* parent, char NPrefix)
: PrefixMode(parent, "official-join", 'Y', NETWORK_VALUE, NPrefix)
{
- levelrequired = INT_MAX;
+ ranktoset = ranktounset = UINT_MAX;
}
- ModResult AccessCheck(User* source, Channel* channel, std::string ¶meter, bool adding)
+ ModResult AccessCheck(User* source, Channel* channel, std::string ¶meter, bool adding) CXX11_OVERRIDE
{
User* theuser = ServerInstance->FindNick(parameter);
// remove own privs?
return MOD_RES_DENY;
}
- void Prioritize()
+ void Prioritize() CXX11_OVERRIDE
{
ServerInstance->Modules->SetPriority(this, I_OnUserPreJoin, PRIORITY_FIRST);
}
Version GetVersion() CXX11_OVERRIDE
{
- return Version("Network Business Join", VF_VENDOR);
+ return Version("Provides the OJOIN command, allows an oper to join a channel and be immune to kicks", VF_VENDOR);
}
};