#include "inspircd.h"
-/* $ModDesc: Implementation of callerid, usermode +g, /accept */
-
class callerid_data
{
public:
if (!targ)
{
- ServerInstance->Logs->Log("m_callerid", LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (1)");
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (1)");
continue; // shouldn't happen, but oh well.
}
if (it2 != targ->wholistsme.end())
targ->wholistsme.erase(it2);
else
- ServerInstance->Logs->Log("m_callerid", LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (2)");
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (2)");
}
delete dat;
}
if (!dat2)
{
// How the fuck is this possible.
- ServerInstance->Logs->Log("m_callerid", LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (3)");
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (3)");
return false;
}
// Found me!
dat2->wholistsme.erase(it);
else
- ServerInstance->Logs->Log("m_callerid", LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (4)");
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (4)");
user->WriteNotice(whotoremove->nick + " is no longer on your accept list");
if (it2 != dat->accepting.end())
dat->accepting.erase(it2);
else
- ServerInstance->Logs->Log("m_callerid", LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (5)");
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "ERROR: Inconsistency detected in callerid state, please report (5)");
}
userdata->wholistsme.clear();
ServerInstance->Modules->AddService(myumode);
ServerInstance->Modules->AddService(cmd);
ServerInstance->Modules->AddService(cmd.extInfo);
-
- Implementation eventlist[] = { I_OnRehash, I_OnUserPostNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreMessage };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
Version GetVersion() CXX11_OVERRIDE
ModResult PreText(User* user, User* dest, std::string& text)
{
- if (!dest->IsModeSet('g') || (user == dest))
+ if (!dest->IsModeSet(myumode) || (user == dest))
return MOD_RES_PASSTHRU;
if (operoverride && user->IsOper())