Finish updating to newdecls (#9)

* newdecls for ext struct

* Update connect.sp

* spaces2tabs
This commit is contained in:
sapphonie 2021-10-23 17:51:38 -04:00 committed by GitHub
parent b307ee9e5e
commit 0d9e80e474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@
forward bool OnClientPreConnectEx(const char[] name, char password[255], const char[] ip, const char[] steamID, char rejectReason[255]);
public Extension:__ext_Connect =
public Extension __ext_Connect =
{
name = "Connect",
file = "connect.ext",

View File

@ -1,14 +1,15 @@
#pragma semicolon 1 // Force strict semicolon mode.
#pragma newdecls required // Force new syntax
#include <sourcemod>
#define REQUIRE_EXTENSIONS
#include <connect>
public bool:OnClientPreConnectEx(const String:name[], String:password[255], const String:ip[], const String:steamID[], String:rejectReason[255])
public bool OnClientPreConnectEx(const char[] name, char password[255], const char[] ip, const char[] steamID, char rejectReason[255])
{
PrintToServer("----------------\nName: %s\nPassword: %s\nIP: %s\nSteamID: %s\n----------------", name, password, ip, steamID);
new AdminId:admin = FindAdminByIdentity(AUTHMETHOD_STEAM, steamID);
AdminId admin = FindAdminByIdentity(AUTHMETHOD_STEAM, steamID);
if (admin == INVALID_ADMIN_ID)
{