From e58161f80d25552e4b6f2d8ca33176d006ac33e9 Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 9 Apr 2008 10:14:40 +0000 Subject: 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 --- src/commands/cmd_whois.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/commands/cmd_whois.cpp') 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)); /* -- cgit v1.2.3