From c164c44eb8024fc2aa478c1fb904eb9da3311469 Mon Sep 17 00:00:00 2001 From: z411 Date: Tue, 10 Nov 2020 08:47:06 -0300 Subject: [PATCH] Fix broken notifications with bots --- qcsrc/common/notifications/all.qc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index b2e278a18..6038e6df8 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -79,6 +79,9 @@ string Notification_CheckArgs( bool Notification_ShouldSend(NOTIF broadcast, entity to_client, entity other_client) { + if(!IS_REAL_CLIENT(to_client)) + return false; + switch (broadcast) { case NOTIF_ONE: @@ -1520,7 +1523,7 @@ void Send_Notification( MSG net_type, Notification net_name, ...count) { - if (broadcast != NOTIF_ALL && broadcast != NOTIF_ALL_EXCEPT && !IS_REAL_CLIENT(client)) return; + if (broadcast == NOTIF_ONE_ONLY && !IS_REAL_CLIENT(client)) return; entity notif = net_name; string parms = sprintf("%s, '%s', %s, %s", Get_Notif_BroadcastName(broadcast), -- 2.39.2