From 6eec4f53cc983d63b8d3e203f6095591c350e453 Mon Sep 17 00:00:00 2001 From: ultramage Date: Thu, 13 Sep 2007 06:06:30 +0000 Subject: Wiped out every mention of RETCODE from /src. The servers no longer save data using CRCRLF as line terminator on Windows. Closes bugreport:45. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11187 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/ladmin/ladmin.c | 642 ++++++++++++++++++++++++++-------------------------- 1 file changed, 321 insertions(+), 321 deletions(-) (limited to 'src/ladmin/ladmin.c') diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c index 2605cb93c..025488f33 100644 --- a/src/ladmin/ladmin.c +++ b/src/ladmin/ladmin.c @@ -273,7 +273,7 @@ int ladmin_log(char *fmt, ...) logfp = fopen(ladmin_log_filename, "a"); if (logfp) { if (fmt[0] == '\0') // jump a line if no message - fprintf(logfp, RETCODE); + fprintf(logfp, "\n"); else { gettimeofday(&tv, NULL); strftime(tmpstr, 24, date_format, localtime((const time_t*)&(tv.tv_sec))); @@ -325,10 +325,10 @@ int verify_accountname(char* account_name) if (account_name[i] < 32) { if (defaultlanguage == 'F') { ShowMessage("Caractère interdit trouvé dans le nom du compte (%d%s caractère).\n", i+1, makeordinal(i+1)); - ladmin_log("Caractère interdit trouvé dans le nom du compte (%d%s caractère)." RETCODE, i+1, makeordinal(i+1)); + ladmin_log("Caractère interdit trouvé dans le nom du compte (%d%s caractère).\n", i+1, makeordinal(i+1)); } else { ShowMessage("Illegal character found in the account name (%d%s character).\n", i+1, makeordinal(i+1)); - ladmin_log("Illegal character found in the account name (%d%s character)." RETCODE, i+1, makeordinal(i+1)); + ladmin_log("Illegal character found in the account name (%d%s character).\n", i+1, makeordinal(i+1)); } return 0; } @@ -337,10 +337,10 @@ int verify_accountname(char* account_name) if (strlen(account_name) < 4) { if (defaultlanguage == 'F') { ShowMessage("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n"); - ladmin_log("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères." RETCODE); + ladmin_log("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n"); } else { ShowMessage("Account name is too short. Please input an account name of 4-23 bytes.\n"); - ladmin_log("Account name is too short. Please input an account name of 4-23 bytes." RETCODE); + ladmin_log("Account name is too short. Please input an account name of 4-23 bytes.\n"); } return 0; } @@ -348,10 +348,10 @@ int verify_accountname(char* account_name) if (strlen(account_name) > 23) { if (defaultlanguage == 'F') { ShowMessage("Nom du compte trop long. Entrez un nom de compte de 4-23 caractères.\n"); - ladmin_log("Nom du compte trop long. Entrez un nom de compte de 4-23 caractères." RETCODE); + ladmin_log("Nom du compte trop long. Entrez un nom de compte de 4-23 caractères.\n"); } else { ShowMessage("Account name is too long. Please input an account name of 4-23 bytes.\n"); - ladmin_log("Account name is too long. Please input an account name of 4-23 bytes." RETCODE); + ladmin_log("Account name is too long. Please input an account name of 4-23 bytes.\n"); } return 0; } @@ -369,9 +369,9 @@ int typepasswd(char * password) int i; if (defaultlanguage == 'F') { - ladmin_log("Aucun mot de passe n'a été donné. Demande d'un mot de passe." RETCODE); + ladmin_log("Aucun mot de passe n'a été donné. Demande d'un mot de passe.\n"); } else { - ladmin_log("No password was given. Request to obtain a password." RETCODE); + ladmin_log("No password was given. Request to obtain a password.\n"); } memset(password1, '\0', sizeof(password1)); @@ -398,19 +398,19 @@ int typepasswd(char * password) if (strcmp(password1, password2) != 0) { if (defaultlanguage == 'F') { ShowMessage("Erreur de vérification du mot de passe: Saisissez le même mot de passe svp.\n"); - ladmin_log("Erreur de vérification du mot de passe: Saisissez le même mot de passe svp." RETCODE); - ladmin_log(" Premier mot de passe: %s, second mot de passe: %s." RETCODE, password1, password2); + ladmin_log("Erreur de vérification du mot de passe: Saisissez le même mot de passe svp.\n"); + ladmin_log(" Premier mot de passe: %s, second mot de passe: %s.\n", password1, password2); } else { ShowMessage("Password verification failed. Please input same password.\n"); - ladmin_log("Password verification failed. Please input same password." RETCODE); - ladmin_log(" First password: %s, second password: %s." RETCODE, password1, password2); + ladmin_log("Password verification failed. Please input same password.\n"); + ladmin_log(" First password: %s, second password: %s.\n", password1, password2); } return 0; } if (defaultlanguage == 'F') { - ladmin_log("Mot de passe saisi: %s." RETCODE, password1); + ladmin_log("Mot de passe saisi: %s.\n", password1); } else { - ladmin_log("Typed password: %s." RETCODE, password1); + ladmin_log("Typed password: %s.\n", password1); } strcpy(password, password1); return 1; @@ -427,10 +427,10 @@ int verify_password(char * password) if (password[i] < 32) { if (defaultlanguage == 'F') { ShowMessage("Caractère interdit trouvé dans le mot de passe (%d%s caractère).\n", i+1, makeordinal(i+1)); - ladmin_log("Caractère interdit trouvé dans le nom du compte (%d%s caractère)." RETCODE, i+1, makeordinal(i+1)); + ladmin_log("Caractère interdit trouvé dans le nom du compte (%d%s caractère).\n", i+1, makeordinal(i+1)); } else { ShowMessage("Illegal character found in the password (%d%s character).\n", i+1, makeordinal(i+1)); - ladmin_log("Illegal character found in the password (%d%s character)." RETCODE, i+1, makeordinal(i+1)); + ladmin_log("Illegal character found in the password (%d%s character).\n", i+1, makeordinal(i+1)); } return 0; } @@ -439,10 +439,10 @@ int verify_password(char * password) if (strlen(password) < 4) { if (defaultlanguage == 'F') { ShowMessage("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n"); - ladmin_log("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères." RETCODE); + ladmin_log("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n"); } else { ShowMessage("Account name is too short. Please input an account name of 4-23 bytes.\n"); - ladmin_log("Account name is too short. Please input an account name of 4-23 bytes." RETCODE); + ladmin_log("Account name is too short. Please input an account name of 4-23 bytes.\n"); } return 0; } @@ -450,10 +450,10 @@ int verify_password(char * password) if (strlen(password) > 23) { if (defaultlanguage == 'F') { ShowMessage("Mot de passe trop long. Entrez un mot de passe de 4-23 caractères.\n"); - ladmin_log("Mot de passe trop long. Entrez un mot de passe de 4-23 caractères." RETCODE); + ladmin_log("Mot de passe trop long. Entrez un mot de passe de 4-23 caractères.\n"); } else { ShowMessage("Password is too long. Please input a password of 4-23 bytes.\n"); - ladmin_log("Password is too long. Please input a password of 4-23 bytes." RETCODE); + ladmin_log("Password is too long. Please input a password of 4-23 bytes.\n"); } return 0; } @@ -592,9 +592,9 @@ void display_help(char* param, int language) check_command(command); // give complete name to the command if (defaultlanguage == 'F') { - ladmin_log("Affichage des commandes ou d'une commande." RETCODE); + ladmin_log("Affichage des commandes ou d'une commande.\n"); } else { - ladmin_log("Displaying of the commands or a command." RETCODE); + ladmin_log("Displaying of the commands or a command.\n"); } if (language == 1) { @@ -1112,11 +1112,11 @@ int addaccount(char* param, int emailflag) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte, un sexe et un mot de passe svp.\n"); ShowMessage(" add nomtest Male motdepassetest\n"); - ladmin_log("Nombre incorrect de paramètres pour créer un compte (commande 'add')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour créer un compte (commande 'add').\n"); } else { ShowMessage("Please input an account name, a sex and a password.\n"); ShowMessage(" add testname Male testpass\n"); - ladmin_log("Incomplete parameters to create an account ('add' command)." RETCODE); + ladmin_log("Incomplete parameters to create an account ('add' command).\n"); } return 136; } @@ -1128,11 +1128,11 @@ int addaccount(char* param, int emailflag) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte, un sexe et un mot de passe svp.\n"); ShowMessage(" create nomtest Male mo@mail.com motdepassetest\n"); - ladmin_log("Nombre incorrect de paramètres pour créer un compte (commande 'create')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour créer un compte (commande 'create').\n"); } else { ShowMessage("Please input an account name, a sex and a password.\n"); ShowMessage(" create testname Male my@mail.com testpass\n"); - ladmin_log("Incomplete parameters to create an account ('create' command)." RETCODE); + ladmin_log("Incomplete parameters to create an account ('create' command).\n"); } return 136; } @@ -1145,10 +1145,10 @@ int addaccount(char* param, int emailflag) if (strchr("MF", sex[0]) == NULL) { if (defaultlanguage == 'F') { ShowMessage("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex); - ladmin_log("Sexe incorrect [%s]. Entrez M ou F svp." RETCODE, sex); + ladmin_log("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex); } else { ShowMessage("Illegal gender [%s]. Please input M or F.\n", sex); - ladmin_log("Illegal gender [%s]. Please input M or F." RETCODE, sex); + ladmin_log("Illegal gender [%s]. Please input M or F.\n", sex); } return 103; } @@ -1156,30 +1156,30 @@ int addaccount(char* param, int emailflag) if (strlen(email) < 3) { if (defaultlanguage == 'F') { ShowMessage("Email trop courte [%s]. Entrez une e-mail valide svp.\n", email); - ladmin_log("Email trop courte [%s]. Entrez une e-mail valide svp." RETCODE, email); + ladmin_log("Email trop courte [%s]. Entrez une e-mail valide svp.\n", email); } else { ShowMessage("Email is too short [%s]. Please input a valid e-mail.\n", email); - ladmin_log("Email is too short [%s]. Please input a valid e-mail." RETCODE, email); + ladmin_log("Email is too short [%s]. Please input a valid e-mail.\n", email); } return 109; } if (strlen(email) > 39) { if (defaultlanguage == 'F') { ShowMessage("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n", email); - ladmin_log("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp." RETCODE, email); + ladmin_log("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n", email); } else { ShowMessage("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n", email); - ladmin_log("Email is too long [%s]. Please input an e-mail with 39 bytes at the most." RETCODE, email); + ladmin_log("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n", email); } return 109; } if (e_mail_check(email) == 0) { if (defaultlanguage == 'F') { ShowMessage("Email incorrecte [%s]. Entrez une e-mail valide svp.\n", email); - ladmin_log("Email incorrecte [%s]. Entrez une e-mail valide svp." RETCODE, email); + ladmin_log("Email incorrecte [%s]. Entrez une e-mail valide svp.\n", email); } else { ShowMessage("Invalid email [%s]. Please input a valid e-mail.\n", email); - ladmin_log("Invalid email [%s]. Please input a valid e-mail." RETCODE, email); + ladmin_log("Invalid email [%s]. Please input a valid e-mail.\n", email); } return 109; } @@ -1192,9 +1192,9 @@ int addaccount(char* param, int emailflag) return 104; if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour créer un compte." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour créer un compte.\n"); } else { - ladmin_log("Request to login-server to create an account." RETCODE); + ladmin_log("Request to login-server to create an account.\n"); } WFIFOW(login_fd,0) = 0x7930; @@ -1231,13 +1231,13 @@ int banaddaccount(char* param) ShowMessage(" banadd nomtest +1m-2mn1s-6y\n"); ShowMessage(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n"); ShowMessage(" et 6 ans dans le même temps.\n"); - ladmin_log("Nombre incorrect de paramètres pour modifier la fin de ban d'un compte (commande 'banadd')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour modifier la fin de ban d'un compte (commande 'banadd').\n"); } else { ShowMessage("Please input an account name and a modifier.\n"); ShowMessage(" : banadd testname +1m-2mn1s-6y\n"); ShowMessage(" this example adds 1 month and 1 second, and substracts 2 minutes\n"); ShowMessage(" and 6 years at the same time.\n"); - ladmin_log("Incomplete parameters to modify the ban date/time of an account ('banadd' command)." RETCODE); + ladmin_log("Incomplete parameters to modify the ban date/time of an account ('banadd' command).\n"); } return 136; } @@ -1313,7 +1313,7 @@ int banaddaccount(char* param) ShowMessage(" banadd nomtest +1m-2mn1s-6y\n"); ShowMessage(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n"); ShowMessage(" et 6 ans dans le même temps.\n"); - ladmin_log("Aucun ajustement n'est pas un ajustement (commande 'banadd')." RETCODE); + ladmin_log("Aucun ajustement n'est pas un ajustement (commande 'banadd').\n"); } else { ShowMessage("Please give an adjustment with this command:\n"); ShowMessage(" Adjustment value (-1, 1, +1, etc...)\n"); @@ -1327,75 +1327,75 @@ int banaddaccount(char* param) ShowMessage(" banadd testname +1m-2mn1s-6y\n"); ShowMessage(" this example adds 1 month and 1 second, and substracts 2 minutes\n"); ShowMessage(" and 6 years at the same time.\n"); - ladmin_log("No adjustment isn't an adjustment ('banadd' command)." RETCODE); + ladmin_log("No adjustment isn't an adjustment ('banadd' command).\n"); } return 137; } if (year > 127 || year < -127) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement d'années correct (de -127 à 127), svp.\n"); - ladmin_log("Ajustement de l'année hors norme (commande 'banadd')." RETCODE); + ladmin_log("Ajustement de l'année hors norme (commande 'banadd').\n"); } else { ShowMessage("Please give a correct adjustment for the years (from -127 to 127).\n"); - ladmin_log("Abnormal adjustment for the year ('banadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the year ('banadd' command).\n"); } return 137; } if (month > 255 || month < -255) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de mois correct (de -255 à 255), svp.\n"); - ladmin_log("Ajustement du mois hors norme (commande 'banadd')." RETCODE); + ladmin_log("Ajustement du mois hors norme (commande 'banadd').\n"); } else { ShowMessage("Please give a correct adjustment for the months (from -255 to 255).\n"); - ladmin_log("Abnormal adjustment for the month ('banadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the month ('banadd' command).\n"); } return 137; } if (day > 32767 || day < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de jours correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des jours hors norme (commande 'banadd')." RETCODE); + ladmin_log("Ajustement des jours hors norme (commande 'banadd').\n"); } else { ShowMessage("Please give a correct adjustment for the days (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the days ('banadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the days ('banadd' command).\n"); } return 137; } if (hour > 32767 || hour < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des heures hors norme (commande 'banadd')." RETCODE); + ladmin_log("Ajustement des heures hors norme (commande 'banadd').\n"); } else { ShowMessage("Please give a correct adjustment for the hours (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the hours ('banadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the hours ('banadd' command).\n"); } return 137; } if (minute > 32767 || minute < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des minutes hors norme (commande 'banadd')." RETCODE); + ladmin_log("Ajustement des minutes hors norme (commande 'banadd').\n"); } else { ShowMessage("Please give a correct adjustment for the minutes (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the minutes ('banadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the minutes ('banadd' command).\n"); } return 137; } if (second > 32767 || second < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des secondes hors norme (commande 'banadd')." RETCODE); + ladmin_log("Ajustement des secondes hors norme (commande 'banadd').\n"); } else { ShowMessage("Please give a correct adjustment for the seconds (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the seconds ('banadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the seconds ('banadd' command).\n"); } return 137; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour modifier la date d'un bannissement." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour modifier la date d'un bannissement.\n"); } else { - ladmin_log("Request to login-server to modify a ban date/time." RETCODE); + ladmin_log("Request to login-server to modify a ban date/time.\n"); } WFIFOW(login_fd,0) = 0x794c; @@ -1439,11 +1439,11 @@ int bansetaccountsub(char* name, char* date, char* time) if (defaultlanguage == 'F') { ShowMessage("Entrez une date et une heure svp (format: aaaa/mm/jj hh:mm:ss).\n"); ShowMessage("Vous pouvez aussi mettre 0 à la place si vous utilisez la commande 'banset'.\n"); - ladmin_log("Format incorrect pour la date/heure (commande'banset' ou 'ban')." RETCODE); + ladmin_log("Format incorrect pour la date/heure (commande'banset' ou 'ban').\n"); } else { ShowMessage("Please input a date and a time (format: yyyy/mm/dd hh:mm:ss).\n"); ShowMessage("You can imput 0 instead of if you use 'banset' command.\n"); - ladmin_log("Invalid format for the date/time ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid format for the date/time ('banset' or 'ban' command).\n"); } return 102; } @@ -1460,10 +1460,10 @@ int bansetaccountsub(char* name, char* date, char* time) if (month < 1 || month > 12) { if (defaultlanguage == 'F') { ShowMessage("Entrez un mois correct svp (entre 1 et 12).\n"); - ladmin_log("Mois incorrect pour la date (command 'banset' ou 'ban')." RETCODE); + ladmin_log("Mois incorrect pour la date (command 'banset' ou 'ban').\n"); } else { ShowMessage("Please give a correct value for the month (from 1 to 12).\n"); - ladmin_log("Invalid month for the date ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid month for the date ('banset' or 'ban' command).\n"); } return 102; } @@ -1471,10 +1471,10 @@ int bansetaccountsub(char* name, char* date, char* time) if (day < 1 || day > 31) { if (defaultlanguage == 'F') { ShowMessage("Entrez un jour correct svp (entre 1 et 31).\n"); - ladmin_log("Jour incorrect pour la date (command 'banset' ou 'ban')." RETCODE); + ladmin_log("Jour incorrect pour la date (command 'banset' ou 'ban').\n"); } else { ShowMessage("Please give a correct value for the day (from 1 to 31).\n"); - ladmin_log("Invalid day for the date ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid day for the date ('banset' or 'ban' command).\n"); } return 102; } @@ -1482,40 +1482,40 @@ int bansetaccountsub(char* name, char* date, char* time) (month == 1 && day > 29)) { if (defaultlanguage == 'F') { ShowMessage("Entrez un jour correct en fonction du mois (%d) svp.\n", month); - ladmin_log("Jour incorrect pour ce mois correspondant (command 'banset' ou 'ban')." RETCODE); + ladmin_log("Jour incorrect pour ce mois correspondant (command 'banset' ou 'ban').\n"); } else { ShowMessage("Please give a correct value for a day of this month (%d).\n", month); - ladmin_log("Invalid day for this month ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid day for this month ('banset' or 'ban' command).\n"); } return 102; } if (hour < 0 || hour > 23) { if (defaultlanguage == 'F') { ShowMessage("Entrez une heure correcte svp (entre 0 et 23).\n"); - ladmin_log("Heure incorrecte pour l'heure (command 'banset' ou 'ban')." RETCODE); + ladmin_log("Heure incorrecte pour l'heure (command 'banset' ou 'ban').\n"); } else { ShowMessage("Please give a correct value for the hour (from 0 to 23).\n"); - ladmin_log("Invalid hour for the time ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid hour for the time ('banset' or 'ban' command).\n"); } return 102; } if (minute < 0 || minute > 59) { if (defaultlanguage == 'F') { ShowMessage("Entrez des minutes correctes svp (entre 0 et 59).\n"); - ladmin_log("Minute incorrecte pour l'heure (command 'banset' ou 'ban')." RETCODE); + ladmin_log("Minute incorrecte pour l'heure (command 'banset' ou 'ban').\n"); } else { ShowMessage("Please give a correct value for the minutes (from 0 to 59).\n"); - ladmin_log("Invalid minute for the time ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid minute for the time ('banset' or 'ban' command).\n"); } return 102; } if (second < 0 || second > 59) { if (defaultlanguage == 'F') { ShowMessage("Entrez des secondes correctes svp (entre 0 et 59).\n"); - ladmin_log("Seconde incorrecte pour l'heure (command 'banset' ou 'ban')." RETCODE); + ladmin_log("Seconde incorrecte pour l'heure (command 'banset' ou 'ban').\n"); } else { ShowMessage("Please give a correct value for the seconds (from 0 to 59).\n"); - ladmin_log("Invalid second for the time ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid second for the time ('banset' or 'ban' command).\n"); } return 102; } @@ -1532,21 +1532,21 @@ int bansetaccountsub(char* name, char* date, char* time) ShowMessage("Date incorrecte.\n"); ShowMessage("Entrez une date et une heure svp (format: aaaa/mm/jj hh:mm:ss).\n"); ShowMessage("Vous pouvez aussi mettre 0 à la place si vous utilisez la commande 'banset'.\n"); - ladmin_log("Date incorrecte. (command 'banset' ou 'ban')." RETCODE); + ladmin_log("Date incorrecte. (command 'banset' ou 'ban').\n"); } else { ShowMessage("Invalid date.\n"); ShowMessage("Please input a date and a time (format: yyyy/mm/dd hh:mm:ss).\n"); ShowMessage("You can imput 0 instead of if you use 'banset' command.\n"); - ladmin_log("Invalid date. ('banset' or 'ban' command)." RETCODE); + ladmin_log("Invalid date. ('banset' or 'ban' command).\n"); } return 102; } } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour fixer un ban." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour fixer un ban.\n"); } else { - ladmin_log("Request to login-server to set a ban." RETCODE); + ladmin_log("Request to login-server to set a ban.\n"); } WFIFOW(login_fd,0) = 0x794a; @@ -1579,7 +1579,7 @@ int banaccount(char* param) ShowMessage(" ban/banish aaaa/mm/jj hh:mm:ss \n"); ShowMessage(" unban/unbanish \n"); ShowMessage(" Heure par défaut [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban').\n"); } else { ShowMessage("Please input an account name, a date and a hour.\n"); ShowMessage(": banset yyyy/mm/dd [hh:mm:ss]\n"); @@ -1587,7 +1587,7 @@ int banaccount(char* param) ShowMessage(" ban/banish yyyy/mm/dd hh:mm:ss \n"); ShowMessage(" unban/unbanish \n"); ShowMessage(" Default time [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Incomplete parameters to set a ban ('banset' or 'ban' command)." RETCODE); + ladmin_log("Incomplete parameters to set a ban ('banset' or 'ban' command).\n"); } return 136; } @@ -1616,7 +1616,7 @@ int bansetaccount(char* param) ShowMessage(" ban/banish aaaa/mm/jj hh:mm:ss \n"); ShowMessage(" unban/unbanish \n"); ShowMessage(" Heure par défaut [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban').\n"); } else { ShowMessage("Please input an account name, a date and a hour.\n"); ShowMessage(": banset yyyy/mm/dd [hh:mm:ss]\n"); @@ -1624,7 +1624,7 @@ int bansetaccount(char* param) ShowMessage(" ban/banish yyyy/mm/dd hh:mm:ss \n"); ShowMessage(" unban/unbanish \n"); ShowMessage(" Default time [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Incomplete parameters to set a ban ('banset' or 'ban' command)." RETCODE); + ladmin_log("Incomplete parameters to set a ban ('banset' or 'ban' command).\n"); } return 136; } @@ -1656,7 +1656,7 @@ int unbanaccount(char* param) ShowMessage(" ban/banish aaaa/mm/jj hh:mm:ss \n"); ShowMessage(" unban/unbanish \n"); ShowMessage(" Heure par défaut [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'unban')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour fixer un ban (commande 'unban').\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(": banset yyyy/mm/dd [hh:mm:ss]\n"); @@ -1664,7 +1664,7 @@ int unbanaccount(char* param) ShowMessage(" ban/banish yyyy/mm/dd hh:mm:ss \n"); ShowMessage(" unban/unbanish \n"); ShowMessage(" Default time [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Incomplete parameters to set a ban ('unban' command)." RETCODE); + ladmin_log("Incomplete parameters to set a ban ('unban' command).\n"); } return 136; } @@ -1690,11 +1690,11 @@ int checkaccount(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte svp.\n"); ShowMessage(" check testname motdepasse\n"); - ladmin_log("Nombre incorrect de paramètres pour tester le mot d'un passe d'un compte (commande 'check')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour tester le mot d'un passe d'un compte (commande 'check').\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(" check testname password\n"); - ladmin_log("Incomplete parameters to check the password of an account ('check' command)." RETCODE); + ladmin_log("Incomplete parameters to check the password of an account ('check' command).\n"); } return 136; } @@ -1711,9 +1711,9 @@ int checkaccount(char* param) return 131; if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour test un mot de passe." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour test un mot de passe.\n"); } else { - ladmin_log("Request to login-server to check a password." RETCODE); + ladmin_log("Request to login-server to check a password.\n"); } WFIFOW(login_fd,0) = 0x793a; @@ -1746,11 +1746,11 @@ int delaccount(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte svp.\n"); ShowMessage(" del nomtestasupprimer\n"); - ladmin_log("Aucun nom donné pour supprimer un compte (commande 'delete')." RETCODE); + ladmin_log("Aucun nom donné pour supprimer un compte (commande 'delete').\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(" del testnametodelete\n"); - ladmin_log("No name given to delete an account ('delete' command)." RETCODE); + ladmin_log("No name given to delete an account ('delete' command).\n"); } return 136; } @@ -1775,18 +1775,18 @@ int delaccount(char* param) if (confirm[0] == 'n') { if (defaultlanguage == 'F') { ShowMessage("Suppression annulée.\n"); - ladmin_log("Suppression annulée par l'utilisateur (commande 'delete')." RETCODE); + ladmin_log("Suppression annulée par l'utilisateur (commande 'delete').\n"); } else { ShowMessage("Deletion canceled.\n"); - ladmin_log("Deletion canceled by user ('delete' command)." RETCODE); + ladmin_log("Deletion canceled by user ('delete' command).\n"); } return 121; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour détruire un compte." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour détruire un compte.\n"); } else { - ladmin_log("Request to login-server to delete an acount." RETCODE); + ladmin_log("Request to login-server to delete an acount.\n"); } WFIFOW(login_fd,0) = 0x7932; @@ -1814,11 +1814,11 @@ int changeemail(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte et une email svp.\n"); ShowMessage(" email testname nouveauemail\n"); - ladmin_log("Nombre incorrect de paramètres pour changer l'email d'un compte (commande 'email')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer l'email d'un compte (commande 'email').\n"); } else { ShowMessage("Please input an account name and an email.\n"); ShowMessage(" email testname newemail\n"); - ladmin_log("Incomplete parameters to change the email of an account ('email' command)." RETCODE); + ladmin_log("Incomplete parameters to change the email of an account ('email' command).\n"); } return 136; } @@ -1830,38 +1830,38 @@ int changeemail(char* param) if (strlen(email) < 3) { if (defaultlanguage == 'F') { ShowMessage("Email trop courte [%s]. Entrez une e-mail valide svp.\n", email); - ladmin_log("Email trop courte [%s]. Entrez une e-mail valide svp." RETCODE, email); + ladmin_log("Email trop courte [%s]. Entrez une e-mail valide svp.\n", email); } else { ShowMessage("Email is too short [%s]. Please input a valid e-mail.\n", email); - ladmin_log("Email is too short [%s]. Please input a valid e-mail." RETCODE, email); + ladmin_log("Email is too short [%s]. Please input a valid e-mail.\n", email); } return 109; } if (strlen(email) > 39) { if (defaultlanguage == 'F') { ShowMessage("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n", email); - ladmin_log("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp." RETCODE, email); + ladmin_log("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n", email); } else { ShowMessage("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n", email); - ladmin_log("Email is too long [%s]. Please input an e-mail with 39 bytes at the most." RETCODE, email); + ladmin_log("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n", email); } return 109; } if (e_mail_check(email) == 0) { if (defaultlanguage == 'F') { ShowMessage("Email incorrecte [%s]. Entrez une e-mail valide svp.\n", email); - ladmin_log("Email incorrecte [%s]. Entrez une e-mail valide svp." RETCODE, email); + ladmin_log("Email incorrecte [%s]. Entrez une e-mail valide svp.\n", email); } else { ShowMessage("Invalid email [%s]. Please input a valid e-mail.\n", email); - ladmin_log("Invalid email [%s]. Please input a valid e-mail." RETCODE, email); + ladmin_log("Invalid email [%s]. Please input a valid e-mail.\n", email); } return 109; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour changer une email." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour changer une email.\n"); } else { - ladmin_log("Request to login-server to change an email." RETCODE); + ladmin_log("Request to login-server to change an email.\n"); } WFIFOW(login_fd,0) = 0x7940; @@ -1880,9 +1880,9 @@ int getlogincount(void) { WFIFOHEAD(login_fd,2); if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le nombre de joueurs en jeu." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le nombre de joueurs en jeu.\n"); } else { - ladmin_log("Request to login-server to obtain the # of online players." RETCODE); + ladmin_log("Request to login-server to obtain the # of online players.\n"); } WFIFOW(login_fd,0) = 0x7938; @@ -1910,11 +1910,11 @@ int changegmlevel(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte et un niveau de GM svp.\n"); ShowMessage(" gm nomtest 80\n"); - ladmin_log("Nombre incorrect de paramètres pour changer le Niveau de GM d'un compte (commande 'gm')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer le Niveau de GM d'un compte (commande 'gm').\n"); } else { ShowMessage("Please input an account name and a GM level.\n"); ShowMessage(" gm testname 80\n"); - ladmin_log("Incomplete parameters to change the GM level of an account ('gm' command)." RETCODE); + ladmin_log("Incomplete parameters to change the GM level of an account ('gm' command).\n"); } return 136; } @@ -1926,18 +1926,18 @@ int changegmlevel(char* param) if (GM_level < 0 || GM_level > 99) { if (defaultlanguage == 'F') { ShowMessage("Niveau de GM incorrect [%d]. Entrez une valeur de 0 à 99 svp.\n", GM_level); - ladmin_log("Niveau de GM incorrect [%d]. La valeur peut être de 0 à 99." RETCODE, GM_level); + ladmin_log("Niveau de GM incorrect [%d]. La valeur peut être de 0 à 99.\n", GM_level); } else { ShowMessage("Illegal GM level [%d]. Please input a value from 0 to 99.\n", GM_level); - ladmin_log("Illegal GM level [%d]. The value can be from 0 to 99." RETCODE, GM_level); + ladmin_log("Illegal GM level [%d]. The value can be from 0 to 99.\n", GM_level); } return 103; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour changer un niveau de GM." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour changer un niveau de GM.\n"); } else { - ladmin_log("Request to login-server to change a GM level." RETCODE); + ladmin_log("Request to login-server to change a GM level.\n"); } WFIFOW(login_fd,0) = 0x793e; @@ -1967,11 +1967,11 @@ int idaccount(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte svp.\n"); ShowMessage(" id nomtest\n"); - ladmin_log("Aucun nom donné pour rechecher l'id d'un compte (commande 'id')." RETCODE); + ladmin_log("Aucun nom donné pour rechecher l'id d'un compte (commande 'id').\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(" id testname\n"); - ladmin_log("No name given to search an account id ('id' command)." RETCODE); + ladmin_log("No name given to search an account id ('id' command).\n"); } return 136; } @@ -1981,9 +1981,9 @@ int idaccount(char* param) } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour connaître l'id d'un compte." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour connaître l'id d'un compte.\n"); } else { - ladmin_log("Request to login-server to know an account id." RETCODE); + ladmin_log("Request to login-server to know an account id.\n"); } WFIFOW(login_fd,0) = 0x7944; @@ -2003,18 +2003,18 @@ int infoaccount(int account_id) if (account_id < 0) { if (defaultlanguage == 'F') { ShowMessage("Entrez un id ayant une valeur positive svp.\n"); - ladmin_log("Une valeur négative a été donné pour trouver le compte." RETCODE); + ladmin_log("Une valeur négative a été donné pour trouver le compte.\n"); } else { ShowMessage("Please input a positive value for the id.\n"); - ladmin_log("Negative value was given to found the account." RETCODE); + ladmin_log("Negative value was given to found the account.\n"); } return 136; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le information d'un compte (par l'id)." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le information d'un compte (par l'id).\n"); } else { - ladmin_log("Request to login-server to obtain information about an account (by its id)." RETCODE); + ladmin_log("Request to login-server to obtain information about an account (by its id).\n"); } WFIFOW(login_fd,0) = 0x7954; @@ -2040,7 +2040,7 @@ int sendbroadcast(short type, char* message) } else { ShowMessage(" kamib un message\n"); } - ladmin_log("Le message est vide (commande 'kami(b)')." RETCODE); + ladmin_log("Le message est vide (commande 'kami(b)').\n"); } else { ShowMessage("Please input a message.\n"); if (type == 0) { @@ -2048,7 +2048,7 @@ int sendbroadcast(short type, char* message) } else { ShowMessage(" kamib a message\n"); } - ladmin_log("The message is void ('kami(b)' command)." RETCODE); + ladmin_log("The message is void ('kami(b)' command).\n"); } return 136; } @@ -2073,12 +2073,12 @@ int changelanguage(char* language) ShowMessage("Entrez une langue svp.\n"); ShowMessage(" language english\n"); ShowMessage(" language français\n"); - ladmin_log("La langue est vide (commande 'language')." RETCODE); + ladmin_log("La langue est vide (commande 'language').\n"); } else { ShowMessage("Please input a language.\n"); ShowMessage(" language english\n"); ShowMessage(" language français\n"); - ladmin_log("The language is void ('language' command)." RETCODE); + ladmin_log("The language is void ('language' command).\n"); } return 136; } @@ -2088,18 +2088,18 @@ int changelanguage(char* language) defaultlanguage = language[0]; if (defaultlanguage == 'F') { ShowMessage("Changement de la langue d'affichage en Français.\n"); - ladmin_log("Changement de la langue d'affichage en Français." RETCODE); + ladmin_log("Changement de la langue d'affichage en Français.\n"); } else { ShowMessage("Displaying language changed to English.\n"); - ladmin_log("Displaying language changed to English." RETCODE); + ladmin_log("Displaying language changed to English.\n"); } } else { if (defaultlanguage == 'F') { ShowMessage("Langue non paramétrée (langues possibles: 'Français' ou 'English').\n"); - ladmin_log("Langue non paramétrée (Français ou English nécessaire)." RETCODE); + ladmin_log("Langue non paramétrée (Français ou English nécessaire).\n"); } else { ShowMessage("Undefined language (possible languages: Français or English).\n"); - ladmin_log("Undefined language (must be Français or English)." RETCODE); + ladmin_log("Undefined language (must be Français or English).\n"); } } @@ -2149,9 +2149,9 @@ int listaccount(char* param, int type) } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour obtenir la liste des comptes de %d à %d." RETCODE, list_first, list_last); + ladmin_log("Envoi d'un requête au serveur de logins pour obtenir la liste des comptes de %d à %d.\n", list_first, list_last); } else { - ladmin_log("Request to login-server to obtain the list of accounts from %d to %d." RETCODE, list_first, list_last); + ladmin_log("Request to login-server to obtain the list of accounts from %d to %d.\n", list_first, list_last); } WFIFOW(login_fd,0) = 0x7920; @@ -2189,11 +2189,11 @@ int changememo(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte et un mémo svp.\n"); ShowMessage(" memo nomtest nouveau memo\n"); - ladmin_log("Nombre incorrect de paramètres pour changer le mémo d'un compte (commande 'email')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer le mémo d'un compte (commande 'email').\n"); } else { ShowMessage("Please input an account name and a memo.\n"); ShowMessage(" memo testname new memo\n"); - ladmin_log("Incomplete parameters to change the memo of an account ('email' command)." RETCODE); + ladmin_log("Incomplete parameters to change the memo of an account ('email' command).\n"); } return 136; } @@ -2206,19 +2206,19 @@ int changememo(char* param) if (defaultlanguage == 'F') { ShowMessage("Mémo trop long (%lu caractères).\n", (unsigned long)strlen(memo)); ShowMessage("Entrez un mémo de 254 caractères maximum svp.\n"); - ladmin_log("Mémo trop long (%d caractères). Entrez un mémo de 254 caractères maximum svp." RETCODE, strlen(memo)); + ladmin_log("Mémo trop long (%d caractères). Entrez un mémo de 254 caractères maximum svp.\n", strlen(memo)); } else { ShowMessage("Memo is too long (%lu characters).\n", (unsigned long)strlen(memo)); ShowMessage("Please input a memo of 254 bytes at the maximum.\n"); - ladmin_log("Email is too long (%d characters). Please input a memo of 254 bytes at the maximum." RETCODE, strlen(memo)); + ladmin_log("Email is too long (%d characters). Please input a memo of 254 bytes at the maximum.\n", strlen(memo)); } return 102; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour changer un mémo." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour changer un mémo.\n"); } else { - ladmin_log("Request to login-server to change a memo." RETCODE); + ladmin_log("Request to login-server to change a memo.\n"); } WFIFOW(login_fd,0) = 0x7942; @@ -2241,18 +2241,18 @@ int nameaccount(int id) if (id < 0) { if (defaultlanguage == 'F') { ShowMessage("Entrez un id ayant une valeur positive svp.\n"); - ladmin_log("Id négatif donné pour rechecher le nom d'un compte (commande 'name')." RETCODE); + ladmin_log("Id négatif donné pour rechecher le nom d'un compte (commande 'name').\n"); } else { ShowMessage("Please input a positive value for the id.\n"); - ladmin_log("Negativ id given to search an account name ('name' command)." RETCODE); + ladmin_log("Negativ id given to search an account name ('name' command).\n"); } return 136; } if (defaultlanguage == 'F') - ladmin_log("Envoi d'un requête au serveur de logins pour connaître le nom d'un compte." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour connaître le nom d'un compte.\n"); else - ladmin_log("Request to login-server to know an account name." RETCODE); + ladmin_log("Request to login-server to know an account name.\n"); WFIFOW(login_fd,0) = 0x7946; WFIFOL(login_fd,2) = id; @@ -2280,11 +2280,11 @@ int changepasswd(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte svp.\n"); ShowMessage(" passwd nomtest nouveaumotdepasse\n"); - ladmin_log("Nombre incorrect de paramètres pour changer le mot d'un passe d'un compte (commande 'password')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer le mot d'un passe d'un compte (commande 'password').\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(" passwd testname newpassword\n"); - ladmin_log("Incomplete parameters to change the password of an account ('password' command)." RETCODE); + ladmin_log("Incomplete parameters to change the password of an account ('password' command).\n"); } return 136; } @@ -2301,9 +2301,9 @@ int changepasswd(char* param) return 131; if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour changer un mot de passe." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour changer un mot de passe.\n"); } else { - ladmin_log("Request to login-server to change a password." RETCODE); + ladmin_log("Request to login-server to change a password.\n"); } WFIFOW(login_fd,0) = 0x7934; @@ -2327,11 +2327,11 @@ int reloadGM(void) bytes_to_read = 0; if (defaultlanguage == 'F') { - ladmin_log("Demande de recharger le fichier de configuration des GM envoyée." RETCODE); + ladmin_log("Demande de recharger le fichier de configuration des GM envoyée.\n"); ShowMessage("Demande de recharger le fichier de configuration des GM envoyée.\n"); ShowMessage("Vérifiez les comptes GM actuels (après rechargement):\n"); } else { - ladmin_log("Request to reload the GM configuration file sended." RETCODE); + ladmin_log("Request to reload the GM configuration file sended.\n"); ShowMessage("Request to reload the GM configuration file sended.\n"); ShowMessage("Check the actual GM accounts (after reloading):\n"); } @@ -2357,11 +2357,11 @@ int changesex(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte et un sexe svp.\n"); ShowMessage(" sex nomtest Male\n"); - ladmin_log("Nombre incorrect de paramètres pour changer le sexe d'un compte (commande 'sex')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer le sexe d'un compte (commande 'sex').\n"); } else { ShowMessage("Please input an account name and a sex.\n"); ShowMessage(" sex testname Male\n"); - ladmin_log("Incomplete parameters to change the sex of an account ('sex' command)." RETCODE); + ladmin_log("Incomplete parameters to change the sex of an account ('sex' command).\n"); } return 136; } @@ -2374,18 +2374,18 @@ int changesex(char* param) if (strchr("MF", sex[0]) == NULL) { if (defaultlanguage == 'F') { ShowMessage("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex); - ladmin_log("Sexe incorrect [%s]. Entrez M ou F svp." RETCODE, sex); + ladmin_log("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex); } else { ShowMessage("Illegal gender [%s]. Please input M or F.\n", sex); - ladmin_log("Illegal gender [%s]. Please input M or F." RETCODE, sex); + ladmin_log("Illegal gender [%s]. Please input M or F.\n", sex); } return 103; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour changer un sexe." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour changer un sexe.\n"); } else { - ladmin_log("Request to login-server to change a sex." RETCODE); + ladmin_log("Request to login-server to change a sex.\n"); } WFIFOW(login_fd,0) = 0x793c; @@ -2427,13 +2427,13 @@ int changestatesub(char* name, int state, char* error_message7) ShowMessage(" state nomtest 7 fin de votre ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Valeur incorrecte pour le statut d'un compte (commande 'state', 'block' ou 'unblock')." RETCODE); + ladmin_log("Valeur incorrecte pour le statut d'un compte (commande 'state', 'block' ou 'unblock').\n"); } else { ShowMessage(" state testname 5\n"); ShowMessage(" state testname 7 end of your ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Invalid value for the state of an account ('state', 'block' or 'unblock' command)." RETCODE); + ladmin_log("Invalid value for the state of an account ('state', 'block' or 'unblock' command).\n"); } return 151; } @@ -2448,29 +2448,29 @@ int changestatesub(char* name, int state, char* error_message7) if (strlen(error_message) < 1) { if (defaultlanguage == 'F') { ShowMessage("Message d'erreur trop court. Entrez un message de 1-19 caractères.\n"); - ladmin_log("Message d'erreur trop court. Entrez un message de 1-19 caractères." RETCODE); + ladmin_log("Message d'erreur trop court. Entrez un message de 1-19 caractères.\n"); } else { ShowMessage("Error message is too short. Please input a message of 1-19 bytes.\n"); - ladmin_log("Error message is too short. Please input a message of 1-19 bytes." RETCODE); + ladmin_log("Error message is too short. Please input a message of 1-19 bytes.\n"); } return 102; } if (strlen(error_message) > 19) { if (defaultlanguage == 'F') { ShowMessage("Message d'erreur trop long. Entrez un message de 1-19 caractères.\n"); - ladmin_log("Message d'erreur trop long. Entrez un message de 1-19 caractères." RETCODE); + ladmin_log("Message d'erreur trop long. Entrez un message de 1-19 caractères.\n"); } else { ShowMessage("Error message is too long. Please input a message of 1-19 bytes.\n"); - ladmin_log("Error message is too long. Please input a message of 1-19 bytes." RETCODE); + ladmin_log("Error message is too long. Please input a message of 1-19 bytes.\n"); } return 102; } } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour changer un statut." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour changer un statut.\n"); } else { - ladmin_log("Request to login-server to change a state." RETCODE); + ladmin_log("Request to login-server to change a state.\n"); } WFIFOW(login_fd,0) = 0x7936; @@ -2503,14 +2503,14 @@ int changestate(char* param) ShowMessage(" state nomtest 7 fin de votre ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'state')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'state').\n"); } else { ShowMessage("Please input an account name and a state.\n"); ShowMessage(" state testname 5\n"); ShowMessage(" state testname 7 end of your ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Incomplete parameters to change the state of an account ('state' command)." RETCODE); + ladmin_log("Incomplete parameters to change the state of an account ('state' command).\n"); } return 136; } @@ -2538,14 +2538,14 @@ int unblockaccount(char* param) ShowMessage(" state nomtest 7 fin de votre ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'unblock')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'unblock').\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(" state testname 5\n"); ShowMessage(" state testname 7 end of your ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Incomplete parameters to change the state of an account ('unblock' command)." RETCODE); + ladmin_log("Incomplete parameters to change the state of an account ('unblock' command).\n"); } return 136; } @@ -2573,14 +2573,14 @@ int blockaccount(char* param) ShowMessage(" state nomtest 7 fin de votre ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'block')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'block').\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(" state testname 5\n"); ShowMessage(" state testname 7 end of your ban\n"); ShowMessage(" block \n"); ShowMessage(" unblock \n"); - ladmin_log("Incomplete parameters to change the state of an account ('block' command)." RETCODE); + ladmin_log("Incomplete parameters to change the state of an account ('block' command).\n"); } return 136; } @@ -2611,13 +2611,13 @@ int timeaddaccount(char* param) ShowMessage(" timeadd nomtest +1m-2mn1s-6y\n"); ShowMessage(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n"); ShowMessage(" et 6 ans dans le même temps.\n"); - ladmin_log("Nombre incorrect de paramètres pour modifier une date limite d'utilisation (commande 'timeadd')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour modifier une date limite d'utilisation (commande 'timeadd').\n"); } else { ShowMessage("Please input an account name and a modifier.\n"); ShowMessage(" : timeadd testname +1m-2mn1s-6y\n"); ShowMessage(" this example adds 1 month and 1 second, and substracts 2 minutes\n"); ShowMessage(" and 6 years at the same time.\n"); - ladmin_log("Incomplete parameters to modify a limit time ('timeadd' command)." RETCODE); + ladmin_log("Incomplete parameters to modify a limit time ('timeadd' command).\n"); } return 136; } @@ -2693,7 +2693,7 @@ int timeaddaccount(char* param) ShowMessage(" timeadd nomtest +1m-2mn1s-6y\n"); ShowMessage(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n"); ShowMessage(" et 6 ans dans le même temps.\n"); - ladmin_log("Aucun ajustement n'est pas un ajustement (commande 'timeadd')." RETCODE); + ladmin_log("Aucun ajustement n'est pas un ajustement (commande 'timeadd').\n"); } else { ShowMessage("Please give an adjustment with this command:\n"); ShowMessage(" Adjustment value (-1, 1, +1, etc...)\n"); @@ -2707,75 +2707,75 @@ int timeaddaccount(char* param) ShowMessage(" timeadd testname +1m-2mn1s-6y\n"); ShowMessage(" this example adds 1 month and 1 second, and substracts 2 minutes\n"); ShowMessage(" and 6 years at the same time.\n"); - ladmin_log("No adjustment isn't an adjustment ('timeadd' command)." RETCODE); + ladmin_log("No adjustment isn't an adjustment ('timeadd' command).\n"); } return 137; } if (year > 127 || year < -127) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement d'années correct (de -127 à 127), svp.\n"); - ladmin_log("Ajustement de l'année hors norme ('timeadd' command)." RETCODE); + ladmin_log("Ajustement de l'année hors norme ('timeadd' command).\n"); } else { ShowMessage("Please give a correct adjustment for the years (from -127 to 127).\n"); - ladmin_log("Abnormal adjustment for the year ('timeadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the year ('timeadd' command).\n"); } return 137; } if (month > 255 || month < -255) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de mois correct (de -255 à 255), svp.\n"); - ladmin_log("Ajustement du mois hors norme ('timeadd' command)." RETCODE); + ladmin_log("Ajustement du mois hors norme ('timeadd' command).\n"); } else { ShowMessage("Please give a correct adjustment for the months (from -255 to 255).\n"); - ladmin_log("Abnormal adjustment for the month ('timeadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the month ('timeadd' command).\n"); } return 137; } if (day > 32767 || day < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de jours correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des jours hors norme ('timeadd' command)." RETCODE); + ladmin_log("Ajustement des jours hors norme ('timeadd' command).\n"); } else { ShowMessage("Please give a correct adjustment for the days (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the days ('timeadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the days ('timeadd' command).\n"); } return 137; } if (hour > 32767 || hour < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des heures hors norme ('timeadd' command)." RETCODE); + ladmin_log("Ajustement des heures hors norme ('timeadd' command).\n"); } else { ShowMessage("Please give a correct adjustment for the hours (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the hours ('timeadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the hours ('timeadd' command).\n"); } return 137; } if (minute > 32767 || minute < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des minutes hors norme ('timeadd' command)." RETCODE); + ladmin_log("Ajustement des minutes hors norme ('timeadd' command).\n"); } else { ShowMessage("Please give a correct adjustment for the minutes (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the minutes ('timeadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the minutes ('timeadd' command).\n"); } return 137; } if (second > 32767 || second < -32767) { if (defaultlanguage == 'F') { ShowMessage("Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n"); - ladmin_log("Ajustement des secondes hors norme ('timeadd' command)." RETCODE); + ladmin_log("Ajustement des secondes hors norme ('timeadd' command).\n"); } else { ShowMessage("Please give a correct adjustment for the seconds (from -32767 to 32767).\n"); - ladmin_log("Abnormal adjustment for the seconds ('timeadd' command)." RETCODE); + ladmin_log("Abnormal adjustment for the seconds ('timeadd' command).\n"); } return 137; } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour modifier une date limite d'utilisation." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour modifier une date limite d'utilisation.\n"); } else { - ladmin_log("Request to login-server to modify a time limit." RETCODE); + ladmin_log("Request to login-server to modify a time limit.\n"); } WFIFOW(login_fd,0) = 0x7950; @@ -2818,13 +2818,13 @@ int timesetaccount(char* param) ShowMessage(": timeset aaaa/mm/jj [hh:mm:ss]\n"); ShowMessage(" timeset 0 (0 = illimité)\n"); ShowMessage(" Heure par défaut [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Nombre incorrect de paramètres pour fixer une date limite d'utilisation (commande 'timeset')." RETCODE); + ladmin_log("Nombre incorrect de paramètres pour fixer une date limite d'utilisation (commande 'timeset').\n"); } else { ShowMessage("Please input an account name, a date and a hour.\n"); ShowMessage(": timeset yyyy/mm/dd [hh:mm:ss]\n"); ShowMessage(" timeset 0 (0 = unlimited)\n"); ShowMessage(" Default time [hh:mm:ss]: 23:59:59.\n"); - ladmin_log("Incomplete parameters to set a limit time ('timeset' command)." RETCODE); + ladmin_log("Incomplete parameters to set a limit time ('timeset' command).\n"); } return 136; } @@ -2843,10 +2843,10 @@ int timesetaccount(char* param) sscanf(time, "%d:%d:%d", &hour, &minute, &second) < 3)) { if (defaultlanguage == 'F') { ShowMessage("Entrez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n"); - ladmin_log("Format incorrect pour la date/heure ('timeset' command)." RETCODE); + ladmin_log("Format incorrect pour la date/heure ('timeset' command).\n"); } else { ShowMessage("Please input 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n"); - ladmin_log("Invalid format for the date/time ('timeset' command)." RETCODE); + ladmin_log("Invalid format for the date/time ('timeset' command).\n"); } return 102; } @@ -2863,10 +2863,10 @@ int timesetaccount(char* param) if (month < 1 || month > 12) { if (defaultlanguage == 'F') { ShowMessage("Entrez un mois correct svp (entre 1 et 12).\n"); - ladmin_log("Mois incorrect pour la date ('timeset' command)." RETCODE); + ladmin_log("Mois incorrect pour la date ('timeset' command).\n"); } else { ShowMessage("Please give a correct value for the month (from 1 to 12).\n"); - ladmin_log("Invalid month for the date ('timeset' command)." RETCODE); + ladmin_log("Invalid month for the date ('timeset' command).\n"); } return 102; } @@ -2874,10 +2874,10 @@ int timesetaccount(char* param) if (day < 1 || day > 31) { if (defaultlanguage == 'F') { ShowMessage("Entrez un jour correct svp (entre 1 et 31).\n"); - ladmin_log("Jour incorrect pour la date ('timeset' command)." RETCODE); + ladmin_log("Jour incorrect pour la date ('timeset' command).\n"); } else { ShowMessage("Please give a correct value for the day (from 1 to 31).\n"); - ladmin_log("Invalid day for the date ('timeset' command)." RETCODE); + ladmin_log("Invalid day for the date ('timeset' command).\n"); } return 102; } @@ -2885,40 +2885,40 @@ int timesetaccount(char* param) (month == 1 && day > 29)) { if (defaultlanguage == 'F') { ShowMessage("Entrez un jour correct en fonction du mois (%d) svp.\n", month); - ladmin_log("Jour incorrect pour ce mois correspondant ('timeset' command)." RETCODE); + ladmin_log("Jour incorrect pour ce mois correspondant ('timeset' command).\n"); } else { ShowMessage("Please give a correct value for a day of this month (%d).\n", month); - ladmin_log("Invalid day for this month ('timeset' command)." RETCODE); + ladmin_log("Invalid day for this month ('timeset' command).\n"); } return 102; } if (hour < 0 || hour > 23) { if (defaultlanguage == 'F') { ShowMessage("Entrez une heure correcte svp (entre 0 et 23).\n"); - ladmin_log("Heure incorrecte pour l'heure ('timeset' command)." RETCODE); + ladmin_log("Heure incorrecte pour l'heure ('timeset' command).\n"); } else { ShowMessage("Please give a correct value for the hour (from 0 to 23).\n"); - ladmin_log("Invalid hour for the time ('timeset' command)." RETCODE); + ladmin_log("Invalid hour for the time ('timeset' command).\n"); } return 102; } if (minute < 0 || minute > 59) { if (defaultlanguage == 'F') { ShowMessage("Entrez des minutes correctes svp (entre 0 et 59).\n"); - ladmin_log("Minute incorrecte pour l'heure ('timeset' command)." RETCODE); + ladmin_log("Minute incorrecte pour l'heure ('timeset' command).\n"); } else { ShowMessage("Please give a correct value for the minutes (from 0 to 59).\n"); - ladmin_log("Invalid minute for the time ('timeset' command)." RETCODE); + ladmin_log("Invalid minute for the time ('timeset' command).\n"); } return 102; } if (second < 0 || second > 59) { if (defaultlanguage == 'F') { ShowMessage("Entrez des secondes correctes svp (entre 0 et 59).\n"); - ladmin_log("Seconde incorrecte pour l'heure ('timeset' command)." RETCODE); + ladmin_log("Seconde incorrecte pour l'heure ('timeset' command).\n"); } else { ShowMessage("Please give a correct value for the seconds (from 0 to 59).\n"); - ladmin_log("Invalid second for the time ('timeset' command)." RETCODE); + ladmin_log("Invalid second for the time ('timeset' command).\n"); } return 102; } @@ -2934,20 +2934,20 @@ int timesetaccount(char* param) if (defaultlanguage == 'F') { ShowMessage("Date incorrecte.\n"); ShowMessage("Ajoutez 0 ou une date et une heure svp (format: 0 ou aaaa/mm/jj hh:mm:ss).\n"); - ladmin_log("Date incorrecte. ('timeset' command)." RETCODE); + ladmin_log("Date incorrecte. ('timeset' command).\n"); } else { ShowMessage("Invalid date.\n"); ShowMessage("Please add 0 or a date and a time (format: 0 or yyyy/mm/dd hh:mm:ss).\n"); - ladmin_log("Invalid date. ('timeset' command)." RETCODE); + ladmin_log("Invalid date. ('timeset' command).\n"); } return 102; } } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour fixer une date limite d'utilisation." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour fixer une date limite d'utilisation.\n"); } else { - ladmin_log("Request to login-server to set a time limit." RETCODE); + ladmin_log("Request to login-server to set a time limit.\n"); } WFIFOW(login_fd,0) = 0x7948; @@ -2977,11 +2977,11 @@ int whoaccount(char* param) if (defaultlanguage == 'F') { ShowMessage("Entrez un nom de compte svp.\n"); ShowMessage(" who nomtest\n"); - ladmin_log("Aucun nom n'a été donné pour trouver le compte." RETCODE); + ladmin_log("Aucun nom n'a été donné pour trouver le compte.\n"); } else { ShowMessage("Please input an account name.\n"); ShowMessage(" who testname\n"); - ladmin_log("No name was given to found the account." RETCODE); + ladmin_log("No name was given to found the account.\n"); } return 136; } @@ -2990,9 +2990,9 @@ int whoaccount(char* param) } if (defaultlanguage == 'F') { - ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le information d'un compte (par le nom)." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour obtenir le information d'un compte (par le nom).\n"); } else { - ladmin_log("Request to login-server to obtain information about an account (by its name)." RETCODE); + ladmin_log("Request to login-server to obtain information about an account (by its name).\n"); } WFIFOW(login_fd,0) = 0x7952; @@ -3010,9 +3010,9 @@ int checkloginversion(void) { WFIFOHEAD(login_fd,2); if (defaultlanguage == 'F') - ladmin_log("Envoi d'un requête au serveur de logins pour obtenir sa version." RETCODE); + ladmin_log("Envoi d'un requête au serveur de logins pour obtenir sa version.\n"); else - ladmin_log("Request to login-server to obtain its version." RETCODE); + ladmin_log("Request to login-server to obtain its version.\n"); WFIFOW(login_fd,0) = 0x7530; WFIFOSET(login_fd,2); @@ -3121,15 +3121,15 @@ int prompt(void) if (strlen(parameters) == 0) { if (defaultlanguage == 'F') { - ladmin_log("Commande: '%s' (sans paramètre)" RETCODE, command, parameters); + ladmin_log("Commande: '%s' (sans paramètre)\n", command, parameters); } else { - ladmin_log("Command: '%s' (without parameters)" RETCODE, command, parameters); + ladmin_log("Command: '%s' (without parameters)\n", command, parameters); } } else { if (defaultlanguage == 'F') { - ladmin_log("Commande: '%s', paramètres: '%s'" RETCODE, command, parameters); + ladmin_log("Commande: '%s', paramètres: '%s'\n", command, parameters); } else { - ladmin_log("Command: '%s', parameters: '%s'" RETCODE, command, parameters); + ladmin_log("Command: '%s', parameters: '%s'\n", command, parameters); } } @@ -3220,10 +3220,10 @@ int prompt(void) } else { if (defaultlanguage == 'F') { ShowMessage("Commande inconnue [%s].\n", buf); - ladmin_log("Commande inconnue [%s]." RETCODE, buf); + ladmin_log("Commande inconnue [%s].\n", buf); } else { ShowMessage("Unknown command [%s].\n", buf); - ladmin_log("Unknown command [%s]." RETCODE, buf); + ladmin_log("Unknown command [%s].\n", buf); } } } @@ -3242,10 +3242,10 @@ int parse_fromlogin(int fd) if (session[fd]->eof) { if (defaultlanguage == 'F') { ShowMessage("Impossible de se connecter au serveur de login [%s:%d] !\n", loginserverip, loginserverport); - ladmin_log("Impossible de se connecter au serveur de login [%s:%d] !" RETCODE, loginserverip, loginserverport); + ladmin_log("Impossible de se connecter au serveur de login [%s:%d] !\n", loginserverip, loginserverport); } else { ShowMessage("Impossible to have a connection with the login-server [%s:%d] !\n", loginserverip, loginserverport); - ladmin_log("Impossible to have a connection with the login-server [%s:%d] !" RETCODE, loginserverip, loginserverport); + ladmin_log("Impossible to have a connection with the login-server [%s:%d] !\n", loginserverip, loginserverport); } do_close(fd); exit (0); @@ -3265,13 +3265,13 @@ int parse_fromlogin(int fd) ShowMessage(" - mot de passe incorrect,\n"); ShowMessage(" - système d'administration non activé, ou\n"); ShowMessage(" - IP non autorisée.\n"); - ladmin_log("Erreur de login: mot de passe incorrect, système d'administration non activé, ou IP non autorisée." RETCODE); + ladmin_log("Erreur de login: mot de passe incorrect, système d'administration non activé, ou IP non autorisée.\n"); } else { ShowMessage("Error at login:\n"); ShowMessage(" - incorrect password,\n"); ShowMessage(" - administration system not activated, or\n"); ShowMessage(" - unauthorised IP.\n"); - ladmin_log("Error at login: incorrect password, administration system not activated, or unauthorised IP." RETCODE); + ladmin_log("Error at login: incorrect password, administration system not activated, or unauthorised IP.\n"); } set_eof(fd); //bytes_to_read = 1; // not stop at prompt @@ -3279,14 +3279,14 @@ int parse_fromlogin(int fd) } else { if (defaultlanguage == 'F') { ShowMessage("Connexion établie.\n"); - ladmin_log("Connexion établie." RETCODE); + ladmin_log("Connexion établie.\n"); ShowMessage("Lecture de la version du serveur de login...\n"); - ladmin_log("Lecture de la version du serveur de login..." RETCODE); + ladmin_log("Lecture de la version du serveur de login...\n"); } else { ShowMessage("Established connection.\n"); - ladmin_log("Established connection." RETCODE); + ladmin_log("Established connection.\n"); ShowMessage("Reading of the version of the login-server...\n"); - ladmin_log("Reading of the version of the login-server..." RETCODE); + ladmin_log("Reading of the version of the login-server...\n"); } //bytes_to_read = 1; // unchanged checkloginversion(); @@ -3314,14 +3314,14 @@ int parse_fromlogin(int fd) WFIFOSET(login_fd,20); if (defaultlanguage == 'F') { ShowMessage("Réception de la clef MD5.\n"); - ladmin_log("Réception de la clef MD5." RETCODE); + ladmin_log("Réception de la clef MD5.\n"); ShowMessage("Envoi du mot de passe crypté...\n"); - ladmin_log("Envoi du mot de passe crypté..." RETCODE); + ladmin_log("Envoi du mot de passe crypté...\n"); } else { ShowMessage("Receiving of the MD5 key.\n"); - ladmin_log("Receiving of the MD5 key." RETCODE); + ladmin_log("Receiving of the MD5 key.\n"); ShowMessage("Sending of the encrypted password...\n"); - ladmin_log("Sending of the encrypted password..." RETCODE); + ladmin_log("Sending of the encrypted password...\n"); } } bytes_to_read = 1; @@ -3352,7 +3352,7 @@ int parse_fromlogin(int fd) return 0; if (RFIFOW(fd,2) < 5) { if (defaultlanguage == 'F') { - ladmin_log(" Réception d'une liste des comptes vide." RETCODE); + ladmin_log(" Réception d'une liste des comptes vide.\n"); if (list_count == 0) ShowMessage("Aucun compte trouvé.\n"); else if (list_count == 1) @@ -3360,7 +3360,7 @@ int parse_fromlogin(int fd) else ShowMessage("%d comptes trouvés.\n", list_count); } else { - ladmin_log(" Receiving of a void accounts list." RETCODE); + ladmin_log(" Receiving of a void accounts list.\n"); if (list_count == 0) ShowMessage("No account found.\n"); else if (list_count == 1) @@ -3373,9 +3373,9 @@ int parse_fromlogin(int fd) int i; WFIFOHEAD(login_fd,10); if (defaultlanguage == 'F') - ladmin_log(" Réception d'une liste des comptes." RETCODE); + ladmin_log(" Réception d'une liste des comptes.\n"); else - ladmin_log(" Receiving of a accounts list." RETCODE); + ladmin_log(" Receiving of a accounts list.\n"); for(i = 4; i < RFIFOW(fd,2); i += 38) { int j; char userid[24]; @@ -3458,9 +3458,9 @@ int parse_fromlogin(int fd) } // asking of the following acounts if (defaultlanguage == 'F') - ladmin_log("Envoi d'un requête au serveur de logins pour obtenir la liste des comptes de %d à %d (complément)." RETCODE, list_first, list_last); + ladmin_log("Envoi d'un requête au serveur de logins pour obtenir la liste des comptes de %d à %d (complément).\n", list_first, list_last); else - ladmin_log("Request to login-server to obtain the list of accounts from %d to %d (complement)." RETCODE, list_first, list_last); + ladmin_log("Request to login-server to obtain the list of accounts from %d to %d (complement).\n", list_first, list_last); WFIFOW(login_fd,0) = 0x7920; WFIFOL(login_fd,2) = list_first; WFIFOL(login_fd,6) = list_last; @@ -3477,18 +3477,18 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec à la création du compte [%s]. Un compte identique existe déjà.\n", RFIFOP(fd,6)); - ladmin_log("Echec à la création du compte [%s]. Un compte identique existe déjà." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec à la création du compte [%s]. Un compte identique existe déjà.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] creation failed. Same account already exists.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] creation failed. Same account already exists." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] creation failed. Same account already exists.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Compte [%s] créé avec succès [id: %d].\n", RFIFOP(fd,6), id); - ladmin_log("Compte [%s] créé avec succès [id: %d]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Compte [%s] créé avec succès [id: %d].\n", RFIFOP(fd,6), id); } else { ShowMessage("Account [%s] is successfully created [id: %d].\n", RFIFOP(fd,6), id); - ladmin_log("Account [%s] is successfully created [id: %d]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Account [%s] is successfully created [id: %d].\n", RFIFOP(fd,6), id); } } bytes_to_read = 0; @@ -3501,18 +3501,18 @@ int parse_fromlogin(int fd) if (RFIFOL(fd,2) == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec de la suppression du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec de la suppression du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec de la suppression du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] deletion failed. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] deletion failed. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] deletion failed. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Compte [%s][id: %d] SUPPRIME avec succès.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2)); - ladmin_log("Compte [%s][id: %d] SUPPRIME avec succès." RETCODE, RFIFOP(fd,6), RFIFOL(fd,2)); + ladmin_log("Compte [%s][id: %d] SUPPRIME avec succès.\n", RFIFOP(fd,6), RFIFOL(fd,2)); } else { ShowMessage("Account [%s][id: %d] is successfully DELETED.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2)); - ladmin_log("Account [%s][id: %d] is successfully DELETED." RETCODE, RFIFOP(fd,6), RFIFOL(fd,2)); + ladmin_log("Account [%s][id: %d] is successfully DELETED.\n", RFIFOP(fd,6), RFIFOL(fd,2)); } } bytes_to_read = 0; @@ -3526,19 +3526,19 @@ int parse_fromlogin(int fd) if (defaultlanguage == 'F') { ShowMessage("Echec de la modification du mot de passe du compte [%s].\n", RFIFOP(fd,6)); ShowMessage("Le compte [%s] n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec de la modification du mot de passe du compte. Le compte [%s] n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec de la modification du mot de passe du compte. Le compte [%s] n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] password changing failed.\n", RFIFOP(fd,6)); ShowMessage("Account [%s] doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account password changing failed. The compte [%s] doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account password changing failed. The compte [%s] doesn't exist.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Modification du mot de passe du compte [%s][id: %d] réussie.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2)); - ladmin_log("Modification du mot de passe du compte [%s][id: %d] réussie." RETCODE, RFIFOP(fd,6), (int)RFIFOL(fd,2)); + ladmin_log("Modification du mot de passe du compte [%s][id: %d] réussie.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2)); } else { ShowMessage("Account [%s][id: %d] password successfully changed.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2)); - ladmin_log("Account [%s][id: %d] password successfully changed." RETCODE, RFIFOP(fd,6), (int)RFIFOL(fd,2)); + ladmin_log("Account [%s][id: %d] password successfully changed.\n", RFIFOP(fd,6), (int)RFIFOL(fd,2)); } } bytes_to_read = 0; @@ -3551,10 +3551,10 @@ int parse_fromlogin(int fd) if (RFIFOL(fd,2) == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec du changement du statut du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec du changement du statut du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec du changement du statut du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] state changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] state changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] state changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { char tmpstr[256]; @@ -3603,7 +3603,7 @@ int parse_fromlogin(int fd) } strcat(tmpstr, "]"); ShowMessage("%s\n", tmpstr); - ladmin_log("%s%s", tmpstr, RETCODE); + ladmin_log("%s\n", tmpstr); } bytes_to_read = 0; RFIFOSKIP(fd,34); @@ -3617,9 +3617,9 @@ int parse_fromlogin(int fd) int i; char name[20]; if (defaultlanguage == 'F') { - ladmin_log(" Réception du nombre de joueurs en ligne." RETCODE); + ladmin_log(" Réception du nombre de joueurs en ligne.\n"); } else { - ladmin_log(" Receiving of the number of online players." RETCODE); + ladmin_log(" Receiving of the number of online players.\n"); } // Read information of the servers if (RFIFOW(fd,2) < 5) { @@ -3653,18 +3653,18 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Le compte [%s] n'existe pas ou le mot de passe est incorrect.\n", RFIFOP(fd,6)); - ladmin_log("Le compte [%s] n'existe pas ou le mot de passe est incorrect." RETCODE, RFIFOP(fd,6)); + ladmin_log("Le compte [%s] n'existe pas ou le mot de passe est incorrect.\n", RFIFOP(fd,6)); } else { ShowMessage("The account [%s] doesn't exist or the password is incorrect.\n", RFIFOP(fd,6)); - ladmin_log("The account [%s] doesn't exist or the password is incorrect." RETCODE, RFIFOP(fd,6)); + ladmin_log("The account [%s] doesn't exist or the password is incorrect.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Le mot de passe donné correspond bien au compte [%s][id: %d].\n", RFIFOP(fd,6), id); - ladmin_log("Le mot de passe donné correspond bien au compte [%s][id: %d]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Le mot de passe donné correspond bien au compte [%s][id: %d].\n", RFIFOP(fd,6), id); } else { ShowMessage("The proposed password is correct for the account [%s][id: %d].\n", RFIFOP(fd,6), id); - ladmin_log("The proposed password is correct for the account [%s][id: %d]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("The proposed password is correct for the account [%s][id: %d].\n", RFIFOP(fd,6), id); } } bytes_to_read = 0; @@ -3679,19 +3679,19 @@ int parse_fromlogin(int fd) if (defaultlanguage == 'F') { ShowMessage("Echec de la modification du sexe du compte [%s].\n", RFIFOP(fd,6)); ShowMessage("Le compte [%s] n'existe pas ou le sexe est déjà celui demandé.\n", RFIFOP(fd,6)); - ladmin_log("Echec de la modification du sexe du compte. Le compte [%s] n'existe pas ou le sexe est déjà celui demandé." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec de la modification du sexe du compte. Le compte [%s] n'existe pas ou le sexe est déjà celui demandé.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] sex changing failed.\n", RFIFOP(fd,6)); ShowMessage("Account [%s] doesn't exist or the sex is already the good sex.\n", RFIFOP(fd,6)); - ladmin_log("Account sex changing failed. The compte [%s] doesn't exist or the sex is already the good sex." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account sex changing failed. The compte [%s] doesn't exist or the sex is already the good sex.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Sexe du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id); - ladmin_log("Sexe du compte [%s][id: %d] changé avec succès." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Sexe du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id); } else { ShowMessage("Account [%s][id: %d] sex successfully changed.\n", RFIFOP(fd,6), id); - ladmin_log("Account [%s][id: %d] sex successfully changed." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Account [%s][id: %d] sex successfully changed.\n", RFIFOP(fd,6), id); } } bytes_to_read = 0; @@ -3707,20 +3707,20 @@ int parse_fromlogin(int fd) ShowMessage("Echec de la modification du niveau de GM du compte [%s].\n", RFIFOP(fd,6)); ShowMessage("Le compte [%s] n'existe pas, le niveau de GM est déjà celui demandé\n", RFIFOP(fd,6)); ShowMessage("ou il est impossible de modifier le fichier des comptes GM.\n"); - ladmin_log("Echec de la modification du niveau de GM du compte. Le compte [%s] n'existe pas, le niveau de GM est déjà celui demandé ou il est impossible de modifier le fichier des comptes GM." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec de la modification du niveau de GM du compte. Le compte [%s] n'existe pas, le niveau de GM est déjà celui demandé ou il est impossible de modifier le fichier des comptes GM.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] GM level changing failed.\n", RFIFOP(fd,6)); ShowMessage("Account [%s] doesn't exist, the GM level is already the good GM level\n", RFIFOP(fd,6)); ShowMessage("or it's impossible to modify the GM accounts file.\n"); - ladmin_log("Account GM level changing failed. The compte [%s] doesn't exist, the GM level is already the good sex or it's impossible to modify the GM accounts file." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account GM level changing failed. The compte [%s] doesn't exist, the GM level is already the good sex or it's impossible to modify the GM accounts file.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Niveau de GM du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id); - ladmin_log("Niveau de GM du compte [%s][id: %d] changé avec succès." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Niveau de GM du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id); } else { ShowMessage("Account [%s][id: %d] GM level successfully changed.\n", RFIFOP(fd,6), id); - ladmin_log("Account [%s][id: %d] GM level successfully changed." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Account [%s][id: %d] GM level successfully changed.\n", RFIFOP(fd,6), id); } } bytes_to_read = 0; @@ -3735,19 +3735,19 @@ int parse_fromlogin(int fd) if (defaultlanguage == 'F') { ShowMessage("Echec de la modification de l'e-mail du compte [%s].\n", RFIFOP(fd,6)); ShowMessage("Le compte [%s] n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec de la modification de l'e-mail du compte. Le compte [%s] n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec de la modification de l'e-mail du compte. Le compte [%s] n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] e-mail changing failed.\n", RFIFOP(fd,6)); ShowMessage("Account [%s] doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account e-mail changing failed. The compte [%s] doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account e-mail changing failed. The compte [%s] doesn't exist.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Modification de l'e-mail du compte [%s][id: %d] réussie.\n", RFIFOP(fd,6), id); - ladmin_log("Modification de l'e-mail du compte [%s][id: %d] réussie." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Modification de l'e-mail du compte [%s][id: %d] réussie.\n", RFIFOP(fd,6), id); } else { ShowMessage("Account [%s][id: %d] e-mail successfully changed.\n", RFIFOP(fd,6), id); - ladmin_log("Account [%s][id: %d] e-mail successfully changed." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Account [%s][id: %d] e-mail successfully changed.\n", RFIFOP(fd,6), id); } } bytes_to_read = 0; @@ -3761,18 +3761,18 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec du changement du mémo du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec du changement du mémo du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec du changement du mémo du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] memo changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] memo changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] memo changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Mémo du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id); - ladmin_log("Mémo du compte [%s][id: %d] changé avec succès." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Mémo du compte [%s][id: %d] changé avec succès.\n", RFIFOP(fd,6), id); } else { ShowMessage("Account [%s][id: %d] memo successfully changed.\n", RFIFOP(fd,6), id); - ladmin_log("Account [%s][id: %d] memo successfully changed." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Account [%s][id: %d] memo successfully changed.\n", RFIFOP(fd,6), id); } } bytes_to_read = 0; @@ -3786,18 +3786,18 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Impossible de trouver l'id du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Impossible de trouver l'id du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Impossible de trouver l'id du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Unable to find the account [%s] id. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Unable to find the account [%s] id. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Unable to find the account [%s] id. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { if (defaultlanguage == 'F') { ShowMessage("Le compte [%s] a pour id: %d.\n", RFIFOP(fd,6), id); - ladmin_log("Le compte [%s] a pour id: %d." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Le compte [%s] a pour id: %d.\n", RFIFOP(fd,6), id); } else { ShowMessage("The account [%s] have the id: %d.\n", RFIFOP(fd,6), id); - ladmin_log("The account [%s] have the id: %d." RETCODE, RFIFOP(fd,6), id); + ladmin_log("The account [%s] have the id: %d.\n", RFIFOP(fd,6), id); } } bytes_to_read = 0; @@ -3811,18 +3811,18 @@ int parse_fromlogin(int fd) if (strcmp((const char*)RFIFOP(fd,6), "") == 0) { if (defaultlanguage == 'F') { ShowMessage("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas.\n", id); - ladmin_log("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas." RETCODE, id); + ladmin_log("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas.\n", id); } else { ShowMessage("Unable to find the account [%d] name. Account doesn't exist.\n", id); - ladmin_log("Unable to find the account [%d] name. Account doesn't exist." RETCODE, id); + ladmin_log("Unable to find the account [%d] name. Account doesn't exist.\n", id); } } else { if (defaultlanguage == 'F') { ShowMessage("Le compte [id: %d] a pour nom: %s.\n", id, RFIFOP(fd,6)); - ladmin_log("Le compte [id: %d] a pour nom: %s." RETCODE, id, RFIFOP(fd,6)); + ladmin_log("Le compte [id: %d] a pour nom: %s.\n", id, RFIFOP(fd,6)); } else { ShowMessage("The account [id: %d] have the name: %s.\n", id, RFIFOP(fd,6)); - ladmin_log("The account [id: %d] have the name: %s." RETCODE, id, RFIFOP(fd,6)); + ladmin_log("The account [id: %d] have the name: %s.\n", id, RFIFOP(fd,6)); } } bytes_to_read = 0; @@ -3836,30 +3836,30 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec du changement de la validité du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] validity limit changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] validity limit changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] validity limit changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { time_t timestamp = RFIFOL(fd,30); if (timestamp == 0) { if (defaultlanguage == 'F') { ShowMessage("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité].\n", RFIFOP(fd,6), id); - ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité].\n", RFIFOP(fd,6), id); } else { ShowMessage("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited].\n", RFIFOP(fd,6), id); - ladmin_log("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited].\n", RFIFOP(fd,6), id); } } else { char tmpstr[128]; strftime(tmpstr, 24, date_format, localtime(×tamp)); if (defaultlanguage == 'F') { ShowMessage("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); } else { ShowMessage("Validity Limit of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Validity Limit of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Validity Limit of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); } } } @@ -3874,30 +3874,30 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] final date of banishment changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] final date of banishment changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] final date of banishment changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { time_t timestamp = RFIFOL(fd,30); if (timestamp == 0) { if (defaultlanguage == 'F') { ShowMessage("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n", RFIFOP(fd,6), id); - ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n", RFIFOP(fd,6), id); } else { ShowMessage("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n", RFIFOP(fd,6), id); - ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n", RFIFOP(fd,6), id); } } else { char tmpstr[128]; strftime(tmpstr, 24, date_format, localtime(×tamp)); if (defaultlanguage == 'F') { ShowMessage("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); } else { ShowMessage("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); } } } @@ -3912,30 +3912,30 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] final date of banishment changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] final date of banishment changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] final date of banishment changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { time_t timestamp = RFIFOL(fd,30); if (timestamp == 0) { if (defaultlanguage == 'F') { ShowMessage("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n", RFIFOP(fd,6), id); - ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n", RFIFOP(fd,6), id); } else { ShowMessage("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n", RFIFOP(fd,6), id); - ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished]." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n", RFIFOP(fd,6), id); } } else { char tmpstr[128]; strftime(tmpstr, 24, date_format, localtime(×tamp)); if (defaultlanguage == 'F') { ShowMessage("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); } else { ShowMessage("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); } } } @@ -3949,18 +3949,18 @@ int parse_fromlogin(int fd) if (RFIFOW(fd,2) == (unsigned short)-1) { if (defaultlanguage == 'F') { ShowMessage("Echec de l'envoi du message. Aucun server de char en ligne.\n"); - ladmin_log("Echec de l'envoi du message. Aucun server de char en ligne." RETCODE); + ladmin_log("Echec de l'envoi du message. Aucun server de char en ligne.\n"); } else { ShowMessage("Message sending failed. No online char-server.\n"); - ladmin_log("Message sending failed. No online char-server." RETCODE); + ladmin_log("Message sending failed. No online char-server.\n"); } } else { if (defaultlanguage == 'F') { ShowMessage("Message transmis au server de logins avec succès.\n"); - ladmin_log("Message transmis au server de logins avec succès." RETCODE); + ladmin_log("Message transmis au server de logins avec succès.\n"); } else { ShowMessage("Message successfully sended to login-server.\n"); - ladmin_log("Message successfully sended to login-server." RETCODE); + ladmin_log("Message successfully sended to login-server.\n"); } } bytes_to_read = 0; @@ -3974,10 +3974,10 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); - ladmin_log("Echec du changement de la validité du compte [%s]. Le compte n'existe pas." RETCODE, RFIFOP(fd,6)); + ladmin_log("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n", RFIFOP(fd,6)); } else { ShowMessage("Account [%s] validity limit changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); - ladmin_log("Account [%s] validity limit changing failed. Account doesn't exist." RETCODE, RFIFOP(fd,6)); + ladmin_log("Account [%s] validity limit changing failed. Account doesn't exist.\n", RFIFOP(fd,6)); } } else { time_t timestamp = RFIFOL(fd,30); @@ -3986,22 +3986,22 @@ int parse_fromlogin(int fd) ShowMessage("Limite de validité du compte [%s][id: %d] inchangée.\n", RFIFOP(fd,6), id); ShowMessage("Le compte a une validité illimitée ou\n"); ShowMessage("la modification est impossible avec les ajustements demandés.\n"); - ladmin_log("Limite de validité du compte [%s][id: %d] inchangée. Le compte a une validité illimitée ou la modification est impossible avec les ajustements demandés." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Limite de validité du compte [%s][id: %d] inchangée. Le compte a une validité illimitée ou la modification est impossible avec les ajustements demandés.\n", RFIFOP(fd,6), id); } else { ShowMessage("Validity limit of the account [%s][id: %d] unchanged.\n", RFIFOP(fd,6), id); ShowMessage("The account have an unlimited validity limit or\n"); ShowMessage("the changing is impossible with the proposed adjustments.\n"); - ladmin_log("Validity limit of the account [%s][id: %d] unchanged. The account have an unlimited validity limit or the changing is impossible with the proposed adjustments." RETCODE, RFIFOP(fd,6), id); + ladmin_log("Validity limit of the account [%s][id: %d] unchanged. The account have an unlimited validity limit or the changing is impossible with the proposed adjustments.\n", RFIFOP(fd,6), id); } } else { char tmpstr[128]; strftime(tmpstr, 24, date_format, localtime(×tamp)); if (defaultlanguage == 'F') { ShowMessage("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n", RFIFOP(fd,6), id, tmpstr); } else { ShowMessage("Validity limit of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); - ladmin_log("Validity limit of the account [%s][id: %d] successfully changed to be until %s." RETCODE, RFIFOP(fd,6), id, tmpstr); + ladmin_log("Validity limit of the account [%s][id: %d] successfully changed to be until %s.\n", RFIFOP(fd,6), id, tmpstr); } } } @@ -4034,25 +4034,25 @@ int parse_fromlogin(int fd) if (id == -1) { if (defaultlanguage == 'F') { ShowMessage("Impossible de trouver le compte [%s]. Le compte n'existe pas.\n", parameters); - ladmin_log("Impossible de trouver le compte [%s]. Le compte n'existe pas." RETCODE, parameters); + ladmin_log("Impossible de trouver le compte [%s]. Le compte n'existe pas.\n", parameters); } else { ShowMessage("Unabled to find the account [%s]. Account doesn't exist.\n", parameters); - ladmin_log("Unabled to find the account [%s]. Account doesn't exist." RETCODE, parameters); + ladmin_log("Unabled to find the account [%s]. Account doesn't exist.\n", parameters); } } else if (strlen(userid) == 0) { if (defaultlanguage == 'F') { ShowMessage("Impossible de trouver le compte [id: %s]. Le compte n'existe pas.\n", parameters); - ladmin_log("Impossible de trouver le compte [id: %s]. Le compte n'existe pas." RETCODE, parameters); + ladmin_log("Impossible de trouver le compte [id: %s]. Le compte n'existe pas.\n", parameters); } else { ShowMessage("Unabled to find the account [id: %s]. Account doesn't exist.\n", parameters); - ladmin_log("Unabled to find the account [id: %s]. Account doesn't exist." RETCODE, parameters); + ladmin_log("Unabled to find the account [id: %s]. Account doesn't exist.\n", parameters); } } else { if (defaultlanguage == 'F') { - ladmin_log("Réception d'information concernant un compte." RETCODE); + ladmin_log("Réception d'information concernant un compte.\n"); ShowMessage("Le compte a les caractéristiques suivantes:\n"); } else { - ladmin_log("Receiving information about an account." RETCODE); + ladmin_log("Receiving information about an account.\n"); ShowMessage("The account is set with:\n"); } if (RFIFOB(fd,6) == 0) { @@ -4170,7 +4170,7 @@ int parse_fromlogin(int fd) default: ShowMessage("Remote administration has been disconnected (unknown packet).\n"); - ladmin_log("'End of connection, unknown packet." RETCODE); + ladmin_log("'End of connection, unknown packet.\n"); set_eof(fd); return 0; } @@ -4189,10 +4189,10 @@ int Connect_login_server(void) { if (defaultlanguage == 'F') { ShowMessage("Essai de connection au server de logins...\n"); - ladmin_log("Essai de connection au server de logins..." RETCODE); + ladmin_log("Essai de connection au server de logins...\n"); } else { ShowMessage("Attempt to connect to login-server...\n"); - ladmin_log("Attempt to connect to login-server..." RETCODE); + ladmin_log("Attempt to connect to login-server...\n"); } login_fd = make_connection(login_ip, loginserverport); @@ -4210,10 +4210,10 @@ int Connect_login_server(void) bytes_to_read = 1; if (defaultlanguage == 'F') { ShowMessage("Envoi du mot de passe...\n"); - ladmin_log("Envoi du mot de passe..." RETCODE); + ladmin_log("Envoi du mot de passe...\n"); } else { ShowMessage("Sending of the password...\n"); - ladmin_log("Sending of the password..." RETCODE); + ladmin_log("Sending of the password...\n"); } } else { WFIFOHEAD(login_fd,2); @@ -4222,10 +4222,10 @@ int Connect_login_server(void) bytes_to_read = 1; if (defaultlanguage == 'F') { ShowMessage("Demande de la clef MD5...\n"); - ladmin_log("Demande de la clef MD5..." RETCODE); + ladmin_log("Demande de la clef MD5...\n"); } else { ShowMessage("Request about the MD5 key...\n"); - ladmin_log("Request about the MD5 key..." RETCODE); + ladmin_log("Request about the MD5 key...\n"); } } @@ -4329,10 +4329,10 @@ void do_final(void) if (defaultlanguage == 'F') { ShowMessage("\033[0m----Fin de Ladmin (fin normale avec fermeture de tous les fichiers).\n"); - ladmin_log("----Fin de Ladmin (fin normale avec fermeture de tous les fichiers)." RETCODE); + ladmin_log("----Fin de Ladmin (fin normale avec fermeture de tous les fichiers).\n"); } else { ShowMessage("\033[0m----End of Ladmin (normal end with closing of all files).\n"); - ladmin_log("----End of Ladmin (normal end with closing of all files)." RETCODE); + ladmin_log("----End of Ladmin (normal end with closing of all files).\n"); } already_exit_function = 1; @@ -4353,9 +4353,9 @@ int do_init(int argc, char **argv) ladmin_log(""); if (defaultlanguage == 'F') { - ladmin_log("Fichier de configuration lu." RETCODE); + ladmin_log("Fichier de configuration lu.\n"); } else { - ladmin_log("Configuration file readed." RETCODE); + ladmin_log("Configuration file readed.\n"); } srand(time(NULL)); @@ -4371,10 +4371,10 @@ int do_init(int argc, char **argv) } if (defaultlanguage == 'F') { - ladmin_log("Ladmin est prêt." RETCODE); + ladmin_log("Ladmin est prêt.\n"); ShowMessage("Ladmin est \033[1;32mprêt\033[0m.\n\n"); } else { - ladmin_log("Ladmin is ready." RETCODE); + ladmin_log("Ladmin is ready.\n"); ShowMessage("Ladmin is \033[1;32mready\033[0m.\n\n"); } -- cgit v1.2.3-70-g09d2