From d534ad9efb69557d81125b9646629d74a29e7175 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 18 Aug 2006 17:09:21 +0000 Subject: Odd bits and bobs to keep the numeric sane if the user is insane (like stskeeps for example) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4961 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_who.cpp | 2 +- src/cmd_whois.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp index fdb18c89f..745e5db15 100644 --- a/src/cmd_who.cpp +++ b/src/cmd_who.cpp @@ -231,7 +231,7 @@ void cmd_who::Handle (const char** parameters, int pcnt, userrec *user) { for (std::vector::const_iterator n = whoresults.begin(); n != whoresults.end(); n++) user->WriteServ(*n); - user->WriteServ("315 %s %s :End of /WHO list.",user->nick, parameters[0]); + user->WriteServ("315 %s %s :End of /WHO list.",user->nick, *parameters[0] ? parameters[0] : "*"); } else { diff --git a/src/cmd_whois.cpp b/src/cmd_whois.cpp index 703faad3f..a2cc3343a 100644 --- a/src/cmd_whois.cpp +++ b/src/cmd_whois.cpp @@ -88,8 +88,8 @@ void do_whois(InspIRCd* ServerInstance, userrec* user, userrec* dest,unsigned lo } else { - user->WriteServ("401 %s %s :No such nick/channel",user->nick, nick); - user->WriteServ("318 %s %s :End of /WHOIS list.",user->nick, nick); + user->WriteServ("401 %s %s :No such nick/channel",user->nick, *nick ? nick : "*"); + user->WriteServ("318 %s %s :End of /WHOIS list.",user->nick, *nick ? nick : "*"); } } @@ -107,8 +107,8 @@ void cmd_whois::Handle (const char** parameters, int pcnt, userrec *user) else { /* no such nick/channel */ - user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]); - user->WriteServ("318 %s %s :End of /WHOIS list.",user->nick, parameters[0]); + user->WriteServ("401 %s %s :No such nick/channel",user->nick, *parameters[0] ? parameters[0] : "*"); + user->WriteServ("318 %s %s :End of /WHOIS list.",user->nick, *parameters[0] ? parameters[0] : "*"); } } -- cgit v1.2.3