From: w00t Date: Wed, 9 Apr 2008 10:14:40 +0000 (+0000) Subject: Send usermodes on whois if user is self or opered X-Git-Tag: v2.0.23~3404 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=e58161f80d25552e4b6f2d8ca33176d006ac33e9;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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)); /*