summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-06-18 18:50:10 +0200
committerattilamolnar <attilamolnar@hush.com>2013-07-19 19:40:03 +0200
commit882084defcc43c876ecb10e30086b63ac074fcad (patch)
tree4a377934843b6933dae97de1019a84448e7f565a /src/modules
parentb954283ccc4253a6881513bbe7f743c39886d3b7 (diff)
Move SetNoticeMask(), FormatNoticeMasks() and ProcessNoticeMasks() from the User class to the snomask modehandler
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_check.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp
index 97d747c5c..044af04ea 100644
--- a/src/modules/m_check.cpp
+++ b/src/modules/m_check.cpp
@@ -28,10 +28,24 @@
class CommandCheck : public Command
{
ChanModeReference ban;
+ UserModeReference snomaskmode;
+
+ std::string GetSnomasks(User* user)
+ {
+ std::string ret;
+ if (snomaskmode)
+ ret = snomaskmode->GetUserParameter(user);
+
+ if (ret.empty())
+ ret = "+";
+ return ret;
+ }
+
public:
CommandCheck(Module* parent)
: Command(parent,"CHECK", 1)
, ban(parent, "ban")
+ , snomaskmode(parent, "snomask")
{
flags_needed = 'o'; syntax = "<nickname>|<ip>|<hostmask>|<channel> <server>";
}
@@ -92,7 +106,7 @@ class CommandCheck : public Command
user->SendText(checkstr + " realnuh " + targuser->GetFullRealHost());
user->SendText(checkstr + " realname " + targuser->fullname);
user->SendText(checkstr + " modes +" + targuser->FormatModes());
- user->SendText(checkstr + " snomasks +" + targuser->FormatNoticeMasks());
+ user->SendText(checkstr + " snomasks " + GetSnomasks(targuser));
user->SendText(checkstr + " server " + targuser->server);
user->SendText(checkstr + " uid " + targuser->uuid);
user->SendText(checkstr + " signon " + timestring(targuser->signon));