]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_wallops.cpp
Use CommandParser::GetHandler() in ServerConfig::ApplyDisabledCommands()
[user/henk/code/inspircd.git] / src / coremods / core_wallops.cpp
index 731eaf3d298eac3be14d732f509fc4879436f618..5dfb79b6765d31a695779a698b955070655fe60a 100644 (file)
  */
 class CommandWallops : public Command
 {
-       UserModeReference wallopsmode;
+       SimpleUserModeHandler wallopsmode;
 
  public:
        /** Constructor for wallops.
         */
        CommandWallops(Module* parent)
                : Command(parent, "WALLOPS", 1, 1)
-               , wallopsmode(parent, "wallops")
+               , wallopsmode(parent, "wallops", 'w')
        {
                flags_needed = 'o';
                syntax = "<any-text>";
@@ -59,7 +59,7 @@ CmdResult CommandWallops::Handle (const std::vector<std::string>& parameters, Us
        {
                User* t = *i;
                if (t->IsModeSet(wallopsmode))
-                       user->WriteTo(t,wallop);
+                       t->WriteFrom(user, wallop);
        }
 
        return CMD_SUCCESS;