From ccb6c0f243ee8de52677dface0a24878630bb7fd Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 27 Aug 2017 21:11:12 +0100 Subject: Move operquit out of the core and into core_user. --- include/inspircd.h | 4 ---- src/coremods/core_user/cmd_quit.cpp | 5 +++-- src/coremods/core_user/core_user.h | 3 +++ src/inspircd.cpp | 3 --- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/inspircd.h b/include/inspircd.h index 824a30e8a..839cccb6a 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -320,10 +320,6 @@ class CoreExport InspIRCd */ ProtocolInterface DefaultProtocolInterface; - /** Holds extensible for user operquit - */ - StringExtItem OperQuit; - /** Manages the generation and transmission of ISUPPORT. */ ISupportManager ISupport; diff --git a/src/coremods/core_user/cmd_quit.cpp b/src/coremods/core_user/cmd_quit.cpp index c4e127dd8..f9a4e1f70 100644 --- a/src/coremods/core_user/cmd_quit.cpp +++ b/src/coremods/core_user/cmd_quit.cpp @@ -23,6 +23,7 @@ CommandQuit::CommandQuit(Module* parent) : Command(parent, "QUIT", 0, 1) + , operquit("operquit", ExtensionItem::EXT_USER, parent) { works_before_reg = true; syntax = "[]"; @@ -38,8 +39,8 @@ CmdResult CommandQuit::Handle (const std::vector& parameters, User else quitmsg = parameters[0]; - std::string* operquit = ServerInstance->OperQuit.get(user); - ServerInstance->Users->QuitUser(user, quitmsg, operquit); + std::string* operquitmsg = operquit.get(user); + ServerInstance->Users->QuitUser(user, quitmsg, operquitmsg); return CMD_SUCCESS; } diff --git a/src/coremods/core_user/core_user.h b/src/coremods/core_user/core_user.h index 0418588c1..72ba67869 100644 --- a/src/coremods/core_user/core_user.h +++ b/src/coremods/core_user/core_user.h @@ -137,6 +137,9 @@ class CommandPart : public Command */ class CommandQuit : public Command { + private: + StringExtItem operquit; + public: MessageWrapper msgwrap; diff --git a/src/inspircd.cpp b/src/inspircd.cpp index abd63f953..44ba3c2a9 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -226,7 +226,6 @@ InspIRCd::InspIRCd(int argc, char** argv) : * THIS MUST MATCH THE ORDER OF DECLARATION OF THE FUNCTORS, e.g. the methods * themselves within the class. */ - OperQuit("operquit", ExtensionItem::EXT_USER, NULL), GenRandom(&HandleGenRandom), IsChannel(&HandleIsChannel), IsNick(&HandleIsNick), @@ -234,8 +233,6 @@ InspIRCd::InspIRCd(int argc, char** argv) : { ServerInstance = this; - Extensions.Register(&OperQuit); - FailedPortList pl; // Flag variables passed to getopt_long() later int do_version = 0, do_nofork = 0, do_debug = 0, -- cgit v1.2.3