summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-09 10:14:40 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-09 10:14:40 +0000
commite58161f80d25552e4b6f2d8ca33176d006ac33e9 (patch)
tree6312532a8ca03e5673ad4f73b0a43892ffbe6478
parent3ac032f3f6d8d4abe1a12a7aa99c9af3fad97e40 (diff)
Send usermodes on whois if user is self or opered
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9440 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands/cmd_whois.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/commands/cmd_whois.cpp b/src/commands/cmd_whois.cpp
index b72fd73e5..a10f170f1 100644
--- a/src/commands/cmd_whois.cpp
+++ b/src/commands/cmd_whois.cpp
@@ -64,6 +64,18 @@ void do_whois(InspIRCd* ServerInstance, User* user, User* dest,unsigned long sig
ServerInstance->SendWhoisLine(user, dest, 313, "%s %s :is %s %s on %s",user->nick, dest->nick, (strchr("AEIOUaeiou",*dest->oper) ? "an" : "a"),irc::Spacify(dest->oper), ServerInstance->Config->Network);
}
+ if (user == dest || IS_OPER(user))
+ {
+ if (dest->modes[UM_SNOMASK] != 0)
+ {
+ ServerInstance->SendWhoisLine(user, dest, 379, "%s %s :is using modes +%s +%s", user->nick, dest->nick, dest->FormatModes(), dest->FormatNoticeMasks());
+ }
+ else
+ {
+ ServerInstance->SendWhoisLine(user, dest, 379, "%s %s :is using modes +%s", user->nick, dest->nick, dest->FormatModes());
+ }
+ }
+
FOREACH_MOD(I_OnWhois,OnWhois(user,dest));
/*