X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcoremods%2Fcore_oper%2Fcore_oper.h;h=d20d91e8eb4dbaa80a8d6df4f1523a81c9f1faf7;hb=77a8864d58a496c8af7eddb329cc668781b5c373;hp=338a369f518f3ba5cebd5964924ce81ec0ea16be;hpb=c6a508a3da977041909f18f77d6e8fea942512cf;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_oper/core_oper.h b/src/coremods/core_oper/core_oper.h index 338a369f5..d20d91e8e 100644 --- a/src/coremods/core_oper/core_oper.h +++ b/src/coremods/core_oper/core_oper.h @@ -1,7 +1,9 @@ /* * InspIRCd -- Internet Relay Chat Daemon * - * Copyright (C) 2014 Attila Molnar + * Copyright (C) 2018 linuxdaemon + * Copyright (C) 2017-2018 Sadie Powell + * Copyright (C) 2014-2015, 2018 Attila Molnar * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -23,14 +25,6 @@ namespace DieRestart { - /** Checks a die or restart password - * @param user The user executing /DIE or /RESTART - * @param inputpass The password given by the user - * @param confkey The name of the key in the power tag containing the correct password - * @return True if the given password was correct, false if it was not - */ - bool CheckPass(User* user, const std::string& inputpass, const char* confkey); - /** Send an ERROR to unregistered users and a NOTICE to all registered local users * @param message Message to send */ @@ -42,16 +36,19 @@ namespace DieRestart class CommandDie : public Command { public: + std::string& hash; + std::string password; + /** Constructor for die. */ - CommandDie(Module* parent); + CommandDie(Module* parent, std::string& hashref); /** Handle command. * @param parameters The parameters to the command * @param user The user issuing the command * @return A value from CmdResult to indicate command success or failure. */ - CmdResult Handle(const std::vector& parameters, User* user); + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE; }; /** Handle /KILL. @@ -60,21 +57,29 @@ class CommandKill : public Command { std::string lastuuid; std::string killreason; + ClientProtocol::EventProvider protoev; public: + /** Set to a non empty string to obfuscate nicknames prepended to a KILL. */ + std::string hidenick; + + /** Set to hide kills from clients of ulined servers in snotices. */ + bool hideuline; + /** Constructor for kill. */ CommandKill(Module* parent); /** Handle command. - * @param parameters The parameters to the command - * @param user The user issuing the command + * @param user User issuing the command + * @param parameters Parameters to the command * @return A value from CmdResult to indicate command success or failure. */ - CmdResult Handle(const std::vector& parameters, User* user); - RouteDescriptor GetRouting(User* user, const std::vector& parameters); + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE; + + RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE; - void EncodeParameter(std::string& param, int index); + void EncodeParameter(std::string& param, unsigned int index) CXX11_OVERRIDE; }; /** Handle /OPER. @@ -87,11 +92,11 @@ class CommandOper : public SplitCommand CommandOper(Module* parent); /** Handle command. - * @param parameters The parameters to the command - * @param user The user issuing the command + * @param user User issuing the command + * @param parameters Parameters to the command * @return A value from CmdResult to indicate command success or failure. */ - CmdResult HandleLocal(const std::vector& parameters, LocalUser* user); + CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE; }; /** Handle /REHASH. @@ -104,11 +109,11 @@ class CommandRehash : public Command CommandRehash(Module* parent); /** Handle command. - * @param parameters The parameters to the command - * @param user The user issuing the command + * @param user User issuing the command + * @param parameters Parameters to the command * @return A value from CmdResult to indicate command success or failure. */ - CmdResult Handle(const std::vector& parameters, User *user); + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE; }; /** Handle /RESTART @@ -116,14 +121,17 @@ class CommandRehash : public Command class CommandRestart : public Command { public: + std::string& hash; + std::string password; + /** Constructor for restart. */ - CommandRestart(Module* parent); + CommandRestart(Module* parent, std::string& hashref); /** Handle command. - * @param parameters The parameters to the command - * @param user The user issuing the command + * @param user User issuing the command + * @param parameters Parameters to the command * @return A value from CmdResult to indicate command success or failure. */ - CmdResult Handle(const std::vector& parameters, User* user); + CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE; };