custom-chatcolors: only save file on map end to prevent lag exploits
This commit is contained in:
parent
fe0a20ff44
commit
2b35849922
@ -187,6 +187,18 @@ void LoadConfig()
|
||||
}
|
||||
}
|
||||
|
||||
public void OnMapEnd()
|
||||
{
|
||||
KvRewind(g_hConfigFile);
|
||||
KvRewind(g_hBanFile);
|
||||
|
||||
KeyValuesToFile(g_hConfigFile, g_sPath);
|
||||
KeyValuesToFile(g_hBanFile, g_sBanPath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* public OnLibraryRemoved(const char name[])
|
||||
{
|
||||
if (StrEqual(name, "adminmenu"))
|
||||
@ -415,12 +427,14 @@ bool SetColor(char SID[64], char Key[64], char HEX[64], int client, bool IgnoreB
|
||||
}
|
||||
|
||||
KvRewind(g_hConfigFile);
|
||||
KeyValuesToFile(g_hConfigFile, g_sPath);
|
||||
KeyValuesToFile(g_hBanFile, g_sBanPath);
|
||||
//KeyValuesToFile(g_hConfigFile, g_sPath);
|
||||
//KeyValuesToFile(g_hBanFile, g_sBanPath);
|
||||
|
||||
LoadConfig();
|
||||
Call_StartForward(configReloadedForward);
|
||||
Call_Finish();
|
||||
OnClientPostAdminCheck(client);
|
||||
|
||||
//LoadConfig();
|
||||
//Call_StartForward(configReloadedForward);
|
||||
//Call_Finish();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -495,12 +509,13 @@ bool SetTag(char SID[64], char text[64], int client, bool IgnoreBan=false)
|
||||
}
|
||||
|
||||
KvRewind(g_hConfigFile);
|
||||
KeyValuesToFile(g_hConfigFile, g_sPath);
|
||||
KeyValuesToFile(g_hBanFile, g_sBanPath);
|
||||
//KeyValuesToFile(g_hConfigFile, g_sPath);
|
||||
//KeyValuesToFile(g_hBanFile, g_sBanPath);
|
||||
OnClientPostAdminCheck(client);
|
||||
|
||||
LoadConfig();
|
||||
Call_StartForward(configReloadedForward);
|
||||
Call_Finish();
|
||||
//LoadConfig();
|
||||
//Call_StartForward(configReloadedForward);
|
||||
//Call_Finish();
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -589,7 +604,7 @@ bool ToggleCCC(char SID[64], int client)
|
||||
}
|
||||
|
||||
KvRewind(g_hConfigFile);
|
||||
KeyValuesToFile(g_hConfigFile, g_sPath);
|
||||
//KeyValuesToFile(g_hConfigFile, g_sPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user