aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands/cmd_wallops.cpp
diff options
context:
space:
mode:
authorGravatar attilamolnar2013-06-18 19:10:07 +0200
committerGravatar attilamolnar2013-07-19 19:40:04 +0200
commitfd1d19d6345943ecdb5ce4ef947f9b3c5c8bca86 (patch)
tree20ce1866b482808a85b34c7c09e53c3159617bc0 /src/commands/cmd_wallops.cpp
parentMove SetNoticeMask(), FormatNoticeMasks() and ProcessNoticeMasks() from the U... (diff)
Replace hardcoded mode letters, part 3
This changes most remaining User::IsModeSet() calls to use ModeReferences for modes that were created by other modules or the core
Diffstat (limited to 'src/commands/cmd_wallops.cpp')
-rw-r--r--src/commands/cmd_wallops.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/commands/cmd_wallops.cpp b/src/commands/cmd_wallops.cpp
index 3cd8abc42..e0e832ff7 100644
--- a/src/commands/cmd_wallops.cpp
+++ b/src/commands/cmd_wallops.cpp
@@ -27,10 +27,19 @@
*/
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);
}