#include "configreader.h"
#include "users.h"
-#include "message.h"
#include "modules.h"
#include "commands.h"
#include "helperfuncs.h"
#include "wildcard.h"
#include "commands/cmd_who.h"
-extern InspIRCd* ServerInstance;
-extern chan_hash chanlist;
-extern std::vector<userrec*> all_opers;
+
/* get the last 'visible' chan of a user */
static char *getlastchanname(userrec *u)
wholine.append("*");
}
- wholine = wholine + cmode(i->second, ch) + " :0 " + i->second->fullname;
+ wholine = wholine + ch->GetStatusChar(i->second) + " :0 " + i->second->fullname;
whoresults.push_back(wholine);
}
}
if (opt_viewopersonly)
{
/* Showing only opers */
- for (std::vector<userrec*>::iterator i = all_opers.begin(); i != all_opers.end(); i++)
+ for (std::vector<userrec*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
{
userrec* oper = *i;
wholine.append("*");
}
- wholine = wholine + cmode(oper, ch) + " :0 " + oper->fullname;
+ wholine = wholine + ch->GetStatusChar(oper) + " :0 " + oper->fullname;
whoresults.push_back(wholine);
}
}
wholine.append("*");
}
- wholine = wholine + cmode(i->second, ch) + " :0 " + i->second->fullname;
+ wholine = wholine + ch->GetStatusChar(i->second) + " :0 " + i->second->fullname;
whoresults.push_back(wholine);
}
}