if (!user)
return;
- Command* oper_command = ServerInstance->Parser->GetHandler("OPER");
+ Command* oper_command = ServerInstance->Parser.GetHandler("OPER");
if (!oper_command)
return;
- std::vector<std::string> params;
+ CommandBase::Params params;
params.push_back(opername);
params.push_back(password);
- oper_command->Handle(params, user);
+ ClientProtocol::TagMap tags;
+ oper_command->Handle(user, CommandBase::Params(params, tags));
}
void Fallback()
void OnResult(const LDAPResult& r) CXX11_OVERRIDE
{
User* user = ServerInstance->FindUUID(uid);
- OperIndex::iterator iter = ServerInstance->Config->oper_blocks.find(opername);
+ ServerConfig::OperIndex::const_iterator iter = ServerInstance->Config->oper_blocks.find(opername);
if (!user || iter == ServerInstance->Config->oper_blocks.end())
{
attribute = tag->getString("attribute");
}
- ModResult OnPreCommand(std::string& command, std::vector<std::string>& parameters, LocalUser* user, bool validated, const std::string& original_line) CXX11_OVERRIDE
+ ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) CXX11_OVERRIDE
{
if (validated && command == "OPER" && parameters.size() >= 2)
{
const std::string& opername = parameters[0];
const std::string& password = parameters[1];
- OperIndex::iterator it = ServerInstance->Config->oper_blocks.find(opername);
+ ServerConfig::OperIndex::const_iterator it = ServerInstance->Config->oper_blocks.find(opername);
if (it == ServerInstance->Config->oper_blocks.end())
return MOD_RES_PASSTHRU;
return MOD_RES_PASSTHRU;
std::string acceptedhosts = tag->getString("host");
- std::string hostname = user->ident + "@" + user->host;
+ std::string hostname = user->ident + "@" + user->GetRealHost();
if (!InspIRCd::MatchMask(acceptedhosts, hostname, user->GetIPString()))
return MOD_RES_PASSTHRU;