From 4ad7f36207f1f77e8281b03655494394b03925f1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 7 Feb 2007 19:30:53 +0000 Subject: [PATCH] fixed auth string being returned as true if not available --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40455 --- core/smn_player.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/smn_player.cpp b/core/smn_player.cpp index 0d46b02b..76ef0750 100644 --- a/core/smn_player.cpp +++ b/core/smn_player.cpp @@ -98,7 +98,13 @@ static cell_t sm_GetClientAuthStr(IPluginContext *pCtx, const cell_t *params) return pCtx->ThrowNativeError("Client %d is not connected.", index); } + if (!pPlayer->IsAuthorized()) + { + return 0; + } + pCtx->StringToLocal(params[2], static_cast(params[3]), pPlayer->GetAuthString()); + return 1; }