correctly determine servername

This commit is contained in:
2019-11-02 14:55:27 +01:00
parent 636f8086a1
commit 4e648e21c4
2 changed files with 5 additions and 2 deletions

View File

@@ -70,10 +70,13 @@ public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max){
public OnPluginStart(){
/* get and verify server name for output file */
char server[SNAME_LEN];
ServerName(server, sizeof(server));
logfile = OpenFile(server,"at",false,NULL_STRING);
if strlen(server) < 1:
return ThrowNativeError(SP_ERROR_NATIVE, "Computed Invalid Servername '%s'", server)
/* inial line */
LogToOpenFile(logfile,"0x42,start");