this->source = "m_cgiirc.so";
this->syntax = "password client hostname ip";
}
- CmdResult Handle(const char* const* parameters, int pcnt, User *user)
+ CmdResult Handle(const std::vector<std::string> ¶meters, User *user)
{
if(user->registered == REG_ALL)
return CMD_FAILURE;
user->Extend("cgiirc_realhost", new std::string(user->host));
user->Extend("cgiirc_realip", new std::string(user->GetIPString()));
if (notify)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", user->nick, user->host, parameters[2], user->host);
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", user->nick, user->host, parameters[2].c_str(), user->host);
user->Extend("cgiirc_webirc_hostname", new std::string(parameters[2]));
user->Extend("cgiirc_webirc_ip", new std::string(parameters[3]));
return CMD_LOCALONLY;
strlcpy(them->dhost, result.c_str(), 63);
strlcpy(them->ident, "~cgiirc", 8);
them->InvalidateCache();
+ them->CheckLines();
}
}
virtual void OnRehash(User* user, const std::string ¶meter)
{
ConfigReader Conf(ServerInstance);
+ Hosts.clear();
NotifyOpers = Conf.ReadFlag("cgiirc", "opernotice", 0); // If we send an oper notice when a CGI:IRC has their host changed.
if(iter->type == PASS)
{
CheckPass(user); // We do nothing if it fails so...
+ user->CheckLines();
}
else if(iter->type == PASSFIRST && !CheckPass(user))
{
// If the password lookup failed, try the ident
CheckIdent(user); // If this fails too, do nothing
+ user->CheckLines();
}
else if(iter->type == IDENT)
{
CheckIdent(user); // Nothing on failure.
+ user->CheckLines();
}
else if(iter->type == IDENTFIRST && !CheckIdent(user))
{
// If the ident lookup fails, try the password.
CheckPass(user);
+ user->CheckLines();
}
else if(iter->type == WEBIRC)
{
ServerInstance->Users->AddLocalClone(user);
ServerInstance->Users->AddGlobalClone(user);
user->CheckClass();
+ user->CheckLines();
}
}
catch (...)
{
if (NotifyOpers)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but i could not resolve their hostname!", user->nick, user->host);
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick, user->host);
}
}
user->InvalidateCache();
if(NotifyOpers)
- ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but i could not resolve their hostname!", user->nick, user->host);
+ ServerInstance->SNO->WriteToSnoMask('A', "Connecting user %s detected as using CGI:IRC (%s), but I could not resolve their hostname!", user->nick, user->host);
}
/*strlcpy(user->host, newip, 16);
strlcpy(user->dhost, newip, 16);
virtual Version GetVersion()
{
- return Version(1,1,0,0,VF_VENDOR,API_VERSION);
+ return Version(1,2,0,0,VF_VENDOR,API_VERSION);
}
};