]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_user/core_user.h
Fix the behaviour of multi-value PING and PONG messages.
[user/henk/code/inspircd.git] / src / coremods / core_user / core_user.h
index ea28176d4097e9549d0b1511956f2403b19f4f59..760ed9cf62f921ee6dcbb62e7dc1a54a6cb39943 100644 (file)
@@ -1,10 +1,8 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2017-2019 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
- *   Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
- *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- *   Copyright (C) 2006 Craig Edwards <craigedwards@brainbox.cc>
  *
  * 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
 #include "listmode.h"
 #include "modules/away.h"
 
+enum
+{
+       // From RFC 1459.
+       ERR_NOORIGIN = 409
+};
+
 class MessageWrapper
 {
        std::string prefix;
@@ -70,6 +74,28 @@ class CommandAway : public Command
        RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE;
 };
 
+/** Handle /ISON.
+ */
+class CommandIson : public SplitCommand
+{
+ public:
+       /** Constructor for ison.
+        */
+       CommandIson(Module* parent)
+               : SplitCommand(parent, "ISON", 1)
+       {
+               allow_empty_last_param = false;
+               syntax = "<nick> [<nick>]+";
+       }
+       /** 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 HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE;
+};
+
+
 /** Handle /NICK.
  */
 class CommandNick : public SplitCommand
@@ -157,6 +183,30 @@ class CommandUser : public SplitCommand
        static CmdResult CheckRegister(LocalUser* user);
 };
 
+/** Handle /USERHOST.
+ */
+class CommandUserhost : public Command
+{
+       UserModeReference hideopermode;
+
+ public:
+       /** Constructor for userhost.
+        */
+       CommandUserhost(Module* parent)
+               : Command(parent,"USERHOST", 1)
+               , hideopermode(parent, "hideoper")
+       {
+               allow_empty_last_param = false;
+               syntax = "<nick> [<nick>]+";
+       }
+       /** 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(User* user, const Params& parameters) CXX11_OVERRIDE;
+};
+
 /** User mode +s
  */
 class ModeUserServerNoticeMask : public ModeHandler
@@ -173,7 +223,6 @@ class ModeUserServerNoticeMask : public ModeHandler
  public:
        ModeUserServerNoticeMask(Module* Creator);
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding) CXX11_OVERRIDE;
-       void OnParameterMissing(User* user, User* dest, Channel* channel) CXX11_OVERRIDE;
 
        /** Create a displayable mode string of the snomasks set on a given user
         * @param user The user whose notice masks to format