From 882084defcc43c876ecb10e30086b63ac074fcad Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 18 Jun 2013 18:50:10 +0200 Subject: Move SetNoticeMask(), FormatNoticeMasks() and ProcessNoticeMasks() from the User class to the snomask modehandler --- src/modules/m_check.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/modules/m_check.cpp') 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 = "||| "; } @@ -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)); -- cgit v1.2.3