Fix filter X-lines not including the module name in the setter.

This commit is contained in:
Sadie Powell 2023-07-05 09:57:58 +01:00
parent 7b1f75d392
commit 74955098b1

View File

@ -465,7 +465,7 @@ ModResult ModuleFilter::OnUserPreMessage(User* user, const MessageTarget& msgtar
}
else if (f->action == FA_SHUN && (ServerInstance->XLines->GetFactory("SHUN")))
{
Shun* sh = new Shun(ServerInstance->Time(), f->duration, ServerInstance->Config->ServerName, f->reason, user->GetIPString());
Shun* sh = new Shun(ServerInstance->Time(), f->duration, MODNAME "@" + ServerInstance->Config->ServerName, f->reason, user->GetIPString());
ServerInstance->SNO->WriteGlobalSno('f', InspIRCd::Format("%s (%s) was shunned for %s (expires on %s) because their message to %s matched %s (%s)",
user->nick.c_str(), sh->Displayable().c_str(), InspIRCd::DurationString(f->duration).c_str(),
InspIRCd::TimeString(ServerInstance->Time() + f->duration).c_str(),
@ -479,7 +479,7 @@ ModResult ModuleFilter::OnUserPreMessage(User* user, const MessageTarget& msgtar
}
else if (f->action == FA_GLINE)
{
GLine* gl = new GLine(ServerInstance->Time(), f->duration, ServerInstance->Config->ServerName, f->reason, "*", user->GetIPString());
GLine* gl = new GLine(ServerInstance->Time(), f->duration, MODNAME "@" + ServerInstance->Config->ServerName, f->reason, "*", user->GetIPString());
ServerInstance->SNO->WriteGlobalSno('f', InspIRCd::Format("%s (%s) was G-lined for %s (expires on %s) because their message to %s matched %s (%s)",
user->nick.c_str(), gl->Displayable().c_str(), InspIRCd::DurationString(f->duration).c_str(),
InspIRCd::TimeString(ServerInstance->Time() + f->duration).c_str(),
@ -493,7 +493,7 @@ ModResult ModuleFilter::OnUserPreMessage(User* user, const MessageTarget& msgtar
}
else if (f->action == FA_ZLINE)
{
ZLine* zl = new ZLine(ServerInstance->Time(), f->duration, ServerInstance->Config->ServerName, f->reason, user->GetIPString());
ZLine* zl = new ZLine(ServerInstance->Time(), f->duration, MODNAME "@" + ServerInstance->Config->ServerName, f->reason, user->GetIPString());
ServerInstance->SNO->WriteGlobalSno('f', InspIRCd::Format("%s (%s) was Z-lined for %s (expires on %s) because their message to %s matched %s (%s)",
user->nick.c_str(), zl->Displayable().c_str(), InspIRCd::DurationString(f->duration).c_str(),
InspIRCd::TimeString(ServerInstance->Time() + f->duration).c_str(),
@ -570,7 +570,7 @@ ModResult ModuleFilter::OnPreCommand(std::string& command, CommandBase::Params&
if (f->action == FA_GLINE)
{
/* Note: We G-line *@IP so that if their host doesn't resolve the G-line still applies. */
GLine* gl = new GLine(ServerInstance->Time(), f->duration, ServerInstance->Config->ServerName, f->reason, "*", user->GetIPString());
GLine* gl = new GLine(ServerInstance->Time(), f->duration, MODNAME "@" + ServerInstance->Config->ServerName, f->reason, "*", user->GetIPString());
ServerInstance->SNO->WriteGlobalSno('f', InspIRCd::Format("%s (%s) was G-lined for %s (expires on %s) because their %s message matched %s (%s)",
user->nick.c_str(), gl->Displayable().c_str(),
InspIRCd::DurationString(f->duration).c_str(),
@ -586,7 +586,7 @@ ModResult ModuleFilter::OnPreCommand(std::string& command, CommandBase::Params&
}
if (f->action == FA_ZLINE)
{
ZLine* zl = new ZLine(ServerInstance->Time(), f->duration, ServerInstance->Config->ServerName, f->reason, user->GetIPString());
ZLine* zl = new ZLine(ServerInstance->Time(), f->duration, MODNAME "@" + ServerInstance->Config->ServerName, f->reason, user->GetIPString());
ServerInstance->SNO->WriteGlobalSno('f', InspIRCd::Format("%s (%s) was Z-lined for %s (expires on %s) because their %s message matched %s (%s)",
user->nick.c_str(), zl->Displayable().c_str(),
InspIRCd::DurationString(f->duration).c_str(),
@ -603,7 +603,7 @@ ModResult ModuleFilter::OnPreCommand(std::string& command, CommandBase::Params&
else if (f->action == FA_SHUN && (ServerInstance->XLines->GetFactory("SHUN")))
{
/* Note: We shun *!*@IP so that if their host doesnt resolve the shun still applies. */
Shun* sh = new Shun(ServerInstance->Time(), f->duration, ServerInstance->Config->ServerName, f->reason, user->GetIPString());
Shun* sh = new Shun(ServerInstance->Time(), f->duration, MODNAME "@" + ServerInstance->Config->ServerName, f->reason, user->GetIPString());
ServerInstance->SNO->WriteGlobalSno('f', InspIRCd::Format("%s (%s) was shunned for %s (expires on %s) because their %s message matched %s (%s)",
user->nick.c_str(), sh->Displayable().c_str(),
InspIRCd::DurationString(f->duration).c_str(),