summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-16 17:49:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-16 17:49:43 +0000
commit2dfa145d9988bbf4d8ed96206f9d3032e05d6a67 (patch)
tree629a5322a5e79737d52348a8d87ac02b4e3d40b6
parentfe6158e2374d6de2a6928133ad7c5b76dc71731d (diff)
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
-rw-r--r--src/cmd_who.cpp26
1 files changed, 14 insertions, 12 deletions
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<userrec*>::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<userrec*>::iterator i = clientlist.begin(); i != clientlist.end(); i++)
+ for (user_hash::iterator i = clientlist.begin(); i != clientlist.end(); i++)
{
std::string wholine = initial;