mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 19:19:02 -04:00
Move operquit out of the core and into core_user.
This commit is contained in:
parent
51a47e7d75
commit
ccb6c0f243
@ -320,10 +320,6 @@ class CoreExport InspIRCd
|
|||||||
*/
|
*/
|
||||||
ProtocolInterface DefaultProtocolInterface;
|
ProtocolInterface DefaultProtocolInterface;
|
||||||
|
|
||||||
/** Holds extensible for user operquit
|
|
||||||
*/
|
|
||||||
StringExtItem OperQuit;
|
|
||||||
|
|
||||||
/** Manages the generation and transmission of ISUPPORT. */
|
/** Manages the generation and transmission of ISUPPORT. */
|
||||||
ISupportManager ISupport;
|
ISupportManager ISupport;
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
CommandQuit::CommandQuit(Module* parent)
|
CommandQuit::CommandQuit(Module* parent)
|
||||||
: Command(parent, "QUIT", 0, 1)
|
: Command(parent, "QUIT", 0, 1)
|
||||||
|
, operquit("operquit", ExtensionItem::EXT_USER, parent)
|
||||||
{
|
{
|
||||||
works_before_reg = true;
|
works_before_reg = true;
|
||||||
syntax = "[<message>]";
|
syntax = "[<message>]";
|
||||||
@ -38,8 +39,8 @@ CmdResult CommandQuit::Handle (const std::vector<std::string>& parameters, User
|
|||||||
else
|
else
|
||||||
quitmsg = parameters[0];
|
quitmsg = parameters[0];
|
||||||
|
|
||||||
std::string* operquit = ServerInstance->OperQuit.get(user);
|
std::string* operquitmsg = operquit.get(user);
|
||||||
ServerInstance->Users->QuitUser(user, quitmsg, operquit);
|
ServerInstance->Users->QuitUser(user, quitmsg, operquitmsg);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -137,6 +137,9 @@ class CommandPart : public Command
|
|||||||
*/
|
*/
|
||||||
class CommandQuit : public Command
|
class CommandQuit : public Command
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
|
StringExtItem operquit;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MessageWrapper msgwrap;
|
MessageWrapper msgwrap;
|
||||||
|
|
||||||
|
@ -226,7 +226,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
|
|||||||
* THIS MUST MATCH THE ORDER OF DECLARATION OF THE FUNCTORS, e.g. the methods
|
* THIS MUST MATCH THE ORDER OF DECLARATION OF THE FUNCTORS, e.g. the methods
|
||||||
* themselves within the class.
|
* themselves within the class.
|
||||||
*/
|
*/
|
||||||
OperQuit("operquit", ExtensionItem::EXT_USER, NULL),
|
|
||||||
GenRandom(&HandleGenRandom),
|
GenRandom(&HandleGenRandom),
|
||||||
IsChannel(&HandleIsChannel),
|
IsChannel(&HandleIsChannel),
|
||||||
IsNick(&HandleIsNick),
|
IsNick(&HandleIsNick),
|
||||||
@ -234,8 +233,6 @@ InspIRCd::InspIRCd(int argc, char** argv) :
|
|||||||
{
|
{
|
||||||
ServerInstance = this;
|
ServerInstance = this;
|
||||||
|
|
||||||
Extensions.Register(&OperQuit);
|
|
||||||
|
|
||||||
FailedPortList pl;
|
FailedPortList pl;
|
||||||
// Flag variables passed to getopt_long() later
|
// Flag variables passed to getopt_long() later
|
||||||
int do_version = 0, do_nofork = 0, do_debug = 0,
|
int do_version = 0, do_nofork = 0, do_debug = 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user