diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-06-18 18:50:10 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-07-19 19:40:03 +0200 |
commit | 882084defcc43c876ecb10e30086b63ac074fcad (patch) | |
tree | 4a377934843b6933dae97de1019a84448e7f565a /src/commands/cmd_whois.cpp | |
parent | b954283ccc4253a6881513bbe7f743c39886d3b7 (diff) |
Move SetNoticeMask(), FormatNoticeMasks() and ProcessNoticeMasks() from the User class to the snomask modehandler
Diffstat (limited to 'src/commands/cmd_whois.cpp')
-rw-r--r-- | src/commands/cmd_whois.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp index 4893c1251..116e43135 100644 --- a/src/commands/cmd_whois.cpp +++ b/src/commands/cmd_whois.cpp @@ -30,6 +30,7 @@ class CommandWhois : public SplitCommand { ChanModeReference secretmode; ChanModeReference privatemode; + UserModeReference snomaskmode; void SplitChanList(User* source, User* dest, const std::string& cl); void DoWhois(User* user, User* dest, unsigned long signon, unsigned long idle); @@ -42,6 +43,7 @@ class CommandWhois : public SplitCommand : SplitCommand(parent, "WHOIS", 1) , secretmode(parent, "secret") , privatemode(parent, "private") + , snomaskmode(parent, "snomask") { Penalty = 2; syntax = "<nick>{,<nick>}"; @@ -161,9 +163,9 @@ void CommandWhois::DoWhois(User* user, User* dest, unsigned long signon, unsigne if (user == dest || user->HasPrivPermission("users/auspex")) { - if (dest->IsModeSet('s') != 0) + if (dest->IsModeSet(snomaskmode)) { - ServerInstance->SendWhoisLine(user, dest, 379, "%s %s :is using modes +%s +%s", user->nick.c_str(), dest->nick.c_str(), dest->FormatModes(), dest->FormatNoticeMasks().c_str()); + ServerInstance->SendWhoisLine(user, dest, 379, "%s %s :is using modes +%s %s", user->nick.c_str(), dest->nick.c_str(), dest->FormatModes(), snomaskmode->GetUserParameter(dest).c_str()); } else { |