diff options
Diffstat (limited to 'src')
-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] : "*"); } } |