]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_wallops.cpp
Replace hardcoded mode letters, part 3
[user/henk/code/inspircd.git] / src / commands / cmd_wallops.cpp
index 3cd8abc42bb9daa628c5b6649516e5cf16fbbdd5..e0e832ff7a413d6ecdda2863f9d3a861e36f585f 100644 (file)
  */
 class CommandWallops : public Command
 {
+       UserModeReference wallopsmode;
+
  public:
        /** Constructor for wallops.
         */
-       CommandWallops ( Module* parent) : Command(parent,"WALLOPS",1,1) { flags_needed = 'o'; syntax = "<any-text>"; }
+       CommandWallops(Module* parent)
+               : Command(parent, "WALLOPS", 1, 1)
+               , wallopsmode(parent, "wallops")
+       {
+               flags_needed = 'o';
+               syntax = "<any-text>";
+       }
+
        /** Handle command.
         * @param parameters The parameters to the comamnd
         * @param pcnt The number of parameters passed to teh command
@@ -53,7 +62,7 @@ CmdResult CommandWallops::Handle (const std::vector<std::string>& parameters, Us
        for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++)
        {
                User* t = *i;
-               if (t->IsModeSet('w'))
+               if (t->IsModeSet(wallopsmode))
                        user->WriteTo(t,wallop);
        }