- // bug found by phidjit - were able to whois an incomplete connection if it had sent a NICK or USER
- if (dest->registered == 7)
+ do_whois(user,dest,0,0,parameters[0]);
+ }
+ else
+ {
+ /* no such nick/channel */
+ WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, parameters[0]);
+ WriteServ(user->fd,"318 %s %s :End of /WHOIS list.",user->nick, parameters[0]);
+ }
+}
+
+void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long idle, char* nick)
+{
+ // bug found by phidjit - were able to whois an incomplete connection if it had sent a NICK or USER
+ if (dest->registered == 7)
+ {
+ WriteServ(user->fd,"311 %s %s %s %s * :%s",user->nick, dest->nick, dest->ident, dest->dhost, dest->fullname);
+ if ((user == dest) || (strchr(user->modes,'o')))