ignore pings, the polute the chat and are unreadable without context
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
Some checks failed
ContinuousDelivery / linux-ubuntu (push) Has been cancelled
ContinuousDelivery / windows (push) Has been cancelled
ContinuousIntegration / linux (push) Has been cancelled
ContinuousIntegration / macos (push) Has been cancelled
ContinuousIntegration / windows (push) Has been cancelled
ContinuousDelivery / release (push) Has been cancelled
This commit is contained in:
parent
b62ab60366
commit
f69923cbbb
@ -94,6 +94,12 @@ bool Factorio::onEvent(const FactorioLog::Events::Leave& e) {
|
|||||||
bool Factorio::onEvent(const FactorioLog::Events::Chat& e) {
|
bool Factorio::onEvent(const FactorioLog::Events::Chat& e) {
|
||||||
std::cout << "Factorio: event chat " << e.player_name << ": " << e.message << "\n";
|
std::cout << "Factorio: event chat " << e.player_name << ": " << e.message << "\n";
|
||||||
|
|
||||||
|
// ignore pings
|
||||||
|
constexpr std::string_view ping_prefix{"[gps="};
|
||||||
|
if (e.message.size() > ping_prefix.size() && e.message.substr(0, ping_prefix.size()) == ping_prefix) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
std::string message{"<"};
|
std::string message{"<"};
|
||||||
message += e.player_name;
|
message += e.player_name;
|
||||||
message += ">: ";
|
message += ">: ";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user