X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_ojoin.cpp;h=0e924295c0977e7091994be4c58c94e42e1cd199;hb=8df3d792bc99d9dd73db7a601ebe8d4a397c3522;hp=a96e47bc6977743ed250272531459c6305e149c8;hpb=d23c030c9a8fd58807438245a004e4aa5b7288ba;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index a96e47bc6..0e924295c 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -1,7 +1,10 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2009 Taros + * Copyright (C) 2019 Robby + * Copyright (C) 2013, 2017-2019 Sadie Powell + * Copyright (C) 2012-2014, 2016 Attila Molnar + * Copyright (C) 2010 Craig Edwards * Copyright (C) 2009-2010 Daniel De Graaf * * This file is part of InspIRCd. InspIRCd is free software: you can @@ -38,7 +41,7 @@ class CommandOjoin : public SplitCommand active = false; } - CmdResult HandleLocal(const std::vector& parameters, LocalUser* user) + CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE { // Make sure the channel name is allowable. if (!ServerInstance->IsChannel(parameters[0])) @@ -57,11 +60,7 @@ class CommandOjoin : public SplitCommand 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 { @@ -92,7 +91,7 @@ class NetworkPrefix : public PrefixMode 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? @@ -157,7 +156,7 @@ class ModuleOjoin : public Module 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); } };