From bcf922ac02d34ec1d7afda59e43f3a4793ead75a Mon Sep 17 00:00:00 2001 From: zaCade Date: Fri, 23 Mar 2018 14:18:30 +0100 Subject: [PATCH] ConnectAnnounce: Show no-steam clients. --- ConnectAnnounce/scripting/ConnectAnnounce.sp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ConnectAnnounce/scripting/ConnectAnnounce.sp b/ConnectAnnounce/scripting/ConnectAnnounce.sp index 4dd72f65..3d658b96 100644 --- a/ConnectAnnounce/scripting/ConnectAnnounce.sp +++ b/ConnectAnnounce/scripting/ConnectAnnounce.sp @@ -1,6 +1,7 @@ #pragma semicolon 1 #include +#include #include #pragma newdecls required @@ -9,7 +10,7 @@ public Plugin myinfo = { name = "Connect Announce", author = "BotoX", description = "Simple connect announcer", - version = "1.0", + version = "1.1", url = "" } @@ -18,14 +19,18 @@ public void OnClientPostAdminCheck(int client) if(IsFakeClient(client)) return; - static char sAuth[32]; static char sIP[16]; + static char sAuth[32]; static char sCountry[32]; GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth)); + char sNoSteam[16]; + if(!SteamClientAuthenticated(sAuth)) + strcopy(sNoSteam, sizeof(sNoSteam), " [\x03NoSteam\x04]"); + if(GetClientIP(client, sIP, sizeof(sIP)) && GeoipCountry(sIP, sCountry, sizeof(sCountry))) - PrintToChatAll("\x04%N [\x03%s\x04] connected from %s", client, sAuth, sCountry); + PrintToChatAll("\x04%N [\x03%s\x04] connected from %s%s", client, sAuth, sCountry, sNoSteam); else - PrintToChatAll("\x04%N [\x03%s\x04] connected", client, sAuth); + PrintToChatAll("\x04%N [\x03%s\x04] connected%s", client, sAuth, sNoSteam); }