From 2dfa145d9988bbf4d8ed96206f9d3032e05d6a67 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 16 Jul 2006 17:49:43 +0000 Subject: Fixed it myself so i can carry on coding1 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4421 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_who.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/cmd_who.cpp b/src/cmd_who.cpp index b83cda6e9..01c7bfff5 100644 --- a/src/cmd_who.cpp +++ b/src/cmd_who.cpp @@ -128,11 +128,11 @@ void cmd_who::Handle (const char** parameters, int pcnt, userrec *user) /* who on a single user */ std::string wholine = initial; - wholine = wholine + getlastchanname(i->second) + " " + i->second->ident + " " + i->second->dhost + " " + - i->second->server + " " + i->second->nick + " "; + wholine = wholine + getlastchanname(u) + " " + u->ident + " " + u->dhost + " " + + u->server + " " + u->nick + " "; /* away? */ - if (*(i->second)->awaymsg) + if (*u->awaymsg) { wholine.append("G"); } @@ -142,16 +142,16 @@ void cmd_who::Handle (const char** parameters, int pcnt, userrec *user) } /* oper? */ - if (*(i->second)->oper) + if (*u->oper) { wholine.append("*"); } - wholine = wholine + cmode(i->second, ch) + " :0 " + i->second->fullname; + wholine = wholine + cmode(u, ch) + " :0 " + u->fullname; whoresults.push_back(wholine); } - is (*parameters[0] == '*' || *parameters[0] == '0') + if (*parameters[0] == '*' || *parameters[0] == '0') { if (!opt_viewopersonly && !*user->oper) return; /* No way, jose */ @@ -160,13 +160,15 @@ void cmd_who::Handle (const char** parameters, int pcnt, userrec *user) { for (std::vector::iterator i = all_opers.begin(); i != all_opers.end(); i++) { + userrec* oper = (userrec*)*i; + std::string wholine = initial; - wholine = wholine + getlastchanname(i->second) + " " + i->second->ident + " " + i->second->dhost + " " + - i->second->server + " " + i->second->nick + " "; + wholine = wholine + getlastchanname(oper) + " " + oper->ident + " " + oper->dhost + " " + + oper->server + " " + oper->nick + " "; /* away? */ - if (*(i->second)->awaymsg) + if (*oper->awaymsg) { wholine.append("G"); } @@ -176,18 +178,18 @@ void cmd_who::Handle (const char** parameters, int pcnt, userrec *user) } /* oper? */ - if (*(i->second)->oper) + if (*oper->oper) { wholine.append("*"); } - wholine = wholine + cmode(i->second, ch) + " :0 " + i->second->fullname; + wholine = wholine + cmode(oper, ch) + " :0 " + oper->fullname; whoresults.push_back(wholine); } } else { - for (std::vector::iterator i = clientlist.begin(); i != clientlist.end(); i++) + for (user_hash::iterator i = clientlist.begin(); i != clientlist.end(); i++) { std::string wholine = initial; -- cgit v1.2.3