CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
{
- if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName)
+ if (parameters.size() > 1 && parameters[1] != ServerInstance->Config->ServerName.c_str())
return CMD_SUCCESS;
User *targuser;
else
ServerInstance->DumpText(user, checkstr + " onip " + targuser->GetIPString());
- chliststr = targuser->ChannelList(targuser);
+ for (UCListIter i = targuser->chans.begin(); i != targuser->chans.end(); i++)
+ {
+ Channel* c = *i;
+ chliststr.append(c->GetPrefixChar(targuser)).append(c->name).append(" ");
+ }
+
std::stringstream dump(chliststr);
ServerInstance->DumpText(user,checkstr + " onchans", dump);
private:
CommandCheck mycommand;
public:
- ModuleCheck(InspIRCd* Me) : Module(Me), mycommand(this)
+ ModuleCheck() : mycommand(this)
{
ServerInstance->AddCommand(&mycommand);
}