Fix sending the wrong message when a user requests stats.

Closes #2051.
This commit is contained in:
Sadie Powell 2023-07-12 12:24:07 +01:00
parent c9668b8ab6
commit a247b41516
3 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ void CommandStats::DoStats(Stats::Context& stats)
if (res == MOD_RES_DENY)
{
const char* what = IS_LOCAL(user) ? "Stats" : "Remote stats";
ServerInstance->SNO.WriteToSnoMask('t', "{} '{}' denied for {} ({})", what, statschar, user->nick, user->GetRealUserHost());
ServerInstance->SNO.WriteToSnoMask('t', "{} '{}' requested by {} ({})", what, statschar, user->nick, user->GetRealUserHost());
stats.AddRow(219, statschar, "End of /STATS report");
return;
}

View File

@ -658,7 +658,7 @@ public:
stats.AddGenericRow("Total DNSBL hits: " + ConvToStr(total_hits));
stats.AddGenericRow("Total DNSBL misses: " + ConvToStr(total_misses));
stats.AddGenericRow("Total DNSBL errors: " + ConvToStr(total_errors));
return MOD_RES_PASSTHRU;
return MOD_RES_DENY;
}
};

View File

@ -915,7 +915,7 @@ ModResult ModuleFilter::OnStats(Stats::Context& stats)
stats.AddRow(223, "EXEMPT " + exemptednick);
}
}
return MOD_RES_PASSTHRU;
return MOD_RES_DENY;
}
void ModuleFilter::OnUnloadModule(Module* mod)