less times where refreshing connection, hopefully no handle leaks
This commit is contained in:
parent
fcb88886c9
commit
16441ae7a5
@ -31,7 +31,6 @@ public Action time_query_activity(Handle timer, any data)
|
|||||||
{
|
{
|
||||||
if (!g_hDatabase)
|
if (!g_hDatabase)
|
||||||
{
|
{
|
||||||
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
|
|
||||||
return Plugin_Continue;
|
return Plugin_Continue;
|
||||||
}
|
}
|
||||||
char sServer[64];
|
char sServer[64];
|
||||||
@ -108,7 +107,6 @@ public Action log_average_hour_count(Handle timer, any data)
|
|||||||
int avg_hour = GetAveragePlayerActiveTimeServer();
|
int avg_hour = GetAveragePlayerActiveTimeServer();
|
||||||
if (!g_hDatabase)
|
if (!g_hDatabase)
|
||||||
{
|
{
|
||||||
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
|
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
char sQuery[512];
|
char sQuery[512];
|
||||||
@ -201,7 +199,6 @@ public void OnClientPostAdminCheck(int client)
|
|||||||
return;
|
return;
|
||||||
if (!g_hDatabase)
|
if (!g_hDatabase)
|
||||||
{
|
{
|
||||||
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
insert_client(client);
|
insert_client(client);
|
||||||
@ -398,7 +395,6 @@ public Action Command_Time(int client, int args)
|
|||||||
{
|
{
|
||||||
if (!g_hDatabase)
|
if (!g_hDatabase)
|
||||||
{
|
{
|
||||||
Database.Connect(SQL_OnDatabaseConnect, "unloze_playtimestats");
|
|
||||||
return Plugin_Handled;
|
return Plugin_Handled;
|
||||||
}
|
}
|
||||||
char sQuery[512];
|
char sQuery[512];
|
||||||
|
Loading…
Reference in New Issue
Block a user