Browse Source

Remove INVALID_USERID check

That check was also only meant to be used when calling the function to
check account status for a user that wasn't connected.
nosoop 6 years ago
parent
commit
61a2e0c719
1 changed files with 8 additions and 11 deletions
  1. 8 11
      scripting/source_cbl.sp

+ 8 - 11
scripting/source_cbl.sp

@@ -9,7 +9,7 @@
 #pragma newdecls required
 #include "source_cbl/webapi.sp"
 
-#define PLUGIN_VERSION "0.2.2"
+#define PLUGIN_VERSION "0.2.3"
 public Plugin myinfo = {
 	name = "[CSRD] SourceCBL Integration",
 	author = "nosoop",
@@ -19,7 +19,6 @@ public Plugin myinfo = {
 }
 
 #define REQUESTER_CONSOLE -1
-#define INVALID_USERID -1
 
 char g_CommunityKickLog[PLATFORM_MAX_PATH];
 
@@ -73,15 +72,13 @@ public Action CheckCBLStatus(int client, int argc) {
 
 public void OnSteamAuthBanStatusReceived(const char[] steamid64, bool bBanned, int userid) {
 	// player in banlist, request ban
-	if (bBanned && userid != INVALID_USERID) {
-		int client = GetClientOfUserId(userid);
-		if (client) {
-			KickClient(client,
-					"You have been banned by SourceCBL for hacking / cheating."
-					... "\nVisit www.SourceCBL.com for more information.");
-			
-			LogToFile(g_CommunityKickLog, "Kicked \"%L\" from server.", client);
-		}
+	int client = GetClientOfUserId(userid);
+	if (bBanned && client) {
+		KickClient(client,
+				"You have been banned by SourceCBL for hacking / cheating."
+				... "\nVisit www.SourceCBL.com for more information.");
+		
+		LogToFile(g_CommunityKickLog, "Kicked \"%L\" from server.", client);
 	}
 }