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);
|
||||
return;
|
||||
}
|
||||
// Check if user is blacklisted
|
||||
if (env.db->get(to_dbid(msg->author->id), "GC_BLACKLISTED", db_templates::user).as<bool>()) {
|
||||
// Check if message has no content or user is blacklisted
|
||||
if (msg->content.empty() or env.db->get(to_dbid(msg->author->id), "GC_BLACKLISTED", db_templates::user).as<bool>()) {
|
||||
msg->remove();
|
||||
return;
|
||||
}
|
||||
|
|
Reference in a new issue