Skip to content
Permalink
Browse files

Shutdown server when the server is banned.

  • Loading branch information
Bara committed Mar 14, 2019
1 parent 2edc214 commit 2bca65ce6985930fb9dc399db7a0dff426c69e28
Showing with 7 additions and 1 deletion.
  1. +7 −1 addons/sourcemod/scripting/ttt/core/version.sp
@@ -89,7 +89,8 @@ public void OnHTTPCallback(Handle hRequest, bool bFailure, bool bRequestSuccessf

if (StrContains(sVersion, "Banned", false) != -1)
{
SetFailState("Your server was banned!");
LogError("Your server was banned, Server will shutting down!");
CreateTimer(1.0, Timer_Shutdown);
return;
}

@@ -104,3 +105,8 @@ public void OnHTTPCallback(Handle hRequest, bool bFailure, bool bRequestSuccessf

delete hRequest;
}

public Action Timer_Shutdown(Handle timer)
{
ServerCommand("quit");
}

0 comments on commit 2bca65c

Please sign in to comment.
You can’t perform that action at this time.