diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 18:59:13 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-08 18:59:13 +0000 |
commit | fea1a27cb96a114f698eedcf90401b78406108fb (patch) | |
tree | 194649decb5d88184149307571bba6873537853d /src/cmd_whois.cpp | |
parent | a7543c881be4c900b68a54714de7c1e677acbb09 (diff) |
WHEEEEE!!!!!
All of: Write(), WriteTo(), WriteFrom(), WriteServ() are now methods of userrec.
Write_NoFormat(), WriteTo_NoFormat(), WriteFrom_NoFormat(), WriteServ_NoFormat() are now std::string-taking overloaded methods of the functions above
All modules updated to use new syntax, my fingers hurt :(
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4798 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_whois.cpp')
-rw-r--r-- | src/cmd_whois.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/cmd_whois.cpp b/src/cmd_whois.cpp index efa8b44aa..398f2bc31 100644 --- a/src/cmd_whois.cpp +++ b/src/cmd_whois.cpp @@ -45,10 +45,10 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i // bug found by phidjit - were able to whois an incomplete connection if it had sent a NICK or USER if (dest->registered == REG_ALL) { - WriteServ(user->fd,"311 %s %s %s %s * :%s",user->nick, dest->nick, dest->ident, dest->dhost, dest->fullname); + user->WriteServ("311 %s %s %s %s * :%s",user->nick, dest->nick, dest->ident, dest->dhost, dest->fullname); if ((user == dest) || (*user->oper)) { - WriteServ(user->fd,"378 %s %s :is connecting from *@%s %s",user->nick, dest->nick, dest->host, dest->GetIPString()); + user->WriteServ("378 %s %s :is connecting from *@%s %s",user->nick, dest->nick, dest->host, dest->GetIPString()); } std::string cl = chlist(dest,user); if (cl.length()) @@ -59,24 +59,24 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i } else { - WriteServ(user->fd,"319 %s %s :%s",user->nick, dest->nick, cl.c_str()); + user->WriteServ("319 %s %s :%s",user->nick, dest->nick, cl.c_str()); } } if (*Config->HideWhoisServer && !(*user->oper)) { - WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, Config->HideWhoisServer, Config->Network); + user->WriteServ("312 %s %s %s :%s",user->nick, dest->nick, Config->HideWhoisServer, Config->Network); } else { - WriteServ(user->fd,"312 %s %s %s :%s",user->nick, dest->nick, dest->server, GetServerDescription(dest->server).c_str()); + user->WriteServ("312 %s %s %s :%s",user->nick, dest->nick, dest->server, GetServerDescription(dest->server).c_str()); } if (*dest->awaymsg) { - WriteServ(user->fd,"301 %s %s :%s",user->nick, dest->nick, dest->awaymsg); + user->WriteServ("301 %s %s :%s",user->nick, dest->nick, dest->awaymsg); } if (*dest->oper) { - WriteServ(user->fd,"313 %s %s :is %s %s on %s",user->nick, dest->nick, (strchr("AEIOUaeiou",*dest->oper) ? "an" : "a"),Spacify(dest->oper), Config->Network); + user->WriteServ("313 %s %s :is %s %s on %s",user->nick, dest->nick, (strchr("AEIOUaeiou",*dest->oper) ? "an" : "a"),Spacify(dest->oper), Config->Network); } if ((!signon) && (!idle)) { @@ -85,19 +85,19 @@ void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long i if (!strcasecmp(user->server,dest->server)) { // idle time and signon line can only be sent if youre on the same server (according to RFC) - WriteServ(user->fd,"317 %s %s %d %d :seconds idle, signon time",user->nick, dest->nick, abs((dest->idle_lastmsg)-TIME), dest->signon); + user->WriteServ("317 %s %s %d %d :seconds idle, signon time",user->nick, dest->nick, abs((dest->idle_lastmsg)-TIME), dest->signon); } else { if ((idle) || (signon)) - WriteServ(user->fd,"317 %s %s %d %d :seconds idle, signon time",user->nick, dest->nick, idle, signon); + user->WriteServ("317 %s %s %d %d :seconds idle, signon time",user->nick, dest->nick, idle, signon); } - WriteServ(user->fd,"318 %s %s :End of /WHOIS list.",user->nick, dest->nick); + user->WriteServ("318 %s %s :End of /WHOIS list.",user->nick, dest->nick); } else { - WriteServ(user->fd,"401 %s %s :No such nick/channel",user->nick, nick); - WriteServ(user->fd,"318 %s %s :End of /WHOIS list.",user->nick, nick); + user->WriteServ("401 %s %s :No such nick/channel",user->nick, nick); + user->WriteServ("318 %s %s :End of /WHOIS list.",user->nick, nick); } } @@ -115,7 +115,7 @@ void cmd_whois::Handle (const char** parameters, int pcnt, userrec *user) 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]); + 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]); } } |