]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/commands.h
Only assign NewServices once the duplicate check is done.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / commands.h
index b98512578338de743f20a2da0caf55e72d6bd27f..a1a44daf53580c47bf09a2e4cf65508f892a60cc 100644 (file)
@@ -1,7 +1,11 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2013, 2018-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012-2016 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
  *   Copyright (C) 2010 Daniel De Graaf <danieldg@inspircd.org>
+ *   Copyright (C) 2010 Craig Edwards <brain@inspircd.org>
  *
  * 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
@@ -22,6 +26,7 @@
 #include "servercommand.h"
 #include "commandbuilder.h"
 #include "remoteuser.h"
+#include "modules/away.h"
 
 namespace SpanningTree
 {
@@ -134,7 +139,7 @@ class FwdFJoinBuilder;
 class CommandFJoin : public ServerCommand
 {
        /** Remove all modes from a channel, including statusmodes (+qaovh etc), simplemodes, parameter modes.
-        * This does not update the timestamp of the target channel, this must be done seperately.
+        * This does not update the timestamp of the target channel, this must be done separately.
         */
        static void RemoveStatus(Channel* c);
 
@@ -241,15 +246,21 @@ class CommandResync : public ServerOnlyServerCommand<CommandResync>
 
 class SpanningTree::CommandAway : public UserOnlyServerCommand<SpanningTree::CommandAway>
 {
+ private:
+       Away::EventProvider awayevprov;
+
  public:
-       CommandAway(Module* Creator) : UserOnlyServerCommand<SpanningTree::CommandAway>(Creator, "AWAY", 0, 2) { }
+       CommandAway(Module* Creator)
+               : UserOnlyServerCommand<SpanningTree::CommandAway>(Creator, "AWAY", 0, 2)
+               , awayevprov(Creator)
+       {
+       }
        CmdResult HandleRemote(::RemoteUser* user, Params& parameters);
 
        class Builder : public CmdBuilder
        {
         public:
                Builder(User* user);
-               Builder(User* user, const std::string& msg);
        };
 };
 
@@ -313,7 +324,7 @@ class SpanningTree::CommandPong : public ServerOnlyServerCommand<SpanningTree::C
        RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE { return ROUTE_UNICAST(parameters[0]); }
 };
 
-class CommandSave : public ServerCommand
+class DllExport CommandSave : public ServerCommand
 {
  public:
        /** Timestamp of the uuid nick of all users who collided and got their nick changed to uuid