From b50d6b198c5c5ab581e0fecf5a20aba8b9c2a0d7 Mon Sep 17 00:00:00 2001 From: jeefo Date: Sun, 9 Jun 2019 00:55:09 +0300 Subject: [PATCH] Do not issue any chat if chat is off. --- source/chatlib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/chatlib.cpp b/source/chatlib.cpp index d3ec46b..b9a9bff 100644 --- a/source/chatlib.cpp +++ b/source/chatlib.cpp @@ -418,7 +418,7 @@ bool Bot::isReplyingToChat (void) { void Bot::say (const char *text) { // this function prints saytext message to all players - if (isEmptyStr (text)) { + if (isEmptyStr (text) || !yb_chat.boolean ()) { return; } engine.execBotCmd (ent (), "say \"%s\"", text); @@ -427,7 +427,7 @@ void Bot::say (const char *text) { void Bot::sayTeam (const char *text) { // this function prints saytext message only for teammates - if (isEmptyStr (text)) { + if (isEmptyStr (text) || !yb_chat.boolean ()) { return; } engine.execBotCmd (ent (), "say_team \"%s\"", text);