In globalchat filter messages without content
This commit is contained in:
parent
e446f7166c
commit
a25aa09b87
1 changed files with 2 additions and 2 deletions
|
@ -88,8 +88,8 @@ void on_message(CMessage msg, std::function<void (CMessage)> cb) {
|
||||||
cb(msg);
|
cb(msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Check if user is blacklisted
|
// Check if message has no content or user is blacklisted
|
||||||
if (env.db->get(to_dbid(msg->author->id), "GC_BLACKLISTED", db_templates::user).as<bool>()) {
|
if (msg->content.empty() or env.db->get(to_dbid(msg->author->id), "GC_BLACKLISTED", db_templates::user).as<bool>()) {
|
||||||
msg->remove();
|
msg->remove();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue