SimpleUserModeHandler myumode;
// Configuration variables:
- bool operoverride; // Operators can override callerid.
bool tracknick; // Allow ACCEPT entries to update with nick changes.
unsigned int notify_cooldown; // Seconds between notifications.
void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE
{
+ tokens["ACCEPT"] = ConvToStr(cmd.maxaccepts);
tokens["CALLERID"] = ConvToStr(myumode.GetModeChar());
}
if (!dest->IsModeSet(myumode) || (user == dest))
return MOD_RES_PASSTHRU;
- if (operoverride && user->IsOper())
+ if (user->HasPrivPermission("users/callerid-override"))
return MOD_RES_PASSTHRU;
callerid_data* dat = cmd.extInfo.get(dest, true);
{
ConfigTag* tag = ServerInstance->Config->ConfValue("callerid");
cmd.maxaccepts = tag->getInt("maxaccepts", 16);
- operoverride = tag->getBool("operoverride");
tracknick = tag->getBool("tracknick");
notify_cooldown = tag->getDuration("cooldown", 60);
}