summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-13 06:06:30 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-13 06:06:30 +0000
commit6eec4f53cc983d63b8d3e203f6095591c350e453 (patch)
treec746b88b56779554f6b218eb90e6ace48a14c176 /src
parent4bd3eb00fe774b2404958ffe597356e25a9dde4f (diff)
downloadhercules-6eec4f53cc983d63b8d3e203f6095591c350e453.tar.gz
hercules-6eec4f53cc983d63b8d3e203f6095591c350e453.tar.bz2
hercules-6eec4f53cc983d63b8d3e203f6095591c350e453.tar.xz
hercules-6eec4f53cc983d63b8d3e203f6095591c350e453.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c100
-rw-r--r--src/char/int_guild.c10
-rw-r--r--src/char/int_homun.c2
-rw-r--r--src/char/int_party.c2
-rw-r--r--src/char/int_pet.c2
-rw-r--r--src/char/int_status.c2
-rw-r--r--src/char/int_storage.c4
-rw-r--r--src/char/inter.c2
-rw-r--r--src/char_sql/char.c6
-rw-r--r--src/char_sql/int_guild.c6
-rw-r--r--src/common/cbasetypes.h15
-rw-r--r--src/ladmin/ladmin.c642
-rw-r--r--src/login/login.c470
-rw-r--r--src/login_sql/login.c18
-rw-r--r--src/map/log.c30
-rw-r--r--src/tool/convert.c4
16 files changed, 649 insertions, 666 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 2ae559f20..ba21cd68e 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -190,7 +190,7 @@ int char_log(char *fmt, ...)
logfp = fopen(char_log_filename, "a");
if (logfp) {
if (fmt[0] == '\0') // jump a line if no message
- fprintf(logfp, RETCODE);
+ fprintf(logfp, "\n");
else {
time(&raw_time);
strftime(tmpstr, 24, "%d-%m-%Y %H:%M:%S", localtime(&raw_time));
@@ -740,7 +740,7 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg
ShowWarning("mmo_auth_init: ******WARNING: character name has wisp server name.\n");
ShowWarning(" Character name '%s' = wisp server name '%s'.\n", p->name, wisp_server_name);
ShowWarning(" Character readed. Suggestion: change the wisp server name.\n");
- char_log("mmo_auth_init: ******WARNING: character name has wisp server name: Character name '%s' = wisp server name '%s'." RETCODE,
+ char_log("mmo_auth_init: ******WARNING: character name has wisp server name: Character name '%s' = wisp server name '%s'.\n",
p->name, wisp_server_name);
}
#endif //TXT_SQL_CONVERT
@@ -973,8 +973,8 @@ int mmo_char_init(void)
if (fp == NULL) {
ShowError("Characters file not found: %s.\n", char_txt);
- char_log("Characters file not found: %s." RETCODE, char_txt);
- char_log("Id for the next created character: %d." RETCODE, char_id_count);
+ char_log("Characters file not found: %s.\n", char_txt);
+ char_log("Id for the next created character: %d.\n", char_id_count);
return 0;
}
@@ -999,7 +999,7 @@ int mmo_char_init(void)
char_dat = (struct character_data*)aRealloc(char_dat, sizeof(struct character_data) * char_max);
if (!char_dat) {
ShowFatalError("Out of memory: mmo_char_init (realloc of char_dat).\n");
- char_log("Out of memory: mmo_char_init (realloc of char_dat)." RETCODE);
+ char_log("Out of memory: mmo_char_init (realloc of char_dat).\n");
exit(1);
}
}
@@ -1020,28 +1020,28 @@ int mmo_char_init(void)
ShowError(" -> Character saved in log file.\n");
switch (ret) {
case -1:
- char_log("Duplicate character id in the next character line (character not readed):" RETCODE);
+ char_log("Duplicate character id in the next character line (character not readed):\n");
break;
case -2:
- char_log("Duplicate character name in the next character line (character not readed):" RETCODE);
+ char_log("Duplicate character name in the next character line (character not readed):\n");
break;
case -3:
- char_log("Invalid memo point structure in the next character line (character not readed):" RETCODE);
+ char_log("Invalid memo point structure in the next character line (character not readed):\n");
break;
case -4:
- char_log("Invalid inventory item structure in the next character line (character not readed):" RETCODE);
+ char_log("Invalid inventory item structure in the next character line (character not readed):\n");
break;
case -5:
- char_log("Invalid cart item structure in the next character line (character not readed):" RETCODE);
+ char_log("Invalid cart item structure in the next character line (character not readed):\n");
break;
case -6:
- char_log("Invalid skill structure in the next character line (character not readed):" RETCODE);
+ char_log("Invalid skill structure in the next character line (character not readed):\n");
break;
case -7:
- char_log("Invalid register structure in the next character line (character not readed):" RETCODE);
+ char_log("Invalid register structure in the next character line (character not readed):\n");
break;
default: // 0
- char_log("Unabled to get a character in the next line - Basic structure of line (before inventory) is incorrect (character not readed):" RETCODE);
+ char_log("Unabled to get a character in the next line - Basic structure of line (before inventory) is incorrect (character not readed):\n");
break;
}
char_log("%s", line);
@@ -1051,16 +1051,16 @@ int mmo_char_init(void)
if (char_num == 0) {
ShowNotice("mmo_char_init: No character found in %s.\n", char_txt);
- char_log("mmo_char_init: No character found in %s." RETCODE, char_txt);
+ char_log("mmo_char_init: No character found in %s.\n", char_txt);
} else if (char_num == 1) {
ShowStatus("mmo_char_init: 1 character read in %s.\n", char_txt);
- char_log("mmo_char_init: 1 character read in %s." RETCODE, char_txt);
+ char_log("mmo_char_init: 1 character read in %s.\n", char_txt);
} else {
ShowStatus("mmo_char_init: %d characters read in %s.\n", char_num, char_txt);
- char_log("mmo_char_init: %d characters read in %s." RETCODE, char_num, char_txt);
+ char_log("mmo_char_init: %d characters read in %s.\n", char_num, char_txt);
}
- char_log("Id for the next created character: %d." RETCODE, char_id_count);
+ char_log("Id for the next created character: %d.\n", char_id_count);
return 0;
}
@@ -1096,13 +1096,13 @@ void mmo_char_sync(void)
fp = lock_fopen(char_txt, &lock);
if (fp == NULL) {
ShowWarning("Server cannot save characters.\n");
- char_log("WARNING: Server cannot save characters." RETCODE);
+ char_log("WARNING: Server cannot save characters.\n");
} else {
for(i = 0; i < char_num; i++) {
mmo_char_tostr(line, &char_dat[id[i]].status, char_dat[id[i]].global, char_dat[id[i]].global_num); // use of sorted index
- fprintf(fp, "%s" RETCODE, line);
+ fprintf(fp, "%s\n", line);
}
- fprintf(fp, "%d\t%%newid%%" RETCODE, char_id_count);
+ fprintf(fp, "%d\t%%newid%%\n", char_id_count);
lock_fclose(fp, char_txt, &lock);
}
@@ -1110,7 +1110,7 @@ void mmo_char_sync(void)
f_fp = lock_fopen(friends_txt, &lock);
for(i = 0; i < char_num; i++) {
mmo_friends_list_data_str(f_line, &char_dat[id[i]].status);
- fprintf(f_fp, "%s" RETCODE, f_line);
+ fprintf(f_fp, "%s\n", f_line);
}
lock_fclose(f_fp, friends_txt, &lock);
@@ -1120,7 +1120,7 @@ void mmo_char_sync(void)
f_fp = lock_fopen(hotkeys_txt, &lock);
for(i = 0; i < char_num; i++) {
mmo_hotkeys_tostr(f_line, &char_dat[id[i]].status);
- fprintf(f_fp, "%s" RETCODE, f_line);
+ fprintf(f_fp, "%s\n", f_line);
}
lock_fclose(f_fp, hotkeys_txt, &lock);
@@ -1162,20 +1162,20 @@ int make_new_char(int fd, unsigned char *dat)
//check name != main chat nick [LuzZza]
if(strcmpi(name, main_chat_nick) == 0) {
- char_log("Create char failed (%d): this nick (%s) reserved for mainchat messages." RETCODE,
+ char_log("Create char failed (%d): this nick (%s) reserved for mainchat messages.\n",
sd->account_id, name);
return -1;
}
if (remove_control_chars(name)) {
- char_log("Make new char error (control char received in the name): (connection #%d, account: %d)." RETCODE,
+ char_log("Make new char error (control char received in the name): (connection #%d, account: %d).\n",
fd, sd->account_id);
return -1;
}
// check lenght of character name
if (strlen(name) < 4) {
- char_log("Make new char error (character name too small): (connection #%d, account: %d, name: '%s')." RETCODE,
+ char_log("Make new char error (character name too small): (connection #%d, account: %d, name: '%s').\n",
fd, sd->account_id, dat);
return -1;
}
@@ -1184,14 +1184,14 @@ int make_new_char(int fd, unsigned char *dat)
if (char_name_option == 1) { // only letters/symbols in char_name_letters are authorised
for (i = 0; i < NAME_LENGTH && name[i]; i++)
if (strchr(char_name_letters, name[i]) == NULL) {
- char_log("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c." RETCODE,
+ char_log("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c.\n",
fd, sd->account_id, name, name[i]);
return -1;
}
} else if (char_name_option == 2) { // letters/symbols in char_name_letters are forbidden
for (i = 0; i < NAME_LENGTH && name[i]; i++)
if (strchr(char_name_letters, name[i]) != NULL) {
- char_log("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c." RETCODE,
+ char_log("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c.\n",
fd, sd->account_id, dat, dat[i]);
return -1;
}
@@ -1201,7 +1201,7 @@ int make_new_char(int fd, unsigned char *dat)
dat[30] >= MAX_CHARS || // slots (dat[30] can not be negativ)
dat[33] <= 0 || dat[33] >= 24 || // hair style
dat[31] >= 9) { // hair color (dat[31] can not be negativ)
- char_log("Make new char error (invalid values): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d" RETCODE,
+ char_log("Make new char error (invalid values): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d\n",
fd, sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
return -1;
}
@@ -1209,7 +1209,7 @@ int make_new_char(int fd, unsigned char *dat)
// check individual stat value
for(i = 24; i <= 29; i++) {
if (dat[i] < 1 || dat[i] > 9) {
- char_log("Make new char error (invalid stat value: not between 1 to 9): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d" RETCODE,
+ char_log("Make new char error (invalid stat value: not between 1 to 9): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d\n",
fd, sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
return -1;
}
@@ -1217,7 +1217,7 @@ int make_new_char(int fd, unsigned char *dat)
if( ((dat[24]+dat[27]) > 10) || ((dat[25]+dat[29]) > 10) || ((dat[26]+dat[28]) > 10) ) {
if (log_char) {
- char_log("Make new char error (invalid stat value): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d" RETCODE,
+ char_log("Make new char error (invalid stat value): (connection #%d, account: %d) slot %d, name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d\n",
fd, sd->account_id, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
return -1;
}
@@ -1226,19 +1226,19 @@ int make_new_char(int fd, unsigned char *dat)
for(i = 0; i < char_num; i++) {
if ((name_ignoring_case != 0 && strncmp(char_dat[i].status.name, name, NAME_LENGTH) == 0) ||
(name_ignoring_case == 0 && strncmpi(char_dat[i].status.name, name, NAME_LENGTH) == 0)) {
- char_log("Make new char error (name already exists): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ char_log("Make new char error (name already exists): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d.\n",
fd, sd->account_id, dat[30], dat, char_dat[i].status.name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
return -1;
}
if (char_dat[i].status.account_id == sd->account_id && char_dat[i].status.char_num == dat[30]) {
- char_log("Make new char error (slot already used): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ char_log("Make new char error (slot already used): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d.\n",
fd, sd->account_id, dat[30], dat, char_dat[i].status.name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
return -1;
}
}
if (strcmp(wisp_server_name, name) == 0) {
- char_log("Make new char error (name used is wisp name for server): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ char_log("Make new char error (name used is wisp name for server): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d.\n",
fd, sd->account_id, dat[30], name, char_dat[i].status.name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
return -1;
}
@@ -1248,12 +1248,12 @@ int make_new_char(int fd, unsigned char *dat)
char_dat = (struct character_data*)aRealloc(char_dat, sizeof(struct character_data) * char_max);
if (!char_dat) {
ShowFatalError("Out of memory: make_new_char (realloc of char_dat).\n");
- char_log("Out of memory: make_new_char (realloc of char_dat)." RETCODE);
+ char_log("Out of memory: make_new_char (realloc of char_dat).\n");
exit(1);
}
}
- char_log("Creation of New Character: (connection #%d, account: %d) slot %d, character Name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE,
+ char_log("Creation of New Character: (connection #%d, account: %d) slot %d, character Name: %s, stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d.\n",
fd, sd->account_id, dat[30], name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]);
memset(&char_dat[i], 0, sizeof(struct character_data));
@@ -2208,7 +2208,7 @@ int parse_fromlogin(int fd)
if (RFIFOREST(fd) < 8 || RFIFOREST(fd) < (8 + RFIFOL(fd,4)))
return 0;
if (RFIFOL(fd,4) < 1)
- char_log("Receiving a message for broadcast, but message is void." RETCODE);
+ char_log("Receiving a message for broadcast, but message is void.\n");
else
{
// at least 1 map-server
@@ -2216,7 +2216,7 @@ int parse_fromlogin(int fd)
if (server_fd[i] >= 0)
break;
if (i == MAX_MAP_SERVERS)
- char_log("'ladmin': Receiving a message for broadcast, but no map-server is online." RETCODE);
+ char_log("'ladmin': Receiving a message for broadcast, but no map-server is online.\n");
else {
unsigned char buf[128];
char message[4096]; // +1 to add a null terminated if not exist in the packet
@@ -2232,15 +2232,15 @@ int parse_fromlogin(int fd)
p++;
// if message is only composed of spaces
if (p[0] == '\0')
- char_log("Receiving a message for broadcast, but message is only a lot of spaces." RETCODE);
+ char_log("Receiving a message for broadcast, but message is only a lot of spaces.\n");
// else send message to all map-servers
else {
if (RFIFOW(fd,2) == 0) {
- char_log("'ladmin': Receiving a message for broadcast (message (in yellow): %s)" RETCODE,
+ char_log("'ladmin': Receiving a message for broadcast (message (in yellow): %s)\n",
message);
lp = 4;
} else {
- char_log("'ladmin': Receiving a message for broadcast (message (in blue): %s)" RETCODE,
+ char_log("'ladmin': Receiving a message for broadcast (message (in blue): %s)\n",
message);
lp = 8;
}
@@ -2369,7 +2369,7 @@ int parse_fromlogin(int fd)
GM_num++;
}
ShowStatus("From login-server: receiving information of %d GM accounts.\n", GM_num);
- char_log("From login-server: receiving information of %d GM accounts." RETCODE, GM_num);
+ char_log("From login-server: receiving information of %d GM accounts.\n", GM_num);
create_online_files(); // update online players files (perhaps some online players change of GM level)
// send new gm acccounts level to map-servers
memcpy(buf, RFIFOP(fd,0), RFIFOW(fd,2));
@@ -2410,7 +2410,7 @@ int parse_fromlogin(int fd)
GM_num++;
if (GM_num >= 4000) {
ShowWarning("4000 GM accounts found. Next GM accounts are not readed.\n");
- char_log("***WARNING: 4000 GM accounts found. Next GM accounts are not readed." RETCODE);
+ char_log("***WARNING: 4000 GM accounts found. Next GM accounts are not readed.\n");
}
}
}
@@ -2418,7 +2418,7 @@ int parse_fromlogin(int fd)
unsigned char buf[32000];
int len;
ShowStatus("From login-server: receiving GM account information (%d: level %d).\n", RFIFOL(fd,2), (int)RFIFOB(fd,6));
- char_log("From login-server: receiving a GM account information (%d: level %d)." RETCODE, RFIFOL(fd,2), (int)RFIFOB(fd,6));
+ char_log("From login-server: receiving a GM account information (%d: level %d).\n", RFIFOL(fd,2), (int)RFIFOB(fd,6));
//create_online_files(); // not change online file for only 1 player (in next timer, that will be done
// send gm acccounts level to map-servers
len = 4;
@@ -2788,7 +2788,7 @@ int parse_frommap(int fd)
ShowStatus("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d.\n",
id, j, CONVIP(server[id].ip), server[id].port);
ShowStatus("Map-server %d loading complete.\n", id);
- char_log("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d. Map-server %d loading complete." RETCODE,
+ char_log("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d. Map-server %d loading complete.\n",
id, j, CONVIP(server[id].ip), server[id].port, id);
if (max_account_id != DEFAULT_MAX_ACCOUNT_ID || max_char_id != DEFAULT_MAX_CHAR_ID)
@@ -2807,7 +2807,7 @@ int parse_frommap(int fd)
int x;
if (j == 0) {
ShowWarning("Map-server %d has NO maps.\n", id);
- char_log("WARNING: Map-server %d has NO maps." RETCODE, id);
+ char_log("WARNING: Map-server %d has NO maps.\n", id);
} else {
// Transmitting maps information to the other map-servers
WBUFW(buf,0) = 0x2b04;
@@ -3471,7 +3471,7 @@ int parse_char(int fd)
break;
}
cd = &char_dat[sd->found_char[ch]].status;
- char_log("Character Selected, Account ID: %d, Character Slot: %d, Character Name: %s." RETCODE, sd->account_id, char_num, cd->name);
+ char_log("Character Selected, Account ID: %d, Character Slot: %d, Character Name: %s.\n", sd->account_id, char_num, cd->name);
cd->sex = sd->sex;
@@ -3823,7 +3823,7 @@ int parse_console(char* buf)
sscanf(buf, "%[^\n]", command);
- //login_log("Console command :%s" RETCODE, command);
+ //login_log("Console command :%s\n", command);
if( strcmpi("shutdown", command) == 0 ||
strcmpi("exit", command) == 0 ||
@@ -4278,7 +4278,7 @@ void do_final(void)
inter_final();
mapindex_final();
- char_log("----End of char-server (normal end with closing of all files)." RETCODE);
+ char_log("----End of char-server (normal end with closing of all files).\n");
}
//------------------------------
@@ -4330,7 +4330,7 @@ int do_init(int argc, char **argv)
// a newline in the log...
char_log("");
// moved behind char_config_read in case we changed the filename [celest]
- char_log("The char-server starting..." RETCODE);
+ char_log("The char-server starting...\n");
if ((naddr_ != 0) && (!login_ip || !char_ip))
{
@@ -4390,7 +4390,7 @@ int do_init(int argc, char **argv)
}
char_fd = make_listen_bind(bind_ip, char_port);
- char_log("The char-server is ready (Server is listening on the port %d)." RETCODE, char_port);
+ char_log("The char-server is ready (Server is listening on the port %d).\n", char_port);
ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port);
return 0;
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index d347d847e..c4ae0a493 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -470,7 +470,7 @@ int inter_guild_save_sub(DBKey key,void *data,va_list ap) {
inter_guild_tostr(line,(struct guild *)data);
fp=va_arg(ap,FILE *);
- fprintf(fp,"%s" RETCODE,line);
+ fprintf(fp,"%s\n",line);
return 0;
}
@@ -482,7 +482,7 @@ int inter_castle_save_sub(DBKey key, void *data, va_list ap) {
inter_guildcastle_tostr(line, (struct guild_castle *)data);
fp = va_arg(ap, FILE *);
- fprintf(fp, "%s" RETCODE, line);
+ fprintf(fp, "%s\n", line);
return 0;
}
@@ -1005,7 +1005,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, char *name, struct guild_mem
mapif_guild_info(fd, g);
if(log_inter)
- inter_log("guild %s (id=%d) created by master %s (id=%d)" RETCODE,
+ inter_log("guild %s (id=%d) created by master %s (id=%d)\n",
name, g->guild_id, master->name, master->account_id);
return 0;
@@ -1155,7 +1155,7 @@ int mapif_parse_BreakGuild(int fd, int guild_id) {
mapif_guild_broken(guild_id, 0);
if(log_inter)
- inter_log("guild %s (id=%d) broken" RETCODE, g->name, guild_id);
+ inter_log("guild %s (id=%d) broken\n", g->name, guild_id);
idb_remove(guild_db, guild_id);
return 0;
@@ -1448,7 +1448,7 @@ int mapif_parse_GuildCastleDataSave(int fd, int castle_id, int index, int value)
int gid = (value) ? value : gc->guild_id;
struct guild *g = idb_get(guild_db, gid);
if(log_inter)
- inter_log("guild %s (id=%d) %s castle id=%d" RETCODE,
+ inter_log("guild %s (id=%d) %s castle id=%d\n",
(g) ? g->name : "??", gid, (value) ? "occupy" : "abandon", castle_id);
}
gc->guild_id = value;
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index bccefa428..684601449 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -156,7 +156,7 @@ int inter_homun_save_sub(DBKey key,void *data,va_list ap)
FILE *fp;
inter_homun_tostr(line,(struct s_homunculus *)data);
fp=va_arg(ap,FILE *);
- fprintf(fp,"%s" RETCODE,line);
+ fprintf(fp,"%s\n",line);
return 0;
}
diff --git a/src/char/int_party.c b/src/char/int_party.c
index 6d2562668..b47a8b59c 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -227,7 +227,7 @@ int inter_party_save_sub(DBKey key, void *data, va_list ap) {
inter_party_tostr(line, &((struct party_data*)data)->party);
fp = va_arg(ap, FILE *);
- fprintf(fp, "%s" RETCODE, line);
+ fprintf(fp, "%s\n", line);
return 0;
}
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 06c962e11..b15e8e259 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -127,7 +127,7 @@ int inter_pet_save_sub(DBKey key,void *data,va_list ap)
FILE *fp;
inter_pet_tostr(line,(struct s_pet *)data);
fp=va_arg(ap,FILE *);
- fprintf(fp,"%s" RETCODE,line);
+ fprintf(fp,"%s\n",line);
return 0;
}
diff --git a/src/char/int_status.c b/src/char/int_status.c
index d03797e1d..ea255d507 100644
--- a/src/char/int_status.c
+++ b/src/char/int_status.c
@@ -130,7 +130,7 @@ static int inter_status_save_sub(DBKey key, void *data, va_list ap) {
fp = va_arg(ap, FILE *);
inter_status_tostr(line, sc_data);
- fprintf(fp, "%s" RETCODE, line);
+ fprintf(fp, "%s\n", line);
return 0;
}
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index 8c9a6faa7..3698dc78f 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -270,7 +270,7 @@ int inter_storage_save_sub(DBKey key,void *data,va_list ap)
storage_tostr(line,(struct storage *)data);
fp=va_arg(ap,FILE *);
if(*line)
- fprintf(fp,"%s" RETCODE,line);
+ fprintf(fp,"%s\n",line);
return 0;
}
//---------------------------------------------------------
@@ -297,7 +297,7 @@ int inter_guild_storage_save_sub(DBKey key,void *data,va_list ap)
guild_storage_tostr(line,(struct guild_storage *)data);
fp=va_arg(ap,FILE *);
if(*line)
- fprintf(fp,"%s" RETCODE,line);
+ fprintf(fp,"%s\n",line);
}
return 0;
}
diff --git a/src/char/inter.c b/src/char/inter.c
index 69ca9e850..cadb05f92 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -144,7 +144,7 @@ int inter_accreg_save_sub(DBKey key, void *data, va_list ap) {
if (reg->reg_num > 0) {
inter_accreg_tostr(line,reg);
fp = va_arg(ap, FILE *);
- fprintf(fp, "%s" RETCODE, line);
+ fprintf(fp, "%s\n", line);
}
return 0;
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 8ec26f6a5..458f784e8 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -1290,7 +1290,7 @@ int make_new_char_sql(int fd, unsigned char *dat)
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
}
}
- //printf("make new char %d-%d %s %d, %d, %d, %d, %d, %d - %d, %d" RETCODE,
+ //printf("make new char %d-%d %s %d, %d, %d, %d, %d, %d - %d, %d\n",
// fd, dat[30], dat, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[33], dat[31]);
//Check Name (already in use?)
@@ -3187,7 +3187,7 @@ int parse_char(int fd)
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
}
}
- ShowInfo("Selected char: (Account %d: %d - %s)" RETCODE, sd->account_id, RFIFOB(fd, 2), char_dat.name);
+ ShowInfo("Selected char: (Account %d: %d - %s)\n", sd->account_id, RFIFOB(fd, 2), char_dat.name);
// searching map server
i = search_mapserver(char_dat.last_point.map, -1, -1);
@@ -3513,7 +3513,7 @@ int parse_console(char* buf)
sscanf(buf, "%[^\n]", command);
- //login_log("Console command :%s" RETCODE, command);
+ //login_log("Console command :%s\n", command);
if( strcmpi("shutdown", command) == 0 ||
strcmpi("exit", command) == 0 ||
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 93de44571..b72c85ab2 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -1354,7 +1354,7 @@ int mapif_parse_CreateGuild(int fd,int account_id,char *name,struct guild_member
mapif_guild_info(fd,g);
if(log_inter)
- inter_log("guild %s (id=%d) created by master %s (id=%d)" RETCODE,
+ inter_log("guild %s (id=%d) created by master %s (id=%d)\n",
name, g->guild_id, master->name, master->account_id );
return 0;
@@ -1600,7 +1600,7 @@ int mapif_parse_BreakGuild(int fd,int guild_id)
mapif_guild_broken(guild_id,0);
if(log_inter)
- inter_log("guild %s (id=%d) broken" RETCODE,g->name,guild_id);
+ inter_log("guild %s (id=%d) broken\n",g->name,guild_id);
//Remove the guild from memory. [Skotlex]
idb_remove(guild_db_, guild_id);
@@ -1962,7 +1962,7 @@ int mapif_parse_GuildCastleDataSave(int fd,int castle_id,int index,int value)
int gid=(value)?value:gc.guild_id;
struct guild *g=idb_get(guild_db_, gid);
if(log_inter)
- inter_log("guild %s (id=%d) %s castle id=%d" RETCODE,
+ inter_log("guild %s (id=%d) %s castle id=%d\n",
(g)?g->name:"??" ,gid, (value)?"occupy":"abandon", castle_id);
}
gc.guild_id = value;
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index bfced3441..d31d515a8 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -259,21 +259,6 @@ typedef char bool;
#endif
//////////////////////////////////////////////////////////////////////////
-// EOL separator
-
-#if defined(WIN32) || defined(CYGWIN)
-#define RETCODE "\r\n" // CR/LF : Windows systems
-/*FIXME: Mac OSX also uses \n, only pre-OSX uses \r
-#elif defined(__APPLE__)
-#define RETCODE "\r" // CR : Macintosh systems
-*/
-#else
-#define RETCODE "\n" // LF : Unix systems
-#endif
-
-#define RET RETCODE
-
-//////////////////////////////////////////////////////////////////////////
// Assert
#if ! defined(Assert)
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("<exemple> 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("<example> 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("<exemple> 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("<example> 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(" <exemple> 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(" <example>: 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(" <exemple> 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(" <example> 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 <nom du compte>\n");
ShowMessage(" unban/unbanish <nom du compte>\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("<example>: banset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
@@ -1587,7 +1587,7 @@ int banaccount(char* param)
ShowMessage(" ban/banish yyyy/mm/dd hh:mm:ss <account name>\n");
ShowMessage(" unban/unbanish <account name>\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 <nom du compte>\n");
ShowMessage(" unban/unbanish <nom du compte>\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("<example>: banset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
@@ -1624,7 +1624,7 @@ int bansetaccount(char* param)
ShowMessage(" ban/banish yyyy/mm/dd hh:mm:ss <account name>\n");
ShowMessage(" unban/unbanish <account name>\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 <nom du compte>\n");
ShowMessage(" unban/unbanish <nom du compte>\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("<example>: banset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
@@ -1664,7 +1664,7 @@ int unbanaccount(char* param)
ShowMessage(" ban/banish yyyy/mm/dd hh:mm:ss <account name>\n");
ShowMessage(" unban/unbanish <account name>\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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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("<exemple> 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("<example> 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 <nom compte>\n");
ShowMessage(" unblock <nom compte>\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("<examples> state testname 5\n");
ShowMessage(" state testname 7 end of your ban\n");
ShowMessage(" block <account name>\n");
ShowMessage(" unblock <account name>\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 <nom compte>\n");
ShowMessage(" unblock <nom compte>\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("<examples> state testname 5\n");
ShowMessage(" state testname 7 end of your ban\n");
ShowMessage(" block <account name>\n");
ShowMessage(" unblock <account name>\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 <nom compte>\n");
ShowMessage(" unblock <nom compte>\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("<examples> state testname 5\n");
ShowMessage(" state testname 7 end of your ban\n");
ShowMessage(" block <account name>\n");
ShowMessage(" unblock <account name>\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 <nom compte>\n");
ShowMessage(" unblock <nom compte>\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("<examples> state testname 5\n");
ShowMessage(" state testname 7 end of your ban\n");
ShowMessage(" block <account name>\n");
ShowMessage(" unblock <account name>\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(" <exemple> 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(" <example>: 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(" <exemple> 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(" <example> 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("<exemple>: timeset <nom_du_compte> aaaa/mm/jj [hh:mm:ss]\n");
ShowMessage(" timeset <nom_du_compte> 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("<example>: timeset <account_name> yyyy/mm/dd [hh:mm:ss]\n");
ShowMessage(" timeset <account_name> 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("<exemple> 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("<example> 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(&timestamp));
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(&timestamp));
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(&timestamp));
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(&timestamp));
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");
}
diff --git a/src/login/login.c b/src/login/login.c
index eb4a559ba..970bf3aab 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -178,7 +178,7 @@ int login_log(char *fmt, ...)
if (log_fp) {
if (fmt[0] == '\0') // jump a line if no message
- fprintf(log_fp, RETCODE);
+ fprintf(log_fp, "\n");
else {
va_start(ap, fmt);
time(&raw_time);
@@ -303,7 +303,7 @@ void addGM(uint32 account_id, int level)
GM_num++;
if (GM_num >= 4000) {
ShowWarning("4000 GM accounts found. Next GM accounts are not read.\n");
- login_log("***WARNING: 4000 GM accounts found. Next GM accounts are not read." RETCODE);
+ login_log("***WARNING: 4000 GM accounts found. Next GM accounts are not read.\n");
}
}
}
@@ -333,8 +333,8 @@ int read_gm_account(void)
if ((fp = fopen(GM_account_filename, "r")) == NULL) {
ShowError("read_gm_account: GM accounts file [%s] not found.\n", GM_account_filename);
ShowError(" Actually, there is no GM accounts on the server.\n");
- login_log("read_gm_account: GM accounts file [%s] not found." RETCODE, GM_account_filename);
- login_log(" Actually, there is no GM accounts on the server." RETCODE);
+ login_log("read_gm_account: GM accounts file [%s] not found.\n", GM_account_filename);
+ login_log(" Actually, there is no GM accounts on the server.\n");
return 1;
}
@@ -372,7 +372,7 @@ int read_gm_account(void)
fclose(fp);
ShowStatus("read_gm_account: file '%s' read (%d GM accounts found).\n", GM_account_filename, GM_num);
- login_log("read_gm_account: file '%s' read (%d GM accounts found)." RETCODE, GM_account_filename, GM_num);
+ login_log("read_gm_account: file '%s' read (%d GM accounts found).\n", GM_account_filename, GM_num);
return 0;
}
@@ -603,8 +603,8 @@ int mmo_auth_init(void)
if (account_id > END_ACCOUNT_NUM) {
ShowError(CL_RED"mmmo_auth_init: an account has an id higher than %d\n", END_ACCOUNT_NUM);
ShowError(" account id #%d -> account not read (saved in log file)."CL_RESET"\n", account_id);
- login_log("mmmo_auth_init: ******Error: an account has an id higher than %d." RETCODE, END_ACCOUNT_NUM);
- login_log(" account id #%d -> account not read (saved in next line):" RETCODE, account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an id higher than %d.\n", END_ACCOUNT_NUM);
+ login_log(" account id #%d -> account not read (saved in next line):\n", account_id);
login_log("%s", line);
continue;
}
@@ -614,15 +614,15 @@ int mmo_auth_init(void)
if (auth_dat[j].account_id == account_id) {
ShowError(CL_RED"mmmo_auth_init: an account has an identical id to another.\n");
ShowError(" account id #%d -> new account not read (saved in log file)."CL_RED"\n", account_id);
- login_log("mmmo_auth_init: ******Error: an account has an identical id to another." RETCODE);
- login_log(" account id #%d -> new account not read (saved in next line):" RETCODE, account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an identical id to another.\n");
+ login_log(" account id #%d -> new account not read (saved in next line):\n", account_id);
login_log("%s", line);
break;
} else if (strcmp(auth_dat[j].userid, userid) == 0) {
ShowError(CL_RED"mmmo_auth_init: account name already exists.\n");
ShowError(" account name '%s' -> new account not read (saved in log file)."CL_RESET"\n", userid); // 2 lines, account name can be long.
- login_log("mmmo_auth_init: ******Error: an account has an identical name to another." RETCODE);
- login_log(" account name '%s' -> new account not read (saved in next line):" RETCODE, userid);
+ login_log("mmmo_auth_init: ******Error: an account has an identical name to another.\n");
+ login_log(" account name '%s' -> new account not read (saved in next line):\n", userid);
login_log("%s", line);
break;
}
@@ -725,8 +725,8 @@ int mmo_auth_init(void)
if (account_id > END_ACCOUNT_NUM) {
ShowError(CL_RED"mmmo_auth_init: an account has an id higher than %d\n", END_ACCOUNT_NUM);
ShowError(" account id #%d -> account not read (saved in log file)."CL_RESET"\n", account_id);
- login_log("mmmo_auth_init: ******Error: an account has an id higher than %d." RETCODE, END_ACCOUNT_NUM);
- login_log(" account id #%d -> account not read (saved in next line):" RETCODE, account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an id higher than %d.\n", END_ACCOUNT_NUM);
+ login_log(" account id #%d -> account not read (saved in next line):\n", account_id);
login_log("%s", line);
continue;
}
@@ -736,15 +736,15 @@ int mmo_auth_init(void)
if (auth_dat[j].account_id == account_id) {
ShowError(CL_RED"mmo_auth_init: an account has an identical id to another.\n");
ShowError(" account id #%d -> new account not read (saved in log file)."CL_RESET"\n", account_id);
- login_log("mmmo_auth_init: ******Error: an account has an identical id to another." RETCODE);
- login_log(" account id #%d -> new account not read (saved in next line):" RETCODE, account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an identical id to another.\n");
+ login_log(" account id #%d -> new account not read (saved in next line):\n", account_id);
login_log("%s", line);
break;
} else if (strcmp(auth_dat[j].userid, userid) == 0) {
ShowError(CL_RED"mmo_auth_init: account name already exists.\n");
ShowError(" account name '%s' -> new account not read (saved in log file)."CL_RESET"\n", userid);
- login_log("mmmo_auth_init: ******Error: an account has an identical id to another." RETCODE);
- login_log(" account id #%d -> new account not read (saved in next line):" RETCODE, account_id);
+ login_log("mmmo_auth_init: ******Error: an account has an identical id to another.\n");
+ login_log(" account id #%d -> new account not read (saved in next line):\n", account_id);
login_log("%s", line);
break;
}
@@ -865,7 +865,7 @@ int mmo_auth_init(void)
sprintf(line, "%s %d server accounts ('S').", str, server_count);
}
}
- login_log("%s" RETCODE, line);
+ login_log("%s\n", line);
return 0;
}
@@ -922,7 +922,7 @@ void mmo_auth_sync(void)
continue;
mmo_auth_tostr(line, &auth_dat[k]);
- fprintf(fp, "%s" RETCODE, line);
+ fprintf(fp, "%s\n", line);
}
fprintf(fp, "%u\t%%newid%%\n", account_id_count);
@@ -1212,7 +1212,7 @@ int mmo_auth(struct mmo_account* account, int fd)
if (i != auth_num) {
if (newaccount) {
- login_log("Attempt of creation of an already existant account (account: %s_%c, pass: %s, received pass: %s, ip: %s)" RETCODE,
+ login_log("Attempt of creation of an already existant account (account: %s_%c, pass: %s, received pass: %s, ip: %s)\n",
account->userid, account->userid[len+1], auth_dat[i].pass, account->passwd, ip);
return 1; // 1 = Incorrect Password
}
@@ -1224,13 +1224,13 @@ int mmo_auth(struct mmo_account* account, int fd)
if (!check_password(session[fd]->session_data, account->passwdenc, user_password, auth_dat[i].pass))
{
- login_log("Invalid password (account: %s, pass: %s, received pass: %s, ip: %s)" RETCODE,
+ login_log("Invalid password (account: %s, pass: %s, received pass: %s, ip: %s)\n",
account->userid, auth_dat[i].pass, (account->passwdenc) ? "[MD5]" : account->passwd, ip);
return 1; // 1 = Incorrect Password
}
if (auth_dat[i].state) {
- login_log("Connection refused (account: %s, pass: %s, state: %d, ip: %s)" RETCODE,
+ login_log("Connection refused (account: %s, pass: %s, state: %d, ip: %s)\n",
account->userid, account->passwd, auth_dat[i].state, ip);
switch(auth_dat[i].state) { // packet 0x006a value + 1
case 1: // 0 = Unregistered ID
@@ -1280,32 +1280,32 @@ int mmo_auth(struct mmo_account* account, int fd)
strftime(tmpstr, 20, date_format, localtime(&auth_dat[i].ban_until_time));
tmpstr[19] = '\0';
if (auth_dat[i].ban_until_time > time(NULL)) { // always banned
- login_log("Connection refused (account: %s, pass: %s, banned until %s, ip: %s)" RETCODE,
+ login_log("Connection refused (account: %s, pass: %s, banned until %s, ip: %s)\n",
account->userid, account->passwd, tmpstr, ip);
return 6; // 6 = Your are Prohibited to log in until %s
} else { // ban is finished
- login_log("End of ban (account: %s, pass: %s, previously banned until %s -> not more banned, ip: %s)" RETCODE,
+ login_log("End of ban (account: %s, pass: %s, previously banned until %s -> not more banned, ip: %s)\n",
account->userid, account->passwd, tmpstr, ip);
auth_dat[i].ban_until_time = 0; // reset the ban time
}
}
if (auth_dat[i].connect_until_time != 0 && auth_dat[i].connect_until_time < time(NULL)) {
- login_log("Connection refused (account: %s, pass: %s, expired ID, ip: %s)" RETCODE,
+ login_log("Connection refused (account: %s, pass: %s, expired ID, ip: %s)\n",
account->userid, account->passwd, ip);
return 2; // 2 = This ID is expired
}
- login_log("Authentification accepted (account: %s (id: %d), ip: %s)" RETCODE, account->userid, auth_dat[i].account_id, ip);
+ login_log("Authentification accepted (account: %s (id: %d), ip: %s)\n", account->userid, auth_dat[i].account_id, ip);
} else {
if (!newaccount) {
- login_log("Unknown account (account: %s, received pass: %s, ip: %s)" RETCODE,
+ login_log("Unknown account (account: %s, received pass: %s, ip: %s)\n",
account->userid, account->passwd, ip);
return 0; // 0 = Unregistered ID
} else {
int new_id = mmo_auth_new(account, account->userid[len+1], "a@a.com");
unsigned int tick = gettick();
- login_log("Account creation and authentification accepted (account %s (id: %d), pass: %s, sex: %c, connection with _F/_M, ip: %s)" RETCODE,
+ login_log("Account creation and authentification accepted (account %s (id: %d), pass: %s, sex: %c, connection with _F/_M, ip: %s)\n",
account->userid, new_id, account->passwd, account->userid[len+1], ip);
auth_before_save_file = 0; // Creation of an account -> save accounts file immediatly
@@ -1383,7 +1383,7 @@ int parse_fromchar(int fd)
if(session[fd]->eof) {
ShowStatus("Char-server '%s' has disconnected.\n", server[id].name);
- login_log("Char-server '%s' has disconnected (ip: %s)." RETCODE, server[id].name, ip);
+ login_log("Char-server '%s' has disconnected (ip: %s).\n", server[id].name, ip);
server_fd[id] = -1;
memset(&server[id], 0, sizeof(struct mmo_char_server));
online_db->foreach(online_db,online_db_setoffline,id); //Set all chars from this char server to offline.
@@ -1402,7 +1402,7 @@ int parse_fromchar(int fd)
{
case 0x2709: // request from map-server via char-server to reload GM accounts
- login_log("Char-server '%s': Request to re-load GM configuration file (ip: %s)." RETCODE, server[id].name, ip);
+ login_log("Char-server '%s': Request to re-load GM configuration file (ip: %s).\n", server[id].name, ip);
read_gm_account();
// send GM accounts to all char-servers
send_GM_accounts(-1);
@@ -1427,7 +1427,7 @@ int parse_fromchar(int fd)
time_t connect_until_time = 0;
char email[40] = "";
auth_fifo[i].delflag = 1;
- login_log("Char-server '%s': authentification of the account %d accepted (ip: %s)." RETCODE,
+ login_log("Char-server '%s': authentification of the account %d accepted (ip: %s).\n",
server[id].name, account_id, ip);
for(k = 0; k < auth_num; k++) {
if (auth_dat[k].account_id == account_id) {
@@ -1448,7 +1448,7 @@ int parse_fromchar(int fd)
}
// authentification not found
if (i == AUTH_FIFO_SIZE) {
- login_log("Char-server '%s': authentification of the account %d REFUSED (ip: %s)." RETCODE,
+ login_log("Char-server '%s': authentification of the account %d REFUSED (ip: %s).\n",
server[id].name, account_id, ip);
WFIFOHEAD(fd,51);
WFIFOW(fd,0) = 0x2713;
@@ -1485,19 +1485,19 @@ int parse_fromchar(int fd)
memcpy(email, RFIFOP(fd,6), 40); email[39] = '\0';
remove_control_chars(email);
if (e_mail_check(email) == 0)
- login_log("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - e-mail is invalid (account: %d, ip: %s)" RETCODE, server[id].name, acc, ip);
+ login_log("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - e-mail is invalid (account: %d, ip: %s)\n", server[id].name, acc, ip);
else {
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == acc && (strcmp(auth_dat[i].email, "a@a.com") == 0 || auth_dat[i].email[0] == '\0')) {
memcpy(auth_dat[i].email, email, 40);
- login_log("Char-server '%s': Create an e-mail on an account with a default e-mail (account: %d, new e-mail: %s, ip: %s)." RETCODE, server[id].name, acc, email, ip);
+ login_log("Char-server '%s': Create an e-mail on an account with a default e-mail (account: %d, new e-mail: %s, ip: %s).\n", server[id].name, acc, email, ip);
// Save
mmo_auth_sync();
break;
}
}
if (i == auth_num)
- login_log("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - account doesn't exist or e-mail of account isn't default e-mail (account: %d, ip: %s)." RETCODE, server[id].name, acc, ip);
+ login_log("Char-server '%s': Attempt to create an e-mail on an account with a default e-mail REFUSED - account doesn't exist or e-mail of account isn't default e-mail (account: %d, ip: %s).\n", server[id].name, acc, ip);
}
RFIFOSKIP(fd,46);
@@ -1510,7 +1510,7 @@ int parse_fromchar(int fd)
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == RFIFOL(fd,2)) {
- login_log("Char-server '%s': e-mail of the account %d found (ip: %s)." RETCODE,
+ login_log("Char-server '%s': e-mail of the account %d found (ip: %s).\n",
server[id].name, RFIFOL(fd,2), ip);
WFIFOW(fd,0) = 0x2717;
WFIFOL(fd,2) = RFIFOL(fd,2);
@@ -1521,7 +1521,7 @@ int parse_fromchar(int fd)
}
}
if (i == auth_num)
- login_log("Char-server '%s': e-mail of the account %d NOT found (ip: %s)." RETCODE,
+ login_log("Char-server '%s': e-mail of the account %d NOT found (ip: %s).\n",
server[id].name, RFIFOL(fd,2), ip);
RFIFOSKIP(fd,6);
@@ -1549,32 +1549,32 @@ int parse_fromchar(int fd)
time_t raw_time;
time(&raw_time);
strftime(tmpstr, 23, date_format, localtime(&raw_time));
- fprintf(fp, RETCODE "// %s: @GM command on account %d" RETCODE "%d %d" RETCODE, tmpstr, acc, acc, level_new_gm);
+ fprintf(fp, "\n// %s: @GM command on account %d\n%d %d\n", tmpstr, acc, acc, level_new_gm);
fclose(fp);
WBUFL(buf,6) = level_new_gm;
read_gm_account();
send_GM_accounts(-1);
ShowNotice("GM Change of the account %d: level 0 -> %d.\n", acc, level_new_gm);
- login_log("Char-server '%s': GM Change of the account %d: level 0 -> %d (ip: %s)." RETCODE,
+ login_log("Char-server '%s': GM Change of the account %d: level 0 -> %d (ip: %s).\n",
server[id].name, acc, level_new_gm, ip);
} else {
ShowError("Error of GM change (suggested account: %d, correct password, unable to add a GM account in GM accounts file)\n", acc);
- login_log("Char-server '%s': Error of GM change (suggested account: %d, correct password, unable to add a GM account in GM accounts file, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of GM change (suggested account: %d, correct password, unable to add a GM account in GM accounts file, ip: %s).\n",
server[id].name, acc, ip);
}
} else {
ShowError("Error of GM change (suggested account: %d, correct password, but GM creation is disable (level_new_gm = 0))\n", acc);
- login_log("Char-server '%s': Error of GM change (suggested account: %d, correct password, but GM creation is disable (level_new_gm = 0), ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of GM change (suggested account: %d, correct password, but GM creation is disable (level_new_gm = 0), ip: %s).\n",
server[id].name, acc, ip);
}
} else {
ShowError("Error of GM change (suggested account: %d (already GM), correct password).\n", acc);
- login_log("Char-server '%s': Error of GM change (suggested account: %d (already GM), correct password, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of GM change (suggested account: %d (already GM), correct password, ip: %s).\n",
server[id].name, acc, ip);
}
} else {
ShowError("Error of GM change (suggested account: %d, invalid password).\n", acc);
- login_log("Char-server '%s': Error of GM change (suggested account: %d, invalid password, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of GM change (suggested account: %d, invalid password, ip: %s).\n",
server[id].name, acc, ip);
}
charif_sendallwos(-1, buf, 10);
@@ -1593,31 +1593,31 @@ int parse_fromchar(int fd)
memcpy(actual_email, RFIFOP(fd,6), 40); actual_email[39] = '\0'; remove_control_chars(actual_email);
memcpy(new_email, RFIFOP(fd,46), 40); new_email[39] = '\0'; remove_control_chars(new_email);
if (e_mail_check(actual_email) == 0)
- login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: %d, ip: %s)" RETCODE,
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: %d, ip: %s)\n",
server[id].name, acc, ip);
else if (e_mail_check(new_email) == 0)
- login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a invalid new e-mail (account: %d, ip: %s)" RETCODE,
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a invalid new e-mail (account: %d, ip: %s)\n",
server[id].name, acc, ip);
else if (strcmpi(new_email, "a@a.com") == 0)
- login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a default e-mail (account: %d, ip: %s)" RETCODE,
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a default e-mail (account: %d, ip: %s)\n",
server[id].name, acc, ip);
else {
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == acc) {
if (strcmpi(auth_dat[i].email, actual_email) == 0) {
memcpy(auth_dat[i].email, new_email, 40);
- login_log("Char-server '%s': Modify an e-mail on an account (@email GM command) (account: %d (%s), new e-mail: %s, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Modify an e-mail on an account (@email GM command) (account: %d (%s), new e-mail: %s, ip: %s).\n",
server[id].name, acc, auth_dat[i].userid, new_email, ip);
// Save
mmo_auth_sync();
} else
- login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual e-mail is incorrect (account: %d (%s), actual e-mail: %s, proposed e-mail: %s, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual e-mail is incorrect (account: %d (%s), actual e-mail: %s, proposed e-mail: %s, ip: %s).\n",
server[id].name, acc, auth_dat[i].userid, auth_dat[i].email, actual_email, ip);
break;
}
}
if (i == auth_num)
- login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but account doesn't exist (account: %d, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but account doesn't exist (account: %d, ip: %s).\n",
server[id].name, acc, ip);
}
@@ -1635,11 +1635,11 @@ int parse_fromchar(int fd)
for(i = 0; i < auth_num && auth_dat[i].account_id != acc; i++);
if (i == auth_num) {
- login_log("Char-server '%s': Error of Status change (account: %d not found, suggested status %d, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of Status change (account: %d not found, suggested status %d, ip: %s).\n",
server[id].name, acc, statut, ip);
} else {
if (auth_dat[i].state != statut) {
- login_log("Char-server '%s': Status change (account: %d, new status %d, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Status change (account: %d, new status %d, ip: %s).\n",
server[id].name, acc, statut, ip);
if (statut != 0) {
unsigned char buf[16];
@@ -1656,7 +1656,7 @@ int parse_fromchar(int fd)
// Save
mmo_auth_sync();
} else
- login_log("Char-server '%s': Error of Status change - actual status is already the good status (account: %d, status %d, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of Status change - actual status is already the good status (account: %d, status %d, ip: %s).\n",
server[id].name, acc, statut, ip);
}
@@ -1693,7 +1693,7 @@ int parse_fromchar(int fd)
unsigned char buf[16];
char tmpstr[2048];
strftime(tmpstr, 24, date_format, localtime(&timestamp));
- login_log("Char-server '%s': Ban request (account: %d, new final date of banishment: %d (%s), ip: %s)." RETCODE,
+ login_log("Char-server '%s': Ban request (account: %d, new final date of banishment: %d (%s), ip: %s).\n",
server[id].name, acc, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
WBUFW(buf,0) = 0x2731;
WBUFL(buf,2) = auth_dat[i].account_id;
@@ -1704,25 +1704,25 @@ int parse_fromchar(int fd)
if (auth_fifo[j].account_id == acc)
auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
} else {
- login_log("Char-server '%s': Error of ban request (account: %d, new date unbans the account, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of ban request (account: %d, new date unbans the account, ip: %s).\n",
server[id].name, acc, ip);
}
auth_dat[i].ban_until_time = timestamp;
// Save
mmo_auth_sync();
} else {
- login_log("Char-server '%s': Error of ban request (account: %d, no change for ban date, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of ban request (account: %d, no change for ban date, ip: %s).\n",
server[id].name, acc, ip);
}
} else {
- login_log("Char-server '%s': Error of ban request (account: %d, invalid date, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of ban request (account: %d, invalid date, ip: %s).\n",
server[id].name, acc, ip);
}
break;
}
}
if (i == auth_num)
- login_log("Char-server '%s': Error of ban request (account: %d not found, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of ban request (account: %d not found, ip: %s).\n",
server[id].name, acc, ip);
RFIFOSKIP(fd,18);
@@ -1738,7 +1738,7 @@ int parse_fromchar(int fd)
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == acc) {
if (auth_dat[i].sex == 2)
- login_log("Char-server '%s': Error of sex change - Server account (suggested account: %d, actual sex %d (Server), ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of sex change - Server account (suggested account: %d, actual sex %d (Server), ip: %s).\n",
server[id].name, acc, auth_dat[i].sex, ip);
else {
unsigned char buf[16];
@@ -1746,7 +1746,7 @@ int parse_fromchar(int fd)
sex = 1;
else
sex = 0;
- login_log("Char-server '%s': Sex change (account: %d, new sex %c, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Sex change (account: %d, new sex %c, ip: %s).\n",
server[id].name, acc, (sex == 2) ? 'S' : (sex == 1 ? 'M' : 'F'), ip);
for(j = 0; j < AUTH_FIFO_SIZE; j++)
if (auth_fifo[j].account_id == acc)
@@ -1763,7 +1763,7 @@ int parse_fromchar(int fd)
}
}
if (i == auth_num)
- login_log("Char-server '%s': Error of sex change (account: %d not found, sex would be reversed, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of sex change (account: %d not found, sex would be reversed, ip: %s).\n",
server[id].name, acc, ip);
RFIFOSKIP(fd,6);
@@ -1782,7 +1782,7 @@ int parse_fromchar(int fd)
unsigned char *buf;
int len;
buf = (unsigned char*)aCalloc(RFIFOW(fd,2)+1, sizeof(unsigned char));
- login_log("char-server '%s': receiving (from the char-server) of account_reg2 (account: %d, ip: %s)." RETCODE,
+ login_log("char-server '%s': receiving (from the char-server) of account_reg2 (account: %d, ip: %s).\n",
server[id].name, acc, ip);
for(j=0,p=13;j<ACCOUNT_REG2_NUM && p<RFIFOW(fd,2);j++){
sscanf((char*)RFIFOP(fd,p), "%31c%n",auth_dat[i].account_reg2[j].str,&len);
@@ -1808,7 +1808,7 @@ int parse_fromchar(int fd)
}
if (i == auth_num) {
// printf("parse_fromchar: receiving (from the char-server) of account_reg2 (unknwon account id: %d).\n", acc);
- login_log("Char-server '%s': receiving (from the char-server) of account_reg2 (account: %d not found, ip: %s)." RETCODE,
+ login_log("Char-server '%s': receiving (from the char-server) of account_reg2 (account: %d not found, ip: %s).\n",
server[id].name, acc, ip);
}
}
@@ -1825,17 +1825,17 @@ int parse_fromchar(int fd)
if (auth_dat[i].account_id == acc) {
if (auth_dat[i].ban_until_time != 0) {
auth_dat[i].ban_until_time = 0;
- login_log("Char-server '%s': UnBan request (account: %d, ip: %s)." RETCODE,
+ login_log("Char-server '%s': UnBan request (account: %d, ip: %s).\n",
server[id].name, acc, ip);
} else {
- login_log("Char-server '%s': Error of UnBan request (account: %d, no change for unban date, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of UnBan request (account: %d, no change for unban date, ip: %s).\n",
server[id].name, acc, ip);
}
break;
}
}
if (i == auth_num)
- login_log("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s)." RETCODE,
+ login_log("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s).\n",
server[id].name, acc, ip);
RFIFOSKIP(fd,6);
@@ -1933,10 +1933,10 @@ int parse_fromchar(int fd)
if (logfp) {
time(&raw_time);
strftime(tmpstr, 23, date_format, localtime(&raw_time));
- fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr);
- fprintf(logfp, "parse_fromchar: connection #%d (ip: %s), packet: 0x%x (with being read: %lu)." RETCODE, fd, ip, command, (unsigned long)RFIFOREST(fd));
- fprintf(logfp, "Detail (in hex):" RETCODE);
- fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE);
+ fprintf(logfp, "%s: receiving of an unknown packet -> disconnection\n", tmpstr);
+ fprintf(logfp, "parse_fromchar: connection #%d (ip: %s), packet: 0x%x (with being read: %lu).\n", fd, ip, command, (unsigned long)RFIFOREST(fd));
+ fprintf(logfp, "Detail (in hex):\n");
+ fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F\n");
memset(tmpstr, '\0', sizeof(tmpstr));
for(i = 0; i < RFIFOREST(fd); i++) {
if ((i & 15) == 0)
@@ -1949,7 +1949,7 @@ int parse_fromchar(int fd)
if ((i - 7) % 16 == 0) // -8 + 1
fprintf(logfp, " ");
else if ((i + 1) % 16 == 0) {
- fprintf(logfp, " %s" RETCODE, tmpstr);
+ fprintf(logfp, " %s\n", tmpstr);
memset(tmpstr, '\0', sizeof(tmpstr));
}
}
@@ -1959,9 +1959,9 @@ int parse_fromchar(int fd)
if ((j - 7) % 16 == 0) // -8 + 1
fprintf(logfp, " ");
}
- fprintf(logfp, " %s" RETCODE, tmpstr);
+ fprintf(logfp, " %s\n", tmpstr);
}
- fprintf(logfp, RETCODE);
+ fprintf(logfp, "\n");
fclose(logfp);
}
@@ -2005,7 +2005,7 @@ int parse_admin(int fd)
{
case 0x7530: // Request of the server version
- login_log("'ladmin': Sending of the server version (ip: %s)" RETCODE, ip);
+ login_log("'ladmin': Sending of the server version (ip: %s)\n", ip);
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x7531;
WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
@@ -2020,7 +2020,7 @@ int parse_admin(int fd)
break;
case 0x7532: // Request of end of connection
- login_log("'ladmin': End of connection (ip: %s)" RETCODE, ip);
+ login_log("'ladmin': End of connection (ip: %s)\n", ip);
RFIFOSKIP(fd,2);
set_eof(fd);
break;
@@ -2040,7 +2040,7 @@ int parse_admin(int fd)
st = 0;
if (ed > END_ACCOUNT_NUM || ed < st || ed <= 0)
ed = END_ACCOUNT_NUM;
- login_log("'ladmin': Sending an accounts list (ask: from %d to %d, ip: %s)" RETCODE, st, ed, ip);
+ login_log("'ladmin': Sending an accounts list (ask: from %d to %d, ip: %s)\n", st, ed, ip);
// Sort before send
for(i = 0; i < auth_num; i++) {
unsigned int k;
@@ -2095,20 +2095,20 @@ int parse_admin(int fd)
WFIFOL(fd,2) = 0xffffffff;
memcpy(WFIFOP(fd,6), RFIFOP(fd,2), 24);
if (strlen(ma.userid) < 4 || strlen(ma.passwd) < 4) {
- login_log("'ladmin': Attempt to create an invalid account (account or pass is too short, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to create an invalid account (account or pass is too short, ip: %s)\n",
ip);
} else if (ma.sex != 'F' && ma.sex != 'M') {
- login_log("'ladmin': Attempt to create an invalid account (account: %s, received pass: %s, invalid sex, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to create an invalid account (account: %s, received pass: %s, invalid sex, ip: %s)\n",
ma.userid, ma.passwd, ip);
} else if (account_id_count > END_ACCOUNT_NUM) {
- login_log("'ladmin': Attempt to create an account, but there is no more available id number (account: %s, pass: %s, sex: %c, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to create an account, but there is no more available id number (account: %s, pass: %s, sex: %c, ip: %s)\n",
ma.userid, ma.passwd, ma.sex, ip);
} else {
remove_control_chars(ma.userid);
remove_control_chars(ma.passwd);
for(i = 0; i < auth_num; i++) {
if (strncmp(auth_dat[i].userid, ma.userid, 24) == 0) {
- login_log("'ladmin': Attempt to create an already existing account (account: %s, pass: %s, received pass: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to create an already existing account (account: %s, pass: %s, received pass: %s, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].pass, ma.passwd, ip);
break;
}
@@ -2120,7 +2120,7 @@ int parse_admin(int fd)
email[39] = '\0';
remove_control_chars(email);
new_id = mmo_auth_new(&ma, ma.sex, email);
- login_log("'ladmin': Account creation (account: %s (id: %d), pass: %s, sex: %c, email: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Account creation (account: %s (id: %d), pass: %s, sex: %c, email: %s, ip: %s)\n",
ma.userid, new_id, ma.passwd, ma.sex, auth_dat[i].email, ip);
WFIFOL(fd,2) = new_id;
mmo_auth_sync();
@@ -2150,17 +2150,17 @@ int parse_admin(int fd)
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
WFIFOL(fd,2) = auth_dat[i].account_id;
// save deleted account in log file
- login_log("'ladmin': Account deletion (account: %s, id: %d, ip: %s) - saved in next line:" RETCODE,
+ login_log("'ladmin': Account deletion (account: %s, id: %d, ip: %s) - saved in next line:\n",
auth_dat[i].userid, auth_dat[i].account_id, ip);
mmo_auth_tostr((char*)buf, &auth_dat[i]);
- login_log("%s" RETCODE, buf);
+ login_log("%s\n", buf);
// delete account
memset(auth_dat[i].userid, '\0', sizeof(auth_dat[i].userid));
auth_dat[i].account_id = (uint32)-1;
mmo_auth_sync();
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to delete an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to delete an unknown account (account: %s, ip: %s)\n",
account_name, ip);
}
WFIFOSET(fd,30);
@@ -2182,12 +2182,12 @@ int parse_admin(int fd)
auth_dat[i].pass[23] = '\0';
remove_control_chars(auth_dat[i].pass);
WFIFOL(fd,2) = auth_dat[i].account_id;
- login_log("'ladmin': Modification of a password (account: %s, new password: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a password (account: %s, new password: %s, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].pass, ip);
mmo_auth_sync();
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to modify the password of an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify the password of an unknown account (account: %s, ip: %s)\n",
account_name, ip);
}
WFIFOSET(fd,30);
@@ -2217,14 +2217,14 @@ int parse_admin(int fd)
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
WFIFOL(fd,2) = auth_dat[i].account_id;
if (auth_dat[i].state == statut && strcmp(auth_dat[i].error_message, error_message) == 0)
- login_log("'ladmin': Modification of a state, but the state of the account is already the good state (account: %s, received state: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a state, but the state of the account is already the good state (account: %s, received state: %d, ip: %s)\n",
account_name, statut, ip);
else {
if (statut == 7)
- login_log("'ladmin': Modification of a state (account: %s, new state: %d - prohibited to login until '%s', ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a state (account: %s, new state: %d - prohibited to login until '%s', ip: %s)\n",
auth_dat[i].userid, statut, error_message, ip);
else
- login_log("'ladmin': Modification of a state (account: %s, new state: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a state (account: %s, new state: %d, ip: %s)\n",
auth_dat[i].userid, statut, ip);
if (auth_dat[i].state == 0) {
unsigned char buf[16];
@@ -2243,7 +2243,7 @@ int parse_admin(int fd)
}
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to modify the state of an unknown account (account: %s, received state: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify the state of an unknown account (account: %s, received state: %d, ip: %s)\n",
account_name, statut, ip);
}
WFIFOL(fd,30) = statut;
@@ -2255,7 +2255,7 @@ int parse_admin(int fd)
case 0x7938: // Request for servers list and # of online players
{
uint8 server_num = 0;
- login_log("'ladmin': Sending of servers list (ip: %s)" RETCODE, ip);
+ login_log("'ladmin': Sending of servers list (ip: %s)\n", ip);
for(i = 0; i < MAX_SERVERS; i++) {
if (server_fd[i] >= 0) {
WFIFOL(fd,4+server_num*32) = htonl(server[i].ip);
@@ -2291,15 +2291,15 @@ int parse_admin(int fd)
remove_control_chars(pass);
if (strcmp(auth_dat[i].pass, pass) == 0) {
WFIFOL(fd,2) = auth_dat[i].account_id;
- login_log("'ladmin': Check of password OK (account: %s, password: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Check of password OK (account: %s, password: %s, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].pass, ip);
} else {
- login_log("'ladmin': Failure of password check (account: %s, proposed pass: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Failure of password check (account: %s, proposed pass: %s, ip: %s)\n",
auth_dat[i].userid, pass, ip);
}
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to check the password of an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to check the password of an unknown account (account: %s, ip: %s)\n",
account_name, ip);
}
WFIFOSET(fd,30);
@@ -2320,10 +2320,10 @@ int parse_admin(int fd)
sex = RFIFOB(fd,26);
if (sex != 'F' && sex != 'M') {
if (sex > 31)
- login_log("'ladmin': Attempt to give an invalid sex (account: %s, received sex: %c, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to give an invalid sex (account: %s, received sex: %c, ip: %s)\n",
account_name, sex, ip);
else
- login_log("'ladmin': Attempt to give an invalid sex (account: %s, received sex: 'control char', ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to give an invalid sex (account: %s, received sex: 'control char', ip: %s)\n",
account_name, ip);
} else {
i = search_account_index(account_name);
@@ -2336,7 +2336,7 @@ int parse_admin(int fd)
if (auth_fifo[j].account_id == auth_dat[i].account_id)
auth_fifo[j].login_id1++; // to avoid reconnection error when come back from map-server (char-server will ask again the authentification)
auth_dat[i].sex = (sex == 'S' || sex == 's') ? 2 : (sex == 'M' || sex == 'm');
- login_log("'ladmin': Modification of a sex (account: %s, new sex: %c, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a sex (account: %s, new sex: %c, ip: %s)\n",
auth_dat[i].userid, sex, ip);
mmo_auth_sync();
// send to all char-server the change
@@ -2345,11 +2345,11 @@ int parse_admin(int fd)
WBUFB(buf,6) = auth_dat[i].sex;
charif_sendallwos(-1, buf, 7);
} else {
- login_log("'ladmin': Modification of a sex, but the sex is already the good sex (account: %s, sex: %c, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a sex, but the sex is already the good sex (account: %s, sex: %c, ip: %s)\n",
auth_dat[i].userid, sex, ip);
}
} else {
- login_log("'ladmin': Attempt to modify the sex of an unknown account (account: %s, received sex: %c, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify the sex of an unknown account (account: %s, received sex: %c, ip: %s)\n",
account_name, sex, ip);
}
}
@@ -2371,7 +2371,7 @@ int parse_admin(int fd)
char new_gm_level;
new_gm_level = RFIFOB(fd,26);
if (new_gm_level < 0 || new_gm_level > 99) {
- login_log("'ladmin': Attempt to give an invalid GM level (account: %s, received GM level: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to give an invalid GM level (account: %s, received GM level: %d, ip: %s)\n",
account_name, (int)new_gm_level, ip);
} else {
i = search_account_index(account_name);
@@ -2398,49 +2398,49 @@ int parse_admin(int fd)
while(line[0] != '\0' && (line[strlen(line)-1] == '\n' || line[strlen(line)-1] == '\r'))
line[strlen(line)-1] = '\0'; // TODO: remove this
if ((line[0] == '/' && line[1] == '/') || line[0] == '\0')
- fprintf(fp2, "%s" RETCODE, line);
+ fprintf(fp2, "%s\n", line);
else {
if (sscanf(line, "%d %d", &GM_account, &GM_level) != 2 && sscanf(line, "%d: %d", &GM_account, &GM_level) != 2)
- fprintf(fp2, "%s" RETCODE, line);
+ fprintf(fp2, "%s\n", line);
else if (GM_account != acc)
- fprintf(fp2, "%s" RETCODE, line);
+ fprintf(fp2, "%s\n", line);
else if (new_gm_level < 1) {
- fprintf(fp2, "// %s: 'ladmin' GM level removed on account %d '%s' (previous level: %d)" RETCODE "//%d %d" RETCODE, tmpstr, acc, auth_dat[i].userid, GM_level, acc, new_gm_level);
+ fprintf(fp2, "// %s: 'ladmin' GM level removed on account %d '%s' (previous level: %d)\n//%d %d\n", tmpstr, acc, auth_dat[i].userid, GM_level, acc, new_gm_level);
modify_flag = 1;
} else {
- fprintf(fp2, "// %s: 'ladmin' GM level on account %d '%s' (previous level: %d)" RETCODE "%d %d" RETCODE, tmpstr, acc, auth_dat[i].userid, GM_level, acc, new_gm_level);
+ fprintf(fp2, "// %s: 'ladmin' GM level on account %d '%s' (previous level: %d)\n%d %d\n", tmpstr, acc, auth_dat[i].userid, GM_level, acc, new_gm_level);
modify_flag = 1;
}
}
}
if (modify_flag == 0)
- fprintf(fp2, "// %s: 'ladmin' GM level on account %d '%s' (previous level: 0)" RETCODE "%d %d" RETCODE, tmpstr, acc, auth_dat[i].userid, acc, new_gm_level);
+ fprintf(fp2, "// %s: 'ladmin' GM level on account %d '%s' (previous level: 0)\n%d %d\n", tmpstr, acc, auth_dat[i].userid, acc, new_gm_level);
fclose(fp);
} else {
- login_log("'ladmin': Attempt to modify of a GM level - impossible to read GM accounts file (account: %s (%d), received GM level: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify of a GM level - impossible to read GM accounts file (account: %s (%d), received GM level: %d, ip: %s)\n",
auth_dat[i].userid, acc, (int)new_gm_level, ip);
}
if (lock_fclose(fp2, GM_account_filename, &lock) == 0) {
WFIFOL(fd,2) = acc;
- login_log("'ladmin': Modification of a GM level (account: %s (%d), new GM level: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a GM level (account: %s (%d), new GM level: %d, ip: %s)\n",
auth_dat[i].userid, acc, (int)new_gm_level, ip);
// read and send new GM informations
read_gm_account();
send_GM_accounts(-1);
} else {
- login_log("'ladmin': Attempt to modify of a GM level - impossible to write GM accounts file (account: %s (%d), received GM level: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify of a GM level - impossible to write GM accounts file (account: %s (%d), received GM level: %d, ip: %s)\n",
auth_dat[i].userid, acc, (int)new_gm_level, ip);
}
} else {
- login_log("'ladmin': Attempt to modify of a GM level - impossible to write GM accounts file (account: %s (%d), received GM level: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify of a GM level - impossible to write GM accounts file (account: %s (%d), received GM level: %d, ip: %s)\n",
auth_dat[i].userid, acc, (int)new_gm_level, ip);
}
} else {
- login_log("'ladmin': Attempt to modify of a GM level, but the GM level is already the good GM level (account: %s (%d), GM level: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify of a GM level, but the GM level is already the good GM level (account: %s (%d), GM level: %d, ip: %s)\n",
auth_dat[i].userid, acc, (int)new_gm_level, ip);
}
} else {
- login_log("'ladmin': Attempt to modify the GM level of an unknown account (account: %s, received GM level: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify the GM level of an unknown account (account: %s, received GM level: %d, ip: %s)\n",
account_name, (int)new_gm_level, ip);
}
}
@@ -2462,7 +2462,7 @@ int parse_admin(int fd)
char email[40];
memcpy(email, RFIFOP(fd,26), 40);
if (e_mail_check(email) == 0) {
- login_log("'ladmin': Attempt to give an invalid e-mail (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to give an invalid e-mail (account: %s, ip: %s)\n",
account_name, ip);
} else {
remove_control_chars(email);
@@ -2471,11 +2471,11 @@ int parse_admin(int fd)
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
memcpy(auth_dat[i].email, email, 40);
WFIFOL(fd,2) = auth_dat[i].account_id;
- login_log("'ladmin': Modification of an email (account: %s, new e-mail: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of an email (account: %s, new e-mail: %s, ip: %s)\n",
auth_dat[i].userid, email, ip);
mmo_auth_sync();
} else {
- login_log("'ladmin': Attempt to modify the e-mail of an unknown account (account: %s, received e-mail: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify the e-mail of an unknown account (account: %s, received e-mail: %s, ip: %s)\n",
account_name, email, ip);
}
}
@@ -2507,12 +2507,12 @@ int parse_admin(int fd)
auth_dat[i].memo[size_of_memo - 1] = '\0';
remove_control_chars(auth_dat[i].memo);
WFIFOL(fd,2) = auth_dat[i].account_id;
- login_log("'ladmin': Modification of a memo field (account: %s, new memo: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Modification of a memo field (account: %s, new memo: %s, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].memo, ip);
mmo_auth_sync();
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to modify the memo field of an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to modify the memo field of an unknown account (account: %s, ip: %s)\n",
account_name, ip);
}
WFIFOSET(fd,30);
@@ -2531,11 +2531,11 @@ int parse_admin(int fd)
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
WFIFOL(fd,2) = auth_dat[i].account_id;
- login_log("'ladmin': Request (by the name) of an account id (account: %s, id: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Request (by the name) of an account id (account: %s, id: %d, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].account_id, ip);
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': ID request (by the name) of an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': ID request (by the name) of an unknown account (account: %s, ip: %s)\n",
account_name, ip);
}
WFIFOSET(fd,30);
@@ -2551,13 +2551,13 @@ int parse_admin(int fd)
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == RFIFOL(fd,2)) {
strncpy((char*)WFIFOP(fd,6), auth_dat[i].userid, 24);
- login_log("'ladmin': Request (by id) of an account name (account: %s, id: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Request (by id) of an account name (account: %s, id: %d, ip: %s)\n",
auth_dat[i].userid, RFIFOL(fd,2), ip);
break;
}
}
if (i == auth_num) {
- login_log("'ladmin': Name request (by id) of an unknown account (id: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Name request (by id) of an unknown account (id: %d, ip: %s)\n",
RFIFOL(fd,2), ip);
strncpy((char*)WFIFOP(fd,6), "", 24);
}
@@ -2581,14 +2581,14 @@ int parse_admin(int fd)
i = search_account_index(account_name);
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
- login_log("'ladmin': Change of a validity limit (account: %s, new validity: %d (%s), ip: %s)" RETCODE,
+ login_log("'ladmin': Change of a validity limit (account: %s, new validity: %d (%s), ip: %s)\n",
auth_dat[i].userid, timestamp, (timestamp == 0 ? "unlimited" : tmpstr), ip);
auth_dat[i].connect_until_time = timestamp;
WFIFOL(fd,2) = auth_dat[i].account_id;
mmo_auth_sync();
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to change the validity limit of an unknown account (account: %s, received validity: %d (%s), ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to change the validity limit of an unknown account (account: %s, received validity: %d (%s), ip: %s)\n",
account_name, timestamp, (timestamp == 0 ? "unlimited" : tmpstr), ip);
}
WFIFOL(fd,30) = (unsigned int)timestamp;
@@ -2616,7 +2616,7 @@ int parse_admin(int fd)
if (i != -1) {
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
WFIFOL(fd,2) = auth_dat[i].account_id;
- login_log("'ladmin': Change of the final date of a banishment (account: %s, new final date of banishment: %d (%s), ip: %s)" RETCODE,
+ login_log("'ladmin': Change of the final date of a banishment (account: %s, new final date of banishment: %d (%s), ip: %s)\n",
auth_dat[i].userid, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
if (auth_dat[i].ban_until_time != timestamp) {
if (timestamp != 0) {
@@ -2635,7 +2635,7 @@ int parse_admin(int fd)
}
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to change the final date of a banishment of an unknown account (account: %s, received final date of banishment: %d (%s), ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to change the final date of a banishment of an unknown account (account: %s, received final date of banishment: %d (%s), ip: %s)\n",
account_name, timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
}
WFIFOL(fd,30) = (unsigned int)timestamp;
@@ -2676,7 +2676,7 @@ int parse_admin(int fd)
if (timestamp <= time(NULL))
timestamp = 0;
strftime(tmpstr, 24, date_format, localtime(&timestamp));
- login_log("'ladmin': Adjustment of a final date of a banishment (account: %s, (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)" RETCODE,
+ login_log("'ladmin': Adjustment of a final date of a banishment (account: %s, (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)\n",
auth_dat[i].userid, (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), timestamp, (timestamp == 0 ? "no banishment" : tmpstr), ip);
if (auth_dat[i].ban_until_time != timestamp) {
if (timestamp != 0) {
@@ -2695,13 +2695,13 @@ int parse_admin(int fd)
}
} else {
strftime(tmpstr, 24, date_format, localtime(&auth_dat[i].ban_until_time));
- login_log("'ladmin': Impossible to adjust the final date of a banishment (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)" RETCODE,
+ login_log("'ladmin': Impossible to adjust the final date of a banishment (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].ban_until_time, (auth_dat[i].ban_until_time == 0 ? "no banishment" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), ip);
}
WFIFOL(fd,30) = (unsigned long)auth_dat[i].ban_until_time;
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to adjust the final date of a banishment of an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to adjust the final date of a banishment of an unknown account (account: %s, ip: %s)\n",
account_name, ip);
WFIFOL(fd,30) = 0;
}
@@ -2716,7 +2716,7 @@ int parse_admin(int fd)
WFIFOW(fd,0) = 0x794f;
WFIFOW(fd,2) = 0xFFFF; // WTF???
if (RFIFOL(fd,4) < 1) {
- login_log("'ladmin': Receiving a message for broadcast, but message is void (ip: %s)" RETCODE,
+ login_log("'ladmin': Receiving a message for broadcast, but message is void (ip: %s)\n",
ip);
} else {
// at least 1 char-server
@@ -2724,7 +2724,7 @@ int parse_admin(int fd)
if (server_fd[i] >= 0)
break;
if (i == MAX_SERVERS) {
- login_log("'ladmin': Receiving a message for broadcast, but no char-server is online (ip: %s)" RETCODE,
+ login_log("'ladmin': Receiving a message for broadcast, but no char-server is online (ip: %s)\n",
ip);
} else {
unsigned char buf[32000];
@@ -2735,10 +2735,10 @@ int parse_admin(int fd)
message[sizeof(message)-1] = '\0';
remove_control_chars(message);
if (RFIFOW(fd,2) == 0)
- login_log("'ladmin': Receiving a message for broadcast (message (in yellow): %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Receiving a message for broadcast (message (in yellow): %s, ip: %s)\n",
message, ip);
else
- login_log("'ladmin': Receiving a message for broadcast (message (in blue): %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Receiving a message for broadcast (message (in blue): %s, ip: %s)\n",
message, ip);
// send same message to all char-servers (no answer)
memcpy(WBUFP(buf,0), RFIFOP(fd,0), 8 + RFIFOL(fd,4));
@@ -2769,7 +2769,7 @@ int parse_admin(int fd)
memcpy(WFIFOP(fd,6), auth_dat[i].userid, 24);
timestamp = auth_dat[i].connect_until_time;
if (add_to_unlimited_account == 0 && timestamp == 0) {
- login_log("'ladmin': Attempt to adjust the validity limit of an unlimited account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to adjust the validity limit of an unlimited account (account: %s, ip: %s)\n",
auth_dat[i].userid, ip);
WFIFOL(fd,30) = 0;
} else {
@@ -2786,21 +2786,21 @@ int parse_admin(int fd)
if (timestamp != -1) {
strftime(tmpstr, 24, date_format, localtime(&auth_dat[i].connect_until_time));
strftime(tmpstr2, 24, date_format, localtime(&timestamp));
- login_log("'ladmin': Adjustment of a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)" RETCODE,
+ login_log("'ladmin': Adjustment of a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> new validity: %d (%s), ip: %s)\n",
auth_dat[i].userid, auth_dat[i].connect_until_time, (auth_dat[i].connect_until_time == 0 ? "unlimited" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), timestamp, (timestamp == 0 ? "unlimited" : tmpstr2), ip);
auth_dat[i].connect_until_time = timestamp;
mmo_auth_sync();
WFIFOL(fd,30) = (unsigned long)auth_dat[i].connect_until_time;
} else {
strftime(tmpstr, 24, date_format, localtime(&auth_dat[i].connect_until_time));
- login_log("'ladmin': Impossible to adjust a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)" RETCODE,
+ login_log("'ladmin': Impossible to adjust a validity limit (account: %s, %d (%s) + (%+d y %+d m %+d d %+d h %+d mn %+d s) -> ???, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].connect_until_time, (auth_dat[i].connect_until_time == 0 ? "unlimited" : tmpstr), (short)RFIFOW(fd,26), (short)RFIFOW(fd,28), (short)RFIFOW(fd,30), (short)RFIFOW(fd,32), (short)RFIFOW(fd,34), (short)RFIFOW(fd,36), ip);
WFIFOL(fd,30) = 0;
}
}
} else {
memcpy(WFIFOP(fd,6), account_name, 24);
- login_log("'ladmin': Attempt to adjust the validity limit of an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to adjust the validity limit of an unknown account (account: %s, ip: %s)\n",
account_name, ip);
WFIFOL(fd,30) = 0;
}
@@ -2835,13 +2835,13 @@ int parse_admin(int fd)
if (auth_dat[i].memo[0]) {
memcpy(WFIFOP(fd,150), auth_dat[i].memo, strlen(auth_dat[i].memo));
}
- login_log("'ladmin': Sending information of an account (request by the name; account: %s, id: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Sending information of an account (request by the name; account: %s, id: %d, ip: %s)\n",
auth_dat[i].userid, auth_dat[i].account_id, ip);
WFIFOSET(fd,150+strlen(auth_dat[i].memo));
} else {
memcpy(WFIFOP(fd,7), account_name, 24);
WFIFOW(fd,148) = 0;
- login_log("'ladmin': Attempt to obtain information (by the name) of an unknown account (account: %s, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to obtain information (by the name) of an unknown account (account: %s, ip: %s)\n",
account_name, ip);
WFIFOSET(fd,150);
}
@@ -2856,7 +2856,7 @@ int parse_admin(int fd)
memset(WFIFOP(fd,7), '\0', 24);
for(i = 0; i < auth_num; i++) {
if (auth_dat[i].account_id == RFIFOL(fd,2)) {
- login_log("'ladmin': Sending information of an account (request by the id; account: %s, id: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Sending information of an account (request by the id; account: %s, id: %d, ip: %s)\n",
auth_dat[i].userid, RFIFOL(fd,2), ip);
WFIFOB(fd,6) = (unsigned char)isGM(auth_dat[i].account_id);
memcpy(WFIFOP(fd,7), auth_dat[i].userid, 24);
@@ -2878,7 +2878,7 @@ int parse_admin(int fd)
}
}
if (i == auth_num) {
- login_log("'ladmin': Attempt to obtain information (by the id) of an unknown account (id: %d, ip: %s)" RETCODE,
+ login_log("'ladmin': Attempt to obtain information (by the id) of an unknown account (id: %d, ip: %s)\n",
RFIFOL(fd,2), ip);
strncpy((char*)WFIFOP(fd,7), "", 24);
WFIFOW(fd,148) = 0;
@@ -2888,7 +2888,7 @@ int parse_admin(int fd)
break;
case 0x7955: // Request to reload GM file (no answer)
- login_log("'ladmin': Request to re-load GM configuration file (ip: %s)." RETCODE, ip);
+ login_log("'ladmin': Request to re-load GM configuration file (ip: %s).\n", ip);
read_gm_account();
// send GM accounts to all char-servers
send_GM_accounts(-1);
@@ -2904,10 +2904,10 @@ int parse_admin(int fd)
if (logfp) {
time(&raw_time);
strftime(tmpstr, 23, date_format, localtime(&raw_time));
- fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr);
- fprintf(logfp, "parse_admin: connection #%d (ip: %s), packet: 0x%x (with being read: %lu)." RETCODE, fd, ip, command, (unsigned long)RFIFOREST(fd));
- fprintf(logfp, "Detail (in hex):" RETCODE);
- fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE);
+ fprintf(logfp, "%s: receiving of an unknown packet -> disconnection\n", tmpstr);
+ fprintf(logfp, "parse_admin: connection #%d (ip: %s), packet: 0x%x (with being read: %lu).\n", fd, ip, command, (unsigned long)RFIFOREST(fd));
+ fprintf(logfp, "Detail (in hex):\n");
+ fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F\n");
memset(tmpstr, '\0', sizeof(tmpstr));
for(i = 0; i < RFIFOREST(fd); i++) {
if ((i & 15) == 0)
@@ -2920,7 +2920,7 @@ int parse_admin(int fd)
if ((i - 7) % 16 == 0) // -8 + 1
fprintf(logfp, " ");
else if ((i + 1) % 16 == 0) {
- fprintf(logfp, " %s" RETCODE, tmpstr);
+ fprintf(logfp, " %s\n", tmpstr);
memset(tmpstr, '\0', sizeof(tmpstr));
}
}
@@ -2930,13 +2930,13 @@ int parse_admin(int fd)
if ((j - 7) % 16 == 0) // -8 + 1
fprintf(logfp, " ");
}
- fprintf(logfp, " %s" RETCODE, tmpstr);
+ fprintf(logfp, " %s\n", tmpstr);
}
- fprintf(logfp, RETCODE);
+ fprintf(logfp, "\n");
fclose(logfp);
}
}
- login_log("'ladmin': End of connection, unknown packet (ip: %s)" RETCODE, ip);
+ login_log("'ladmin': End of connection, unknown packet (ip: %s)\n", ip);
set_eof(fd);
ShowWarning("Remote administration has been disconnected (unknown packet).\n");
return 0;
@@ -3024,7 +3024,7 @@ int parse_login(int fd)
//Perform ip-ban check
if (!check_ip(ipl))
{
- login_log("Connection refused: IP isn't authorised (deny/allow, ip: %s)." RETCODE, ip);
+ login_log("Connection refused: IP isn't authorised (deny/allow, ip: %s).\n", ip);
WFIFOHEAD(fd,23);
WFIFOW(fd,0) = 0x6a;
WFIFOB(fd,2) = 3; // 3 = Rejected from Server
@@ -3051,11 +3051,11 @@ int parse_login(int fd)
memcpy(account.userid,RFIFOP(fd,6),NAME_LENGTH); account.userid[23] = '\0';
remove_control_chars(account.userid);
if (command != 0x01dd) {
- login_log("Request for connection (non encryption mode) of %s (ip: %s)." RETCODE, account.userid, ip);
+ login_log("Request for connection (non encryption mode) of %s (ip: %s).\n", account.userid, ip);
memcpy(account.passwd, RFIFOP(fd,30), NAME_LENGTH); account.passwd[23] = '\0';
remove_control_chars(account.passwd);
} else {
- login_log("Request for connection (encryption mode) of %s (ip: %s)." RETCODE, account.userid, ip);
+ login_log("Request for connection (encryption mode) of %s (ip: %s).\n", account.userid, ip);
memcpy(account.passwd, RFIFOP(fd,30), 16); account.passwd[16] = '\0'; // binary data here
}
account.passwdenc = (command != 0x01dd) ? 0 : PASSWORDENC;
@@ -3064,7 +3064,7 @@ int parse_login(int fd)
if (result == -1) { // auth success
int gm_level = isGM(account.account_id);
if (min_level_to_connect > gm_level) {
- login_log("Connection refused: the minimum GM level for connection is %d (account: %s, GM level: %d, ip: %s)." RETCODE,
+ login_log("Connection refused: the minimum GM level for connection is %d (account: %s, GM level: %d, ip: %s).\n",
min_level_to_connect, account.userid, gm_level, ip);
WFIFOHEAD(fd,3);
WFIFOW(fd,0) = 0x81;
@@ -3112,7 +3112,7 @@ int parse_login(int fd)
auth_fifo_pos++;
} else { // if no char-server, don't send void list of servers, just disconnect the player with proper message
ShowStatus("Connection refused: there is no char-server online (account: %s, ip: %s).\n", account.userid, ip);
- login_log("Connection refused: there is no char-server online (account: %s, ip: %s)." RETCODE,
+ login_log("Connection refused: there is no char-server online (account: %s, ip: %s).\n",
account.userid, ip);
WFIFOW(fd,0) = 0x81;
WFIFOB(fd,2) = 1; // 01 = Server closed
@@ -3152,9 +3152,9 @@ int parse_login(int fd)
ld = (struct login_session_data*)aCalloc(1, sizeof(struct login_session_data));
session[fd]->session_data = ld;
if (command == 0x01db)
- login_log("Sending request of the coding key (ip: %s)" RETCODE, ip);
+ login_log("Sending request of the coding key (ip: %s)\n", ip);
else
- login_log("'ladmin': Sending request of the coding key (ip: %s)" RETCODE, ip);
+ login_log("'ladmin': Sending request of the coding key (ip: %s)\n", ip);
// Creation of the coding key
memset(ld->md5key, '\0', sizeof(ld->md5key));
@@ -3187,12 +3187,12 @@ int parse_login(int fd)
server_name = (char*)RFIFOP(fd,60); server_name[20] = '\0'; remove_control_chars(server_name);
server_ip = ntohl(RFIFOL(fd, 54));
server_port = ntohs(RFIFOW(fd, 58));
- login_log("Connection request of the char-server '%s' @ %d.%d.%d.%d:%d (ip: %s)" RETCODE,
+ login_log("Connection request of the char-server '%s' @ %d.%d.%d.%d:%d (ip: %s)\n",
server_name, CONVIP(server_ip), server_port, ip);
result = mmo_auth(&account, fd);
if (result == -1 && account.sex == 2 && account.account_id < MAX_SERVERS && server_fd[account.account_id] == -1) {
- login_log("Connection of the char-server '%s' accepted (account: %s, pass: %s, ip: %s)" RETCODE,
+ login_log("Connection of the char-server '%s' accepted (account: %s, pass: %s, ip: %s)\n",
server_name, account.userid, account.passwd, ip);
ShowStatus("Connection of the char-server '%s' accepted.\n", server_name);
memset(&server[account.account_id], 0, sizeof(struct mmo_char_server));
@@ -3217,11 +3217,11 @@ int parse_login(int fd)
if (server_fd[account.account_id] != -1) {
ShowNotice("Connection of the char-server '%s' REFUSED - already connected (account: %ld-%s, pass: %s, ip: %s)\n",
server_name, account.account_id, account.userid, account.passwd, ip);
- login_log("Connexion of the char-server '%s' REFUSED - already connected (account: %ld-%s, pass: %s, ip: %s)" RETCODE,
+ login_log("Connexion of the char-server '%s' REFUSED - already connected (account: %ld-%s, pass: %s, ip: %s)\n",
server_name, account.account_id, account.userid, account.passwd, ip);
} else {
ShowNotice("Connection of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s).\n", server_name, account.userid, account.passwd, ip);
- login_log("Connexion of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s)" RETCODE,
+ login_log("Connexion of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s)\n",
server_name, account.userid, account.passwd, ip);
}
WFIFOHEAD(fd,3);
@@ -3235,7 +3235,7 @@ int parse_login(int fd)
return 0;
case 0x7530: // Server version information request
- login_log("Sending of the server version (ip: %s)" RETCODE, ip);
+ login_log("Sending of the server version (ip: %s)\n", ip);
WFIFOHEAD(fd,10);
WFIFOW(fd,0) = 0x7531;
WFIFOB(fd,2) = ATHENA_MAJOR_VERSION;
@@ -3251,7 +3251,7 @@ int parse_login(int fd)
break;
case 0x7532: // Request to end connection
- login_log("End of connection (ip: %s)" RETCODE, ip);
+ login_log("End of connection (ip: %s)\n", ip);
set_eof(fd);
return 0;
@@ -3261,7 +3261,7 @@ int parse_login(int fd)
WFIFOW(fd,0) = 0x7919;
WFIFOB(fd,2) = 1;
if (!check_ladminip(session[fd]->client_addr)) {
- login_log("'ladmin'-login: Connection in administration mode refused: IP isn't authorised (ladmin_allow, ip: %s)." RETCODE, ip);
+ login_log("'ladmin'-login: Connection in administration mode refused: IP isn't authorised (ladmin_allow, ip: %s).\n", ip);
} else {
struct login_session_data *ld = (struct login_session_data*)session[fd]->session_data;
if (RFIFOW(fd,2) == 0) { // non encrypted password
@@ -3271,14 +3271,14 @@ int parse_login(int fd)
remove_control_chars(password);
// If remote administration is enabled and password sent by client matches password read from login server configuration file
if ((admin_state == 1) && (strcmp(password, admin_pass) == 0)) {
- login_log("'ladmin'-login: Connection in administration mode accepted (non encrypted password: %s, ip: %s)" RETCODE, password, ip);
+ login_log("'ladmin'-login: Connection in administration mode accepted (non encrypted password: %s, ip: %s)\n", password, ip);
ShowNotice("Connection of a remote administration accepted (non encrypted password).\n");
WFIFOB(fd,2) = 0;
session[fd]->func_parse = parse_admin;
} else if (admin_state != 1)
- login_log("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (non encrypted password: %s, ip: %s)" RETCODE, password, ip);
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (non encrypted password: %s, ip: %s)\n", password, ip);
else
- login_log("'ladmin'-login: Connection in administration mode REFUSED - invalid password (non encrypted password: %s, ip: %s)" RETCODE, password, ip);
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - invalid password (non encrypted password: %s, ip: %s)\n", password, ip);
} else { // encrypted password
if (!ld)
ShowError("'ladmin'-login: error! MD5 key not created/requested for an administration login.\n");
@@ -3292,14 +3292,14 @@ int parse_login(int fd)
MD5_String2binary(md5str, md5bin);
// If remote administration is enabled and password hash sent by client matches hash of password read from login server configuration file
if ((admin_state == 1) && (memcmp(md5bin, RFIFOP(fd,4), 16) == 0)) {
- login_log("'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: %s)" RETCODE, ip);
+ login_log("'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: %s)\n", ip);
ShowNotice("Connection of a remote administration accepted (encrypted password).\n");
WFIFOB(fd,2) = 0;
session[fd]->func_parse = parse_admin;
} else if (admin_state != 1)
- login_log("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: %s)" RETCODE, ip);
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: %s)\n", ip);
else
- login_log("'ladmin'-login: Connection in administration mode REFUSED - invalid password (encrypted password, ip: %s)" RETCODE, ip);
+ login_log("'ladmin'-login: Connection in administration mode REFUSED - invalid password (encrypted password, ip: %s)\n", ip);
}
}
}
@@ -3317,10 +3317,10 @@ int parse_login(int fd)
if (logfp) {
time(&raw_time);
strftime(tmpstr, 23, date_format, localtime(&raw_time));
- fprintf(logfp, "%s: receiving of an unknown packet -> disconnection" RETCODE, tmpstr);
- fprintf(logfp, "parse_login: connection #%d (ip: %s), packet: 0x%x (with being read: %lu)." RETCODE, fd, ip, command, (unsigned long)RFIFOREST(fd));
- fprintf(logfp, "Detail (in hex):" RETCODE);
- fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F" RETCODE);
+ fprintf(logfp, "%s: receiving of an unknown packet -> disconnection\n", tmpstr);
+ fprintf(logfp, "parse_login: connection #%d (ip: %s), packet: 0x%x (with being read: %lu).\n", fd, ip, command, (unsigned long)RFIFOREST(fd));
+ fprintf(logfp, "Detail (in hex):\n");
+ fprintf(logfp, "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F\n");
memset(tmpstr, '\0', sizeof(tmpstr));
for(i = 0; i < RFIFOREST(fd); i++) {
if ((i & 15) == 0)
@@ -3333,7 +3333,7 @@ int parse_login(int fd)
if ((i - 7) % 16 == 0) // -8 + 1
fprintf(logfp, " ");
else if ((i + 1) % 16 == 0) {
- fprintf(logfp, " %s" RETCODE, tmpstr);
+ fprintf(logfp, " %s\n", tmpstr);
memset(tmpstr, '\0', sizeof(tmpstr));
}
}
@@ -3343,13 +3343,13 @@ int parse_login(int fd)
if ((j - 7) % 16 == 0) // -8 + 1
fprintf(logfp, " ");
}
- fprintf(logfp, " %s" RETCODE, tmpstr);
+ fprintf(logfp, " %s\n", tmpstr);
}
- fprintf(logfp, RETCODE);
+ fprintf(logfp, "\n");
fclose(logfp);
}
}
- login_log("Abnormal end of connection (ip: %s): Unknown packet 0x%x " RETCODE, ip, command);
+ login_log("Abnormal end of connection (ip: %s): Unknown packet 0x%x\n", ip, command);
set_eof(fd);
return 0;
}
@@ -3370,7 +3370,7 @@ int parse_console(char*buf)
sscanf(buf, "%[^\n]", command);
- login_log("Console command :%s" RETCODE, command);
+ login_log("Console command :%s\n", command);
if( strcmpi("shutdown", command) == 0 ||
strcmpi("exit", command) == 0 ||
@@ -3784,131 +3784,131 @@ void save_config_in_log(void)
// a newline in the log...
login_log("");
- login_log("The login-server starting..." RETCODE);
+ login_log("The login-server starting...\n");
// save configuration in log file
- login_log("The configuration of the server is set:" RETCODE);
+ login_log("The configuration of the server is set:\n");
if (admin_state != 1)
- login_log("- with no remote administration." RETCODE);
+ login_log("- with no remote administration.\n");
else if (admin_pass[0] == '\0')
- login_log("- with a remote administration with a VOID password." RETCODE);
+ login_log("- with a remote administration with a VOID password.\n");
else if (strcmp(admin_pass, "admin") == 0)
- login_log("- with a remote administration with the DEFAULT password." RETCODE);
+ login_log("- with a remote administration with the DEFAULT password.\n");
else
- login_log("- with a remote administration with the password of %d character(s)." RETCODE, strlen(admin_pass));
+ login_log("- with a remote administration with the password of %d character(s).\n", strlen(admin_pass));
if (access_ladmin_allownum == 0 || (access_ladmin_allownum == 1 && access_ladmin_allow[0] == '\0')) {
- login_log("- to accept any IP for remote administration" RETCODE);
+ login_log("- to accept any IP for remote administration\n");
} else {
- login_log("- to accept following IP for remote administration:" RETCODE);
+ login_log("- to accept following IP for remote administration:\n");
for(i = 0; i < access_ladmin_allownum; i++)
- login_log(" %s" RETCODE, (char *)(access_ladmin_allow + i * ACO_STRSIZE));
+ login_log(" %s\n", (char *)(access_ladmin_allow + i * ACO_STRSIZE));
}
if (gm_pass[0] == '\0')
- login_log("- with a VOID 'To GM become' password (gm_pass)." RETCODE);
+ login_log("- with a VOID 'To GM become' password (gm_pass).\n");
else if (strcmp(gm_pass, "gm") == 0)
- login_log("- with the DEFAULT 'To GM become' password (gm_pass)." RETCODE);
+ login_log("- with the DEFAULT 'To GM become' password (gm_pass).\n");
else
- login_log("- with a 'To GM become' password (gm_pass) of %d character(s)." RETCODE, strlen(gm_pass));
+ login_log("- with a 'To GM become' password (gm_pass) of %d character(s).\n", strlen(gm_pass));
if (level_new_gm == 0)
- login_log("- to refuse any creation of GM with @gm." RETCODE);
+ login_log("- to refuse any creation of GM with @gm.\n");
else
- login_log("- to create GM with level '%d' when @gm is used." RETCODE, level_new_gm);
+ login_log("- to create GM with level '%d' when @gm is used.\n", level_new_gm);
if (new_account_flag == 1)
- login_log("- to ALLOW new users (with _F/_M)." RETCODE);
+ login_log("- to ALLOW new users (with _F/_M).\n");
else
- login_log("- to NOT ALLOW new users (with _F/_M)." RETCODE);
- login_log("- with port: %d." RETCODE, login_port);
- login_log("- with the accounts file name: '%s'." RETCODE, account_filename);
- login_log("- with the GM accounts file name: '%s'." RETCODE, GM_account_filename);
+ login_log("- to NOT ALLOW new users (with _F/_M).\n");
+ login_log("- with port: %d.\n", login_port);
+ login_log("- with the accounts file name: '%s'.\n", account_filename);
+ login_log("- with the GM accounts file name: '%s'.\n", GM_account_filename);
if (gm_account_filename_check_timer == 0)
- login_log("- to NOT check GM accounts file modifications." RETCODE);
+ login_log("- to NOT check GM accounts file modifications.\n");
else
- login_log("- to check GM accounts file modifications every %d seconds." RETCODE, gm_account_filename_check_timer);
+ login_log("- to check GM accounts file modifications every %d seconds.\n", gm_account_filename_check_timer);
if (use_md5_passwds == 0)
- login_log("- to save password in plain text." RETCODE);
+ login_log("- to save password in plain text.\n");
else
- login_log("- to save password with MD5 encrypting." RETCODE);
+ login_log("- to save password with MD5 encrypting.\n");
// not necessary to log the 'login_log_filename', we are inside :)
- login_log("- with the unknown packets file name: '%s'." RETCODE, login_log_unknown_packets_filename);
+ login_log("- with the unknown packets file name: '%s'.\n", login_log_unknown_packets_filename);
if (save_unknown_packets)
- login_log("- to SAVE all unkown packets." RETCODE);
+ login_log("- to SAVE all unkown packets.\n");
else
- login_log("- to SAVE only unkown packets sending by a char-server or a remote administration." RETCODE);
+ login_log("- to SAVE only unkown packets sending by a char-server or a remote administration.\n");
if (display_parse_login)
- login_log("- to display normal parse packets on console." RETCODE);
+ login_log("- to display normal parse packets on console.\n");
else
- login_log("- to NOT display normal parse packets on console." RETCODE);
+ login_log("- to NOT display normal parse packets on console.\n");
if (display_parse_admin)
- login_log("- to display administration parse packets on console." RETCODE);
+ login_log("- to display administration parse packets on console.\n");
else
- login_log("- to NOT display administration parse packets on console." RETCODE);
+ login_log("- to NOT display administration parse packets on console.\n");
if (display_parse_fromchar)
- login_log("- to display char-server parse packets on console." RETCODE);
+ login_log("- to display char-server parse packets on console.\n");
else
- login_log("- to NOT display char-server parse packets on console." RETCODE);
+ login_log("- to NOT display char-server parse packets on console.\n");
if (min_level_to_connect == 0) // 0: all players, 1-99 at least gm level x
- login_log("- with no minimum level for connection." RETCODE);
+ login_log("- with no minimum level for connection.\n");
else if (min_level_to_connect == 99)
- login_log("- to accept only GM with level 99." RETCODE);
+ login_log("- to accept only GM with level 99.\n");
else
- login_log("- to accept only GM with level %d or more." RETCODE, min_level_to_connect);
+ login_log("- to accept only GM with level %d or more.\n", min_level_to_connect);
if (add_to_unlimited_account)
- login_log("- to authorize adjustment (with timeadd ladmin) on an unlimited account." RETCODE);
+ login_log("- to authorize adjustment (with timeadd ladmin) on an unlimited account.\n");
else
- login_log("- to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before." RETCODE);
+ login_log("- to refuse adjustment (with timeadd ladmin) on an unlimited account. You must use timeset (ladmin command) before.\n");
if (start_limited_time < 0)
- login_log("- to create new accounts with an unlimited time." RETCODE);
+ login_log("- to create new accounts with an unlimited time.\n");
else if (start_limited_time == 0)
- login_log("- to create new accounts with a limited time: time of creation." RETCODE);
+ login_log("- to create new accounts with a limited time: time of creation.\n");
else
- login_log("- to create new accounts with a limited time: time of creation + %d second(s)." RETCODE, start_limited_time);
+ login_log("- to create new accounts with a limited time: time of creation + %d second(s).\n", start_limited_time);
if (access_order == ACO_DENY_ALLOW) {
if (access_denynum == 0) {
- login_log("- with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP." RETCODE);
+ login_log("- with the IP security order: 'deny,allow' (allow if not deny). You refuse no IP.\n");
} else if (access_denynum == 1 && access_deny[0] == '\0') {
- login_log("- with the IP security order: 'deny,allow' (allow if not deny). You refuse ALL IP." RETCODE);
+ login_log("- with the IP security order: 'deny,allow' (allow if not deny). You refuse ALL IP.\n");
} else {
- login_log("- with the IP security order: 'deny,allow' (allow if not deny). Refused IP are:" RETCODE);
+ login_log("- with the IP security order: 'deny,allow' (allow if not deny). Refused IP are:\n");
for(i = 0; i < access_denynum; i++)
- login_log(" %s" RETCODE, (char *)(access_deny + i * ACO_STRSIZE));
+ login_log(" %s\n", (char *)(access_deny + i * ACO_STRSIZE));
}
} else if (access_order == ACO_ALLOW_DENY) {
if (access_allownum == 0) {
- login_log("- with the IP security order: 'allow,deny' (deny if not allow). But, NO IP IS AUTHORISED!" RETCODE);
+ login_log("- with the IP security order: 'allow,deny' (deny if not allow). But, NO IP IS AUTHORISED!\n");
} else if (access_allownum == 1 && access_allow[0] == '\0') {
- login_log("- with the IP security order: 'allow,deny' (deny if not allow). You authorise ALL IP." RETCODE);
+ login_log("- with the IP security order: 'allow,deny' (deny if not allow). You authorise ALL IP.\n");
} else {
- login_log("- with the IP security order: 'allow,deny' (deny if not allow). Authorised IP are:" RETCODE);
+ login_log("- with the IP security order: 'allow,deny' (deny if not allow). Authorised IP are:\n");
for(i = 0; i < access_allownum; i++)
- login_log(" %s" RETCODE, (char *)(access_allow + i * ACO_STRSIZE));
+ login_log(" %s\n", (char *)(access_allow + i * ACO_STRSIZE));
}
} else { // ACO_MUTUAL_FAILTURE
- login_log("- with the IP security order: 'mutual-failture' (allow if in the allow list and not in the deny list)." RETCODE);
+ login_log("- with the IP security order: 'mutual-failture' (allow if in the allow list and not in the deny list).\n");
if (access_allownum == 0) {
- login_log(" But, NO IP IS AUTHORISED!" RETCODE);
+ login_log(" But, NO IP IS AUTHORISED!\n");
} else if (access_denynum == 1 && access_deny[0] == '\0') {
- login_log(" But, you refuse ALL IP!" RETCODE);
+ login_log(" But, you refuse ALL IP!\n");
} else {
if (access_allownum == 1 && access_allow[0] == '\0') {
- login_log(" You authorise ALL IP." RETCODE);
+ login_log(" You authorise ALL IP.\n");
} else {
- login_log(" Authorised IP are:" RETCODE);
+ login_log(" Authorised IP are:\n");
for(i = 0; i < access_allownum; i++)
- login_log(" %s" RETCODE, (char *)(access_allow + i * ACO_STRSIZE));
+ login_log(" %s\n", (char *)(access_allow + i * ACO_STRSIZE));
}
- login_log(" Refused IP are:" RETCODE);
+ login_log(" Refused IP are:\n");
for(i = 0; i < access_denynum; i++)
- login_log(" %s" RETCODE, (char *)(access_deny + i * ACO_STRSIZE));
+ login_log(" %s\n", (char *)(access_deny + i * ACO_STRSIZE));
}
}
@@ -3939,7 +3939,7 @@ void do_final(void)
}
do_close(login_fd);
- login_log("----End of login-server (normal end with closing of all files)." RETCODE);
+ login_log("----End of login-server (normal end with closing of all files).\n");
if(log_fp)
fclose(log_fp);
@@ -4018,7 +4018,7 @@ int do_init(int argc, char **argv)
// server port open & binding
login_fd = make_listen_bind(login_ip, login_port);
- login_log("The login-server is ready (Server is listening on the port %d)." RETCODE, login_port);
+ login_log("The login-server is ready (Server is listening on the port %d).\n", login_port);
ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", login_port);
return 0;
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index 3fe16305e..9411c6fec 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -620,7 +620,7 @@ int mmo_auth(struct mmo_account* account, int fd)
if (!check_password(session[fd]->session_data, account->passwdenc, user_password, password))
{
- ShowInfo("Invalid password (account: %s, pass: %s, received pass: %s, ip: %s)" RETCODE,
+ ShowInfo("Invalid password (account: %s, pass: %s, received pass: %s, ip: %s)\n",
account->userid, password, (account->passwdenc) ? "[MD5]" : account->passwd, ip);
return 1; // 1 = Incorrect Password
}
@@ -911,13 +911,13 @@ int parse_fromchar(int fd)
memcpy(actual_email, RFIFOP(fd,6), 40);
memcpy(new_email, RFIFOP(fd,46), 40);
if (e_mail_check(actual_email) == 0)
- ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: %d, ip: %s)" RETCODE,
+ ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command), but actual email is invalid (account: %d, ip: %s)\n",
server[id].name, acc, ip);
else if (e_mail_check(new_email) == 0)
- ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a invalid new e-mail (account: %d, ip: %s)" RETCODE,
+ ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a invalid new e-mail (account: %d, ip: %s)\n",
server[id].name, acc, ip);
else if (strcmpi(new_email, "a@a.com") == 0)
- ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a default e-mail (account: %d, ip: %s)" RETCODE,
+ ShowWarning("Char-server '%s': Attempt to modify an e-mail on an account (@email GM command) with a default e-mail (account: %d, ip: %s)\n",
server[id].name, acc, ip);
else {
sprintf(tmpsql, "SELECT `%s`,`email` FROM `%s` WHERE `%s` = '%d'", login_db_userid, login_db, login_db_account_id, acc);
@@ -937,7 +937,7 @@ int parse_fromchar(int fd)
ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmpsql);
}
- ShowInfo("Char-server '%s': Modify an e-mail on an account (@email GM command) (account: %d (%s), new e-mail: %s, ip: %s)." RETCODE,
+ ShowInfo("Char-server '%s': Modify an e-mail on an account (@email GM command) (account: %d (%s), new e-mail: %s, ip: %s).\n",
server[id].name, acc, sql_row[0], actual_email, ip);
}
}
@@ -1293,7 +1293,7 @@ int login_ip_ban_check(uint32 ip)
}
// ip ban ok.
- ShowInfo("Packet from banned ip : %d.%d.%d.%d\n" RETCODE, CONVIP(ip));
+ ShowInfo("Packet from banned ip : %d.%d.%d.%d\n", CONVIP(ip));
if (login_config.log_login)
{
@@ -1668,12 +1668,12 @@ int parse_login(int fd)
break;
case 0x7532: // Request to end connection
- ShowStatus ("End of connection (ip: %s)" RETCODE, ip);
+ ShowStatus ("End of connection (ip: %s)\n", ip);
set_eof(fd);
break;
default:
- ShowStatus ("Abnormal end of connection (ip: %s): Unknown packet 0x%x " RETCODE, ip, RFIFOW(fd,0));
+ ShowStatus ("Abnormal end of connection (ip: %s): Unknown packet 0x%x\n", ip, RFIFOW(fd,0));
set_eof(fd);
return 0;
}
@@ -1691,7 +1691,7 @@ int parse_console(char* buf)
sscanf(buf, "%[^\n]", command);
- //login_log("Console command :%s" RETCODE, command);
+ //login_log("Console command :%s\n", command);
if( strcmpi("shutdown", command) == 0 ||
strcmpi("exit", command) == 0 ||
diff --git a/src/map/log.c b/src/map/log.c
index e1e35f63d..fdbb4470f 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -84,7 +84,7 @@ int log_branch(struct map_session_data *sd)
return 0;
time(&curtime);
strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp,"%s - %s[%d:%d]\t%s%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex), RETCODE);
+ fprintf(logfp,"%s - %s[%d:%d]\t%s\n", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, mapindex_id2name(sd->mapindex));
fclose(logfp);
return 1;
}
@@ -134,13 +134,13 @@ int log_pick_pc(struct map_session_data *sd, const char *type, int nameid, int a
if (itm==NULL) {
//We log common item
- fprintf(logfp,"%s - %d\t%s\t%d,%d,%s%s",
- timestring, sd->status.char_id, type, nameid, amount, mapname, RETCODE);
+ fprintf(logfp,"%s - %d\t%s\t%d,%d,%s\n",
+ timestring, sd->status.char_id, type, nameid, amount, mapname);
} else {
//We log Extended item
- fprintf(logfp,"%s - %d\t%s\t%d,%d,%d,%d,%d,%d,%d,%s%s",
- timestring, sd->status.char_id, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname, RETCODE);
+ fprintf(logfp,"%s - %d\t%s\t%d,%d,%d,%d,%d,%d,%d,%s\n",
+ timestring, sd->status.char_id, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname);
}
fclose(logfp);
return 1; //Logged
@@ -191,13 +191,13 @@ int log_pick_mob(struct mob_data *md, const char *type, int nameid, int amount,
if (itm==NULL) {
//We log common item
- fprintf(logfp,"%s - %d\t%s\t%d,%d,%s%s",
- timestring, md->class_, type, nameid, amount, mapname, RETCODE);
+ fprintf(logfp,"%s - %d\t%s\t%d,%d,%s\n",
+ timestring, md->class_, type, nameid, amount, mapname);
} else {
//We log Extended item
- fprintf(logfp,"%s - %d\t%s\t%d,%d,%d,%d,%d,%d,%d,%s%s",
- timestring, md->class_, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname, RETCODE);
+ fprintf(logfp,"%s - %d\t%s\t%d,%d,%d,%d,%d,%d,%d,%s\n",
+ timestring, md->class_, type, itm->nameid, amount, itm->refine, itm->card[0], itm->card[1], itm->card[2], itm->card[3], mapname);
}
fclose(logfp);
return 1; //Logged
@@ -228,7 +228,7 @@ int log_zeny(struct map_session_data *sd, char *type, struct map_session_data *s
// return 0;
// time(&curtime);
// strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
-// fprintf(logfp,"%s - %s[%d]\t%s[%d]\t%d\t%s", timestring, sd->status.name, sd->status.account_id, target_sd->status.name, target_sd->status.account_id, sd->deal.zeny, RETCODE);
+// fprintf(logfp,"%s - %s[%d]\t%s[%d]\t%d\n", timestring, sd->status.name, sd->status.account_id, target_sd->status.name, target_sd->status.account_id, sd->deal.zeny);
// fclose(logfp);
// return 1;
return 0;
@@ -258,7 +258,7 @@ int log_mvpdrop(struct map_session_data *sd, int monster_id, int *log_mvp)
return 0;
time(&curtime);
strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp,"%s - %s[%d:%d]\t%d\t%d,%d%s", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, monster_id, log_mvp[0], log_mvp[1], RETCODE);
+ fprintf(logfp,"%s - %s[%d:%d]\t%d\t%d,%d\n", timestring, sd->status.name, sd->status.account_id, sd->status.char_id, monster_id, log_mvp[0], log_mvp[1]);
fclose(logfp);
return 0;
}
@@ -299,7 +299,7 @@ int log_atcommand(struct map_session_data *sd, const char *message)
return 0;
time(&curtime);
strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp,"%s - %s[%d]: %s%s",timestring,sd->status.name,sd->status.account_id,message,RETCODE);
+ fprintf(logfp,"%s - %s[%d]: %s\n",timestring,sd->status.name,sd->status.account_id,message);
fclose(logfp);
return 1;
}
@@ -333,7 +333,7 @@ int log_npc(struct map_session_data *sd, const char *message)
return 0;
time(&curtime);
strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp,"%s - %s[%d]: %s%s",timestring,sd->status.name,sd->status.account_id,message,RETCODE);
+ fprintf(logfp,"%s - %s[%d]: %s\n",timestring,sd->status.name,sd->status.account_id,message);
fclose(logfp);
return 1;
}
@@ -386,8 +386,8 @@ int log_chat(const char* type, int type_id, int src_charid, int src_accid, const
return 0;
time(&curtime);
strftime(timestring, 254, "%m/%d/%Y %H:%M:%S", localtime(&curtime));
- fprintf(logfp, "%s - %s,%d,%d,%d,%s,%d,%d,%s,%s%s",
- timestring, type, type_id, src_charid, src_accid, map, x, y, dst_charname, message, RETCODE);
+ fprintf(logfp, "%s - %s,%d,%d,%d,%s,%d,%d,%s,%s\n",
+ timestring, type, type_id, src_charid, src_accid, map, x, y, dst_charname, message);
fclose(logfp);
return 1;
}
diff --git a/src/tool/convert.c b/src/tool/convert.c
index 2959eb826..e9d82c362 100644
--- a/src/tool/convert.c
+++ b/src/tool/convert.c
@@ -5,8 +5,6 @@
#include <stdlib.h>
#include <string.h>
-#define RETCODE "\r\n"
-
#define MAX_INVENTORY 100
#define MAX_CART 100
#define MAX_SKILL 350
@@ -282,7 +280,7 @@ int mmo_char_convert(char *fname1,char *fname2)
ret=mmo_char_fromstr(line,&char_dat);
if(ret){
mmo_char_tostr(line,&char_dat);
- fprintf(ofp,"%s" RETCODE,line);
+ fprintf(ofp,"%s\n",line);
}
}
fclose(ifp);