diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-18 17:09:21 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-18 17:09:21 +0000 |
commit | d534ad9efb69557d81125b9646629d74a29e7175 (patch) | |
tree | a2ef0d8ad8df504d6cb8ae01950d322810d9d5ec | |
parent | d7b24990ec5bd1bf4efb7f02c613e0235dfab4a8 (diff) |
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
-rw-r--r-- | src/cmd_who.cpp | 2 | ||||
-rw-r--r-- | 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<std::string>::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] : "*"); } } |