From dd55716f15921bed2fa11850e4611357d09409d7 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Thu, 6 Sep 2007 16:37:57 +0000 Subject: [PATCH] Fix for bail breaking is_user_bot - amb914 This still doesn't cache since that proved to be buggy; this will check the flag first, and then auth second. --- amxmodx/CMisc.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/amxmodx/CMisc.h b/amxmodx/CMisc.h index 7a72e16d..d1aafb4e 100755 --- a/amxmodx/CMisc.h +++ b/amxmodx/CMisc.h @@ -130,7 +130,18 @@ public: inline bool IsBot() { - return ((pEdict->v.flags & FL_FAKECLIENT) == FL_FAKECLIENT); + if ((pEdict->v.flags & FL_FAKECLIENT) == FL_FAKECLIENT) + { + return true; + } + + const char *auth = GETPLAYERAUTHID(pEdict); + if (auth && (strcmp(auth, "BOT") == 0)) + { + return true; + } + + return false; } inline bool IsAlive()