CloseHandle -> delete

This commit is contained in:
neon
2019-07-07 22:44:43 +02:00
parent 4dd4ff521b
commit eeba405984
18 changed files with 258 additions and 292 deletions
+4 -7
View File
@@ -196,8 +196,7 @@ public Action Command_JoinMsg(int client, int args)
char sAuth[32];
GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth));
if (g_hCustomMessageFile != null)
CloseHandle(g_hCustomMessageFile);
delete g_hCustomMessageFile;
g_hCustomMessageFile = CreateKeyValues("custom_messages");
@@ -270,8 +269,7 @@ public Action Command_ResetJoinMsg(int client, int args)
char sAuth[32];
GetClientAuthId(client, AuthId_Steam2, sAuth, sizeof(sAuth));
if (g_hCustomMessageFile != null)
CloseHandle(g_hCustomMessageFile);
delete g_hCustomMessageFile;
g_hCustomMessageFile = CreateKeyValues("custom_messages");
@@ -323,7 +321,7 @@ public void TQueryCB(Handle owner, Handle rs, const char[] error, any data)
{
ReadFileLine(hFile, sRawMsg, sizeof(sRawMsg));
TrimString(sRawMsg);
CloseHandle(hFile);
delete hFile;
}
else
{
@@ -411,8 +409,7 @@ public void TQueryCB(Handle owner, Handle rs, const char[] error, any data)
return;
}
if (g_hCustomMessageFile2 != null)
CloseHandle(g_hCustomMessageFile2);
delete g_hCustomMessageFile2;
g_hCustomMessageFile2 = CreateKeyValues("custom_messages");