less times where refreshing connection, hopefully no handle leaks

This commit is contained in:
jenz 2023-06-18 23:29:45 +02:00
parent fcb88886c9
commit 16441ae7a5

View File

@ -31,7 +31,6 @@ public Action time_query_activity(Handle timer, any data)
{
if (!g_hDatabase)
{
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
return Plugin_Continue;
}
char sServer[64];
@ -108,7 +107,6 @@ public Action log_average_hour_count(Handle timer, any data)
int avg_hour = GetAveragePlayerActiveTimeServer();
if (!g_hDatabase)
{
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
return Plugin_Handled;
}
char sQuery[512];
@ -201,7 +199,6 @@ public void OnClientPostAdminCheck(int client)
return;
if (!g_hDatabase)
{
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
return;
}
insert_client(client);
@ -398,7 +395,6 @@ public Action Command_Time(int client, int args)
{
if (!g_hDatabase)
{
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
return Plugin_Handled;
}
char sQuery[512];