summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/char.c143
-rw-r--r--src/char/int_guild.c10
-rw-r--r--src/char/int_party.c2
-rw-r--r--src/char/int_storage.c4
-rw-r--r--src/char/inter.c2
-rw-r--r--src/common/mmo.h6
-rw-r--r--src/ladmin/ladmin.c1009
-rw-r--r--src/login/login.c825
-rw-r--r--src/tool/convert.c4
-rw-r--r--src/tool/itemfrob.c2
-rw-r--r--src/tool/mapfrob.c2
-rw-r--r--src/tool/moneycount/mmo.h5
-rw-r--r--src/tool/skillfrob.c2
13 files changed, 888 insertions, 1128 deletions
diff --git a/src/char/char.c b/src/char/char.c
index eac88e6..4ec06ca 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -133,7 +133,7 @@ int char_log (char *fmt, ...)
if (logfp)
{
if (fmt[0] == '\0') // jump a line if no message
- fprintf (logfp, RETCODE);
+ fprintf (logfp, "\n");
else
{
gettimeofday (&tv, NULL);
@@ -437,8 +437,8 @@ int mmo_char_fromstr (char *str, struct mmo_charstatus *p)
printf
(" 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, p->name, wisp_server_name);
+ ("mmo_auth_init: ******WARNING: character name has wisp server name: Character name '%s' = wisp server name '%s'.\n",
+ p->name, wisp_server_name);
}
if (str[next] == '\n' || str[next] == '\r')
@@ -603,8 +603,8 @@ int mmo_char_init (void)
if (fp == NULL)
{
printf ("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_log ("Characters file not found: %s.\n", char_txt);
+ char_log ("Id for the next created character: %d.\n",
char_id_count);
return 0;
}
@@ -653,43 +653,35 @@ int mmo_char_init (void)
{
case -1:
char_log
- ("Duplicate character id in the next character line (character not readed):"
- RETCODE);
+ ("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);
+ ("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);
+ ("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);
+ ("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);
+ ("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);
+ ("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);
+ ("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);
+ ("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);
@@ -700,23 +692,23 @@ int mmo_char_init (void)
if (char_num == 0)
{
printf ("mmo_char_init: No character found in %s.\n", char_txt);
- char_log ("mmo_char_init: No character found in %s." RETCODE,
+ char_log ("mmo_char_init: No character found in %s.\n",
char_txt);
}
else if (char_num == 1)
{
printf ("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
{
printf ("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_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_log ("Id for the next created character: %d.\n",
char_id_count);
return 0;
@@ -757,7 +749,7 @@ void mmo_char_sync (void)
if (fp == NULL)
{
printf ("WARNING: Server can't not save characters.\n");
- char_log ("WARNING: Server can't not save characters." RETCODE);
+ char_log ("WARNING: Server can't not save characters.\n");
}
else
{
@@ -765,9 +757,9 @@ void mmo_char_sync (void)
{
// create only once the line, and save it in the 2 files (it's speeder than repeat twice the loop and create twice the line)
mmo_char_tostr (line, &char_dat[id[i]]); // 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);
}
@@ -780,17 +772,16 @@ void mmo_char_sync (void)
printf
("WARNING: Server can't not create backup of characters file.\n");
char_log
- ("WARNING: Server can't not create backup of characters file."
- RETCODE);
+ ("WARNING: Server can't not create backup of characters file.\n");
return;
}
for (i = 0; i < char_num; i++)
{
// create only once the line, and save it in the 2 files (it's speeder than repeat twice the loop and create twice the line)
mmo_char_tostr (line, &char_dat[id[i]]); // 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, backup_txt, &lock);
}
@@ -864,8 +855,8 @@ int make_new_char (int fd, unsigned char *dat)
if (remove_control_chars (dat))
{
char_log
- ("Make new char error (control char received in the name): (connection #%d, account: %d)."
- RETCODE, fd, sd->account_id);
+ ("Make new char error (control char received in the name): (connection #%d, account: %d).\n",
+ fd, sd->account_id);
return -1;
}
@@ -877,8 +868,8 @@ int make_new_char (int fd, unsigned char *dat)
if (strlen (dat) < 4)
{
char_log
- ("Make new char error (character name too small): (connection #%d, account: %d, name: '%s')."
- RETCODE, fd, sd->account_id, dat);
+ ("Make new char error (character name too small): (connection #%d, account: %d, name: '%s').\n",
+ fd, sd->account_id, dat);
return -1;
}
@@ -889,8 +880,8 @@ int make_new_char (int fd, unsigned char *dat)
if (strchr (char_name_letters, dat[i]) == NULL)
{
char_log
- ("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c."
- RETCODE, fd, sd->account_id, dat, dat[i]);
+ ("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;
}
}
@@ -900,8 +891,8 @@ int make_new_char (int fd, unsigned char *dat)
if (strchr (char_name_letters, dat[i]) != NULL)
{
char_log
- ("Make new char error (invalid letter in the name): (connection #%d, account: %d), name: %s, invalid letter: %c."
- RETCODE, fd, sd->account_id, dat, dat[i]);
+ ("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;
}
} // else, all letters/symbols are authorised (except control char removed before)
@@ -912,8 +903,8 @@ int make_new_char (int fd, unsigned char *dat)
dat[31] >= 12)
{ // 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, fd, sd->account_id, dat[30], dat, dat[24], dat[25],
+ ("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]);
@@ -926,8 +917,8 @@ int make_new_char (int fd, unsigned char *dat)
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, fd, sd->account_id, dat[30], dat, dat[24], dat[25],
+ ("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]);
@@ -942,8 +933,8 @@ int make_new_char (int fd, unsigned char *dat)
&& strcasecmp (char_dat[i].name, dat) == 0))
{
char_log
- ("Make new char error (name already exists): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %s), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d."
- RETCODE, fd, sd->account_id, dat[30], dat, char_dat[i].name,
+ ("Make new char error (name already exists): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %s), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d.\n",
+ fd, sd->account_id, dat[30], dat, char_dat[i].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]);
@@ -953,8 +944,8 @@ int make_new_char (int fd, unsigned char *dat)
&& char_dat[i].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: %s), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d."
- RETCODE, fd, sd->account_id, dat[30], dat, char_dat[i].name,
+ ("Make new char error (slot already used): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %s), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d.\n",
+ fd, sd->account_id, dat[30], dat, char_dat[i].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]);
@@ -965,8 +956,8 @@ int make_new_char (int fd, unsigned char *dat)
if (strcmp (wisp_server_name, dat) == 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, fd, sd->account_id, dat[30], dat, char_dat[i].name,
+ ("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], dat, char_dat[i].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]);
@@ -989,8 +980,8 @@ int make_new_char (int fd, unsigned char *dat)
sin_addr[3]);
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. [%s]"
- RETCODE, fd, sd->account_id, dat[30], dat, dat[24], dat[25], dat[26],
+ ("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. [%s]\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], ip);
@@ -1215,7 +1206,7 @@ void create_online_files (void)
if (online_display_option == 0) // we display nothing, so return
return;
- //char_log("Creation of online players files." RETCODE);
+ //char_log("Creation of online players files.\n");
// Get number of online players, id of each online players
players = 0;
@@ -2032,8 +2023,7 @@ void parse_tologin (int fd)
return;
if (RFIFOL (fd, 4) < 1)
char_log
- ("Receiving a message for broadcast, but message is void."
- RETCODE);
+ ("Receiving a message for broadcast, but message is void.\n");
else
{
// at least 1 map-server
@@ -2042,8 +2032,7 @@ void parse_tologin (int fd)
break;
if (i == MAX_MAP_SERVERS)
char_log
- ("'ladmin': Receiving a message for broadcast, but no map-server is online."
- RETCODE);
+ ("'ladmin': Receiving a message for broadcast, but no map-server is online.\n");
else
{
char buf[128];
@@ -2061,23 +2050,22 @@ void parse_tologin (int fd)
// 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);
+ ("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, message);
+ ("'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, message);
+ ("'ladmin': Receiving a message for broadcast (message (in blue): %s)\n",
+ message);
lp = 8;
}
// split message to max 80 char
@@ -2288,8 +2276,8 @@ void parse_tologin (int fd)
("From login-server: receiving of %d GM accounts information.\n",
GM_num);
char_log
- ("From login-server: receiving of %d GM accounts information."
- RETCODE, GM_num);
+ ("From login-server: receiving of %d GM accounts information.\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));
@@ -2351,8 +2339,8 @@ void map_anti_freeze_system (timer_id tid, tick_t tick, custom_id_t id, custom_d
("Map-server anti-freeze system: char-server #%d is freezed -> disconnection.\n",
i);
char_log
- ("Map-server anti-freeze system: char-server #%d is freezed -> disconnection."
- RETCODE, i);
+ ("Map-server anti-freeze system: char-server #%d is freezed -> disconnection.\n",
+ i);
session[server_fd[i]]->eof = 1;
}
}
@@ -2421,8 +2409,8 @@ void parse_frommap (int fd)
id, j, p[0], p[1], p[2], p[3], server[id].port);
printf ("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, id, j, p[0], p[1], p[2], p[3],
+ ("Map-Server %d connected: %d maps, from IP %d.%d.%d.%d port %d. Map-server %d loading complete.\n",
+ id, j, p[0], p[1], p[2], p[3],
server[id].port, id);
}
WFIFOW (fd, 0) = 0x2afb;
@@ -2435,8 +2423,8 @@ void parse_frommap (int fd)
if (j == 0)
{
printf ("WARNING: Map-Server %d have NO map.\n", id);
- char_log ("WARNING: Map-Server %d have NO map."
- RETCODE, id);
+ char_log ("WARNING: Map-Server %d have NO map.\n",
+ id);
// Transmitting maps information to the other map-servers
}
else
@@ -3111,8 +3099,8 @@ void parse_char (int fd)
if (ch != 9)
{
char_log
- ("Character Selected, Account ID: %d, Character Slot: %d, Character Name: %s [%s]"
- RETCODE, sd->account_id, RFIFOB (fd, 2),
+ ("Character Selected, Account ID: %d, Character Slot: %d, Character Name: %s [%s]\n",
+ sd->account_id, RFIFOB (fd, 2),
char_dat[sd->found_char[ch]].name, ip);
// searching map server
i = search_mapserver (char_dat
@@ -4025,8 +4013,7 @@ void term_func (void)
delete_session (login_fd);
delete_session (char_fd);
- 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");
}
int do_init (int argc, char **argv)
@@ -4035,7 +4022,7 @@ int do_init (int argc, char **argv)
// a newline in the log...
char_log ("");
- char_log ("The char-server starting..." RETCODE);
+ char_log ("The char-server starting...\n");
char_config_read ((argc < 2) ? CHAR_CONF_NAME : argv[1]);
lan_config_read ((argc > 1) ? argv[1] : LOGIN_LAN_CONF_NAME);
@@ -4078,8 +4065,8 @@ int do_init (int argc, char **argv)
i = add_timer_interval (gettick () + 1000, map_anti_freeze_system, 0, 0, ANTI_FREEZE_INTERVAL * 1000); // checks every X seconds user specifies
}
- 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);
printf
("The char-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n",
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index b0c3ccf..05aae6b 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -548,7 +548,7 @@ void inter_guild_save_sub (db_key_t key, db_val_t 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);
}
// ギルド城データのセーブ用
@@ -559,7 +559,7 @@ void inter_castle_save_sub (db_key_t key, db_val_t 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);
}
// ギルドデータのセーブ
@@ -1080,7 +1080,7 @@ int mapif_parse_CreateGuild (int fd, int account_id, char *name,
mapif_guild_created (fd, account_id, g);
mapif_guild_info (fd, g);
- 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;
@@ -1242,7 +1242,7 @@ int mapif_parse_BreakGuild (int fd, int guild_id)
inter_guild_storage_delete (guild_id);
mapif_guild_broken (guild_id, 0);
- inter_log ("guild %s (id=%d) broken" RETCODE, g->name, guild_id);
+ inter_log ("guild %s (id=%d) broken\n", g->name, guild_id);
free (g);
return 0;
@@ -1553,7 +1553,7 @@ int mapif_parse_GuildCastleDataSave (int fd, int castle_id, int index,
{
int gid = (value) ? value : gc->guild_id;
struct guild *g = (struct guild *)numdb_search (guild_db, gid);
- 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", index);
}
diff --git a/src/char/int_party.c b/src/char/int_party.c
index af79373..6f8d023 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -140,7 +140,7 @@ void inter_party_save_sub (db_key_t key, db_val_t data, va_list ap)
inter_party_tostr (line, (struct party *) data);
fp = va_arg (ap, FILE *);
- fprintf (fp, "%s" RETCODE, line);
+ fprintf (fp, "%s\n", line);
}
// パーティーデータのセーブ
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index b3ec4da..e565572 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -342,7 +342,7 @@ void inter_storage_save_sub (db_key_t key, db_val_t 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);
}
//---------------------------------------------------------
@@ -378,7 +378,7 @@ void inter_guild_storage_save_sub (db_key_t key, db_val_t 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);
}
}
diff --git a/src/char/inter.c b/src/char/inter.c
index a1a5664..e886bf6 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -150,7 +150,7 @@ void inter_accreg_save_sub (db_key_t key, db_val_t data, va_list ap)
{
inter_accreg_tostr (line, reg);
fp = va_arg (ap, FILE *);
- fprintf (fp, "%s" RETCODE, line);
+ fprintf (fp, "%s\n", line);
}
}
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 2bd8705..64e0523 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -5,12 +5,6 @@
# include <time.h>
# include "utils.h" // LCCWIN32
-# ifdef CYGWIN
-# define RETCODE "\r\n"
-# else
-# define RETCODE "\n"
-# endif
-
# define FIFOSIZE_SERVERLINK 256*1024
// set to 0 to not check IP of player between each server.
diff --git a/src/ladmin/ladmin.c b/src/ladmin/ladmin.c
index ebe5a75..1fb2804 100644
--- a/src/ladmin/ladmin.c
+++ b/src/ladmin/ladmin.c
@@ -268,7 +268,7 @@ int ladmin_log (const char *fmt, ...)
if (logfp)
{
if (fmt[0] == '\0') // jump a line if no message
- fprintf (logfp, RETCODE);
+ fprintf (logfp, "\n");
else
{
gettimeofday (&tv, NULL);
@@ -355,8 +355,8 @@ int verify_accountname (char *account_name)
("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));
+ ("Caractère interdit trouvé dans le nom du compte (%d%s caractère).\n",
+ i + 1, makeordinal (i + 1));
}
else
{
@@ -364,8 +364,8 @@ int verify_accountname (char *account_name)
("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));
+ ("Illegal character found in the account name (%d%s character).\n",
+ i + 1, makeordinal (i + 1));
}
return 0;
}
@@ -378,16 +378,14 @@ int verify_accountname (char *account_name)
printf
("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);
+ ("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n");
}
else
{
printf
("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);
+ ("Account name is too short. Please input an account name of 4-23 bytes.\n");
}
return 0;
}
@@ -399,16 +397,14 @@ int verify_accountname (char *account_name)
printf
("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);
+ ("Nom du compte trop long. Entrez un nom de compte de 4-23 caractères.\n");
}
else
{
printf
("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);
+ ("Account name is too long. Please input an account name of 4-23 bytes.\n");
}
return 0;
}
@@ -470,13 +466,11 @@ int typepasswd (char *password)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Aucun mot de passe n'a été donné. Demande d'un mot de passe."
- RETCODE);
+ ("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));
@@ -508,30 +502,28 @@ int typepasswd (char *password)
printf
("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);
+ ("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
{
printf
("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,
+ ("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;
@@ -554,8 +546,8 @@ int verify_password (char *password)
("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));
+ ("Caractère interdit trouvé dans le nom du compte (%d%s caractère).\n",
+ i + 1, makeordinal (i + 1));
}
else
{
@@ -563,8 +555,8 @@ int verify_password (char *password)
("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));
+ ("Illegal character found in the password (%d%s character).\n",
+ i + 1, makeordinal (i + 1));
}
return 0;
}
@@ -577,16 +569,14 @@ int verify_password (char *password)
printf
("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);
+ ("Nom du compte trop court. Entrez un nom de compte de 4-23 caractères.\n");
}
else
{
printf
("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);
+ ("Account name is too short. Please input an account name of 4-23 bytes.\n");
}
return 0;
}
@@ -598,16 +588,14 @@ int verify_password (char *password)
printf
("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);
+ ("Mot de passe trop long. Entrez un mot de passe de 4-23 caractères.\n");
}
else
{
printf
("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);
+ ("Password is too long. Please input a password of 4-23 bytes.\n");
}
return 0;
}
@@ -772,11 +760,11 @@ void display_help (char *param, int language)
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)
@@ -1626,8 +1614,7 @@ int addaccount (char *param, int emailflag)
("Entrez un nom de compte, un sexe et un mot de passe svp.\n");
printf ("<exemple> add nomtest Male motdepassetest\n");
ladmin_log
- ("Nombre incorrect de paramètres pour créer un compte (commande 'add')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour créer un compte (commande 'add').\n");
}
else
{
@@ -1635,8 +1622,7 @@ int addaccount (char *param, int emailflag)
("Please input an account name, a sex and a password.\n");
printf ("<example> add testname Male testpass\n");
ladmin_log
- ("Incomplete parameters to create an account ('add' command)."
- RETCODE);
+ ("Incomplete parameters to create an account ('add' command).\n");
}
return 136;
}
@@ -1656,8 +1642,7 @@ int addaccount (char *param, int emailflag)
printf
("<exemple> create nomtest Male mo@mail.com motdepassetest\n");
ladmin_log
- ("Nombre incorrect de paramètres pour créer un compte (commande 'create')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour créer un compte (commande 'create').\n");
}
else
{
@@ -1666,8 +1651,7 @@ int addaccount (char *param, int emailflag)
printf
("<example> create testname Male my@mail.com testpass\n");
ladmin_log
- ("Incomplete parameters to create an account ('create' command)."
- RETCODE);
+ ("Incomplete parameters to create an account ('create' command).\n");
}
return 136;
}
@@ -1681,10 +1665,10 @@ int addaccount (char *param, int emailflag)
if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_", name[i]) == NULL) {
if (defaultlanguage == 'F') {
printf("Caractère interdit (%c) trouvé dans le nom du compte (%d%s caractère).\n", name[i], i+1, makeordinal(i+1));
- ladmin_log("Caractère interdit (%c) trouvé dans le nom du compte (%d%s caractère)." RETCODE, name[i], i+1, makeordinal(i+1));
+ ladmin_log("Caractère interdit (%c) trouvé dans le nom du compte (%d%s caractère).\n", name[i], i+1, makeordinal(i+1));
} else {
printf("Illegal character (%c) found in the account name (%d%s character).\n", name[i], i+1, makeordinal(i+1));
- ladmin_log("Illegal character (%c) found in the account name (%d%s character)." RETCODE, name[i], i+1, makeordinal(i+1));
+ ladmin_log("Illegal character (%c) found in the account name (%d%s character).\n", name[i], i+1, makeordinal(i+1));
}
return 101;
}
@@ -1696,13 +1680,13 @@ int addaccount (char *param, int emailflag)
if (defaultlanguage == 'F')
{
printf ("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex);
- ladmin_log ("Sexe incorrect [%s]. Entrez M ou F svp." RETCODE,
+ ladmin_log ("Sexe incorrect [%s]. Entrez M ou F svp.\n",
sex);
}
else
{
printf ("Illegal gender [%s]. Please input M or F.\n", sex);
- ladmin_log ("Illegal gender [%s]. Please input M or F." RETCODE,
+ ladmin_log ("Illegal gender [%s]. Please input M or F.\n",
sex);
}
return 103;
@@ -1715,16 +1699,16 @@ int addaccount (char *param, int emailflag)
printf ("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);
+ ("Email trop courte [%s]. Entrez une e-mail valide svp.\n",
+ email);
}
else
{
printf ("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);
+ ("Email is too short [%s]. Please input a valid e-mail.\n",
+ email);
}
return 109;
}
@@ -1736,8 +1720,8 @@ int addaccount (char *param, int emailflag)
("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);
+ ("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n",
+ email);
}
else
{
@@ -1745,8 +1729,8 @@ int addaccount (char *param, int emailflag)
("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);
+ ("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n",
+ email);
}
return 109;
}
@@ -1756,15 +1740,15 @@ int addaccount (char *param, int emailflag)
{
printf ("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
{
printf ("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;
}
@@ -1780,12 +1764,11 @@ int addaccount (char *param, int emailflag)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour créer un compte."
- RETCODE);
+ ("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;
@@ -1825,8 +1808,7 @@ int banaddaccount (char *param)
(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
printf (" 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);
+ ("Nombre incorrect de paramètres pour modifier la fin de ban d'un compte (commande 'banadd').\n");
}
else
{
@@ -1836,8 +1818,7 @@ int banaddaccount (char *param)
(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
printf (" and 6 years at the same time.\n");
ladmin_log
- ("Incomplete parameters to modify the ban date/time of an account ('banadd' command)."
- RETCODE);
+ ("Incomplete parameters to modify the ban date/time of an account ('banadd' command).\n");
}
return 136;
}
@@ -1942,8 +1923,7 @@ int banaddaccount (char *param)
(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
printf (" et 6 ans dans le même temps.\n");
ladmin_log
- ("Aucun ajustement n'est pas un ajustement (commande 'banadd')."
- RETCODE);
+ ("Aucun ajustement n'est pas un ajustement (commande 'banadd').\n");
}
else
{
@@ -1961,8 +1941,7 @@ int banaddaccount (char *param)
(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
printf (" and 6 years at the same time.\n");
ladmin_log
- ("No adjustment isn't an adjustment ('banadd' command)."
- RETCODE);
+ ("No adjustment isn't an adjustment ('banadd' command).\n");
}
return 137;
}
@@ -1973,16 +1952,14 @@ int banaddaccount (char *param)
printf
("Entrez un ajustement d'années correct (de -127 à 127), svp.\n");
ladmin_log
- ("Ajustement de l'année hors norme (commande 'banadd')."
- RETCODE);
+ ("Ajustement de l'année hors norme (commande 'banadd').\n");
}
else
{
printf
("Please give a correct adjustment for the years (from -127 to 127).\n");
ladmin_log
- ("Abnormal adjustement for the year ('banadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the year ('banadd' command).\n");
}
return 137;
}
@@ -1992,16 +1969,14 @@ int banaddaccount (char *param)
{
printf
("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
{
printf
("Please give a correct adjustment for the months (from -255 to 255).\n");
ladmin_log
- ("Abnormal adjustement for the month ('banadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the month ('banadd' command).\n");
}
return 137;
}
@@ -2011,16 +1986,14 @@ int banaddaccount (char *param)
{
printf
("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
{
printf
("Please give a correct adjustment for the days (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the days ('banadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the days ('banadd' command).\n");
}
return 137;
}
@@ -2031,16 +2004,14 @@ int banaddaccount (char *param)
printf
("Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n");
ladmin_log
- ("Ajustement des heures hors norme (commande 'banadd')."
- RETCODE);
+ ("Ajustement des heures hors norme (commande 'banadd').\n");
}
else
{
printf
("Please give a correct adjustment for the hours (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the hours ('banadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the hours ('banadd' command).\n");
}
return 137;
}
@@ -2051,16 +2022,14 @@ int banaddaccount (char *param)
printf
("Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n");
ladmin_log
- ("Ajustement des minutes hors norme (commande 'banadd')."
- RETCODE);
+ ("Ajustement des minutes hors norme (commande 'banadd').\n");
}
else
{
printf
("Please give a correct adjustment for the minutes (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the minutes ('banadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the minutes ('banadd' command).\n");
}
return 137;
}
@@ -2071,16 +2040,14 @@ int banaddaccount (char *param)
printf
("Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n");
ladmin_log
- ("Ajustement des secondes hors norme (commande 'banadd')."
- RETCODE);
+ ("Ajustement des secondes hors norme (commande 'banadd').\n");
}
else
{
printf
("Please give a correct adjustment for the seconds (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the seconds ('banadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the seconds ('banadd' command).\n");
}
return 137;
}
@@ -2088,13 +2055,11 @@ int banaddaccount (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour modifier la date d'un bannissement."
- RETCODE);
+ ("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;
@@ -2143,8 +2108,7 @@ int bansetaccountsub (char *name, char *date, char *time)
printf
("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);
+ ("Format incorrect pour la date/heure (commande'banset' ou 'ban').\n");
}
else
{
@@ -2153,8 +2117,7 @@ int bansetaccountsub (char *name, char *date, char *time)
printf
("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);
+ ("Invalid format for the date/time ('banset' or 'ban' command).\n");
}
return 102;
}
@@ -2179,16 +2142,14 @@ int bansetaccountsub (char *name, char *date, char *time)
{
printf ("Entrez un mois correct svp (entre 1 et 12).\n");
ladmin_log
- ("Mois incorrect pour la date (command 'banset' ou 'ban')."
- RETCODE);
+ ("Mois incorrect pour la date (command 'banset' ou 'ban').\n");
}
else
{
printf
("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);
+ ("Invalid month for the date ('banset' or 'ban' command).\n");
}
return 102;
}
@@ -2199,16 +2160,14 @@ int bansetaccountsub (char *name, char *date, char *time)
{
printf ("Entrez un jour correct svp (entre 1 et 31).\n");
ladmin_log
- ("Jour incorrect pour la date (command 'banset' ou 'ban')."
- RETCODE);
+ ("Jour incorrect pour la date (command 'banset' ou 'ban').\n");
}
else
{
printf
("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);
+ ("Invalid day for the date ('banset' or 'ban' command).\n");
}
return 102;
}
@@ -2221,8 +2180,7 @@ int bansetaccountsub (char *name, char *date, char *time)
("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);
+ ("Jour incorrect pour ce mois correspondant (command 'banset' ou 'ban').\n");
}
else
{
@@ -2230,8 +2188,7 @@ int bansetaccountsub (char *name, char *date, char *time)
("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);
+ ("Invalid day for this month ('banset' or 'ban' command).\n");
}
return 102;
}
@@ -2241,16 +2198,14 @@ int bansetaccountsub (char *name, char *date, char *time)
{
printf ("Entrez une heure correcte svp (entre 0 et 23).\n");
ladmin_log
- ("Heure incorrecte pour l'heure (command 'banset' ou 'ban')."
- RETCODE);
+ ("Heure incorrecte pour l'heure (command 'banset' ou 'ban').\n");
}
else
{
printf
("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);
+ ("Invalid hour for the time ('banset' or 'ban' command).\n");
}
return 102;
}
@@ -2261,16 +2216,14 @@ int bansetaccountsub (char *name, char *date, char *time)
printf
("Entrez des minutes correctes svp (entre 0 et 59).\n");
ladmin_log
- ("Minute incorrecte pour l'heure (command 'banset' ou 'ban')."
- RETCODE);
+ ("Minute incorrecte pour l'heure (command 'banset' ou 'ban').\n");
}
else
{
printf
("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);
+ ("Invalid minute for the time ('banset' or 'ban' command).\n");
}
return 102;
}
@@ -2281,16 +2234,14 @@ int bansetaccountsub (char *name, char *date, char *time)
printf
("Entrez des secondes correctes svp (entre 0 et 59).\n");
ladmin_log
- ("Seconde incorrecte pour l'heure (command 'banset' ou 'ban')."
- RETCODE);
+ ("Seconde incorrecte pour l'heure (command 'banset' ou 'ban').\n");
}
else
{
printf
("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);
+ ("Invalid second for the time ('banset' or 'ban' command).\n");
}
return 102;
}
@@ -2311,8 +2262,7 @@ int bansetaccountsub (char *name, char *date, char *time)
("Entrez une date et une heure svp (format: aaaa/mm/jj hh:mm:ss).\n");
printf
("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
{
@@ -2321,8 +2271,7 @@ int bansetaccountsub (char *name, char *date, char *time)
("Please input a date and a time (format: yyyy/mm/dd hh:mm:ss).\n");
printf
("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;
}
@@ -2331,12 +2280,11 @@ int bansetaccountsub (char *name, char *date, char *time)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour fixer un ban."
- RETCODE);
+ ("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;
@@ -2374,8 +2322,7 @@ int banaccount (char *param)
printf (" unban/unbanish <nom du compte>\n");
printf (" 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);
+ ("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban').\n");
}
else
{
@@ -2389,8 +2336,7 @@ int banaccount (char *param)
printf (" unban/unbanish <account name>\n");
printf (" Default time [hh:mm:ss]: 23:59:59.\n");
ladmin_log
- ("Incomplete parameters to set a ban ('banset' or 'ban' command)."
- RETCODE);
+ ("Incomplete parameters to set a ban ('banset' or 'ban' command).\n");
}
return 136;
}
@@ -2424,8 +2370,7 @@ int bansetaccount (char *param)
printf (" unban/unbanish <nom du compte>\n");
printf (" 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);
+ ("Nombre incorrect de paramètres pour fixer un ban (commande 'banset' ou 'ban').\n");
}
else
{
@@ -2439,8 +2384,7 @@ int bansetaccount (char *param)
printf (" unban/unbanish <account name>\n");
printf (" Default time [hh:mm:ss]: 23:59:59.\n");
ladmin_log
- ("Incomplete parameters to set a ban ('banset' or 'ban' command)."
- RETCODE);
+ ("Incomplete parameters to set a ban ('banset' or 'ban' command).\n");
}
return 136;
}
@@ -2476,8 +2420,7 @@ int unbanaccount (char *param)
printf (" unban/unbanish <nom du compte>\n");
printf (" 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);
+ ("Nombre incorrect de paramètres pour fixer un ban (commande 'unban').\n");
}
else
{
@@ -2491,8 +2434,7 @@ int unbanaccount (char *param)
printf (" unban/unbanish <account name>\n");
printf (" Default time [hh:mm:ss]: 23:59:59.\n");
ladmin_log
- ("Incomplete parameters to set a ban ('unban' command)."
- RETCODE);
+ ("Incomplete parameters to set a ban ('unban' command).\n");
}
return 136;
}
@@ -2520,16 +2462,14 @@ int checkaccount (char *param)
printf ("Entrez un nom de compte svp.\n");
printf ("<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);
+ ("Nombre incorrect de paramètres pour tester le mot d'un passe d'un compte (commande 'check').\n");
}
else
{
printf ("Please input an account name.\n");
printf ("<example> check testname password\n");
ladmin_log
- ("Incomplete parameters to check the password of an account ('check' command)."
- RETCODE);
+ ("Incomplete parameters to check the password of an account ('check' command).\n");
}
return 136;
}
@@ -2550,12 +2490,11 @@ int checkaccount (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour test un mot de passe."
- RETCODE);
+ ("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;
@@ -2589,16 +2528,14 @@ int delaccount (char *param)
printf ("Entrez un nom de compte svp.\n");
printf ("<exemple> del nomtestasupprimer\n");
ladmin_log
- ("Aucun nom donné pour supprimer un compte (commande 'delete')."
- RETCODE);
+ ("Aucun nom donné pour supprimer un compte (commande 'delete').\n");
}
else
{
printf ("Please input an account name.\n");
printf ("<example> del testnametodelete\n");
ladmin_log
- ("No name given to delete an account ('delete' command)."
- RETCODE);
+ ("No name given to delete an account ('delete' command).\n");
}
return 136;
}
@@ -2631,14 +2568,12 @@ int delaccount (char *param)
{
printf ("Suppression annulée.\n");
ladmin_log
- ("Suppression annulée par l'utilisateur (commande 'delete')."
- RETCODE);
+ ("Suppression annulée par l'utilisateur (commande 'delete').\n");
}
else
{
printf ("Deletion canceled.\n");
- ladmin_log ("Deletion canceled by user ('delete' command)."
- RETCODE);
+ ladmin_log ("Deletion canceled by user ('delete' command).\n");
}
return 121;
}
@@ -2646,12 +2581,11 @@ int delaccount (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour détruire un compte."
- RETCODE);
+ ("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;
@@ -2681,16 +2615,14 @@ int changeemail (char *param)
printf ("Entrez un nom de compte et une email svp.\n");
printf ("<exemple> email testname nouveauemail\n");
ladmin_log
- ("Nombre incorrect de paramètres pour changer l'email d'un compte (commande 'email')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour changer l'email d'un compte (commande 'email').\n");
}
else
{
printf ("Please input an account name and an email.\n");
printf ("<example> email testname newemail\n");
ladmin_log
- ("Incomplete parameters to change the email of an account ('email' command)."
- RETCODE);
+ ("Incomplete parameters to change the email of an account ('email' command).\n");
}
return 136;
}
@@ -2707,16 +2639,16 @@ int changeemail (char *param)
printf ("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);
+ ("Email trop courte [%s]. Entrez une e-mail valide svp.\n",
+ email);
}
else
{
printf ("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);
+ ("Email is too short [%s]. Please input a valid e-mail.\n",
+ email);
}
return 109;
}
@@ -2728,8 +2660,8 @@ int changeemail (char *param)
("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);
+ ("Email trop longue [%s]. Entrez une e-mail de 39 caractères maximum svp.\n",
+ email);
}
else
{
@@ -2737,8 +2669,8 @@ int changeemail (char *param)
("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);
+ ("Email is too long [%s]. Please input an e-mail with 39 bytes at the most.\n",
+ email);
}
return 109;
}
@@ -2748,15 +2680,15 @@ int changeemail (char *param)
{
printf ("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
{
printf ("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;
}
@@ -2764,12 +2696,11 @@ int changeemail (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour changer une email."
- RETCODE);
+ ("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;
@@ -2789,14 +2720,12 @@ int getlogincount (void)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour obtenir le nombre de joueurs en jeu."
- RETCODE);
+ ("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);
+ ("Request to login-server to obtain the # of online players.\n");
}
WFIFOW (login_fd, 0) = 0x7938;
@@ -2826,16 +2755,14 @@ int changegmlevel (char *param)
printf ("Entrez un nom de compte et un niveau de GM svp.\n");
printf ("<exemple> gm nomtest 80\n");
ladmin_log
- ("Nombre incorrect de paramètres pour changer le Niveau de GM d'un compte (commande 'gm')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour changer le Niveau de GM d'un compte (commande 'gm').\n");
}
else
{
printf ("Please input an account name and a GM level.\n");
printf ("<example> gm testname 80\n");
ladmin_log
- ("Incomplete parameters to change the GM level of an account ('gm' command)."
- RETCODE);
+ ("Incomplete parameters to change the GM level of an account ('gm' command).\n");
}
return 136;
}
@@ -2853,8 +2780,8 @@ int changegmlevel (char *param)
("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);
+ ("Niveau de GM incorrect [%d]. La valeur peut être de 0 à 99.\n",
+ GM_level);
}
else
{
@@ -2862,8 +2789,8 @@ int changegmlevel (char *param)
("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);
+ ("Illegal GM level [%d]. The value can be from 0 to 99.\n",
+ GM_level);
}
return 103;
}
@@ -2871,12 +2798,11 @@ int changegmlevel (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour changer un niveau de GM."
- RETCODE);
+ ("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;
@@ -2907,16 +2833,14 @@ int idaccount (char *param)
printf ("Entrez un nom de compte svp.\n");
printf ("<exemple> id nomtest\n");
ladmin_log
- ("Aucun nom donné pour rechecher l'id d'un compte (commande 'id')."
- RETCODE);
+ ("Aucun nom donné pour rechecher l'id d'un compte (commande 'id').\n");
}
else
{
printf ("Please input an account name.\n");
printf ("<example> id testname\n");
ladmin_log
- ("No name given to search an account id ('id' command)."
- RETCODE);
+ ("No name given to search an account id ('id' command).\n");
}
return 136;
}
@@ -2929,12 +2853,11 @@ 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);
+ ("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;
@@ -2956,14 +2879,12 @@ int infoaccount (int account_id)
{
printf ("Entrez un id ayant une valeur positive svp.\n");
ladmin_log
- ("Une valeur négative a été donné pour trouver le compte."
- RETCODE);
+ ("Une valeur négative a été donné pour trouver le compte.\n");
}
else
{
printf ("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;
}
@@ -2971,14 +2892,12 @@ int infoaccount (int account_id)
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);
+ ("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);
+ ("Request to login-server to obtain information about an account (by its id).\n");
}
WFIFOW (login_fd, 0) = 0x7954;
@@ -3007,7 +2926,7 @@ int sendbroadcast (short type, char *message)
{
printf ("<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
{
@@ -3020,7 +2939,7 @@ int sendbroadcast (short type, char *message)
{
printf ("<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;
}
@@ -3047,14 +2966,14 @@ int changelanguage (char *language)
printf ("Entrez une langue svp.\n");
printf ("<exemple> language english\n");
printf (" language français\n");
- ladmin_log ("La langue est vide (commande 'language')." RETCODE);
+ ladmin_log ("La langue est vide (commande 'language').\n");
}
else
{
printf ("Please input a language.\n");
printf ("<example> language english\n");
printf (" language français\n");
- ladmin_log ("The language is void ('language' command)." RETCODE);
+ ladmin_log ("The language is void ('language' command).\n");
}
return 136;
}
@@ -3066,13 +2985,12 @@ int changelanguage (char *language)
if (defaultlanguage == 'F')
{
printf ("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
{
printf ("Displaying language changed to English.\n");
- ladmin_log ("Displaying language changed to English." RETCODE);
+ ladmin_log ("Displaying language changed to English.\n");
}
}
else
@@ -3082,15 +3000,13 @@ int changelanguage (char *language)
printf
("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);
+ ("Langue non paramétrée (Français ou English nécessaire).\n");
}
else
{
printf
("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");
}
}
@@ -3151,14 +3067,14 @@ 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);
+ ("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);
+ ("Request to login-server to obtain the list of accounts from %d to %d.\n",
+ list_first, list_last);
}
WFIFOW (login_fd, 0) = 0x7920;
@@ -3226,16 +3142,14 @@ int changememo (char *param)
printf ("Entrez un nom de compte et un mémo svp.\n");
printf ("<exemple> memo nomtest nouveau memo\n");
ladmin_log
- ("Nombre incorrect de paramètres pour changer le mémo d'un compte (commande 'email')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour changer le mémo d'un compte (commande 'email').\n");
}
else
{
printf ("Please input an account name and a memo.\n");
printf ("<example> memo testname new memo\n");
ladmin_log
- ("Incomplete parameters to change the memo of an account ('email' command)."
- RETCODE);
+ ("Incomplete parameters to change the memo of an account ('email' command).\n");
}
return 136;
}
@@ -3252,16 +3166,16 @@ int changememo (char *param)
printf ("Mémo trop long (%d caractères).\n", strlen (memo));
printf ("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));
+ ("Mémo trop long (%d caractères). Entrez un mémo de 254 caractères maximum svp.\n",
+ strlen (memo));
}
else
{
printf ("Memo is too long (%d characters).\n", strlen (memo));
printf ("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));
+ ("Email is too long (%d characters). Please input a memo of 254 bytes at the maximum.\n",
+ strlen (memo));
}
return 102;
}
@@ -3269,12 +3183,11 @@ int changememo (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour changer un mémo."
- RETCODE);
+ ("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;
@@ -3299,26 +3212,22 @@ int nameaccount (int id)
{
printf ("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);
+ ("Id négatif donné pour rechecher le nom d'un compte (commande 'name').\n");
}
else
{
printf ("Please input a positive value for the id.\n");
ladmin_log
- ("Negativ id given to search an account name ('name' command)."
- RETCODE);
+ ("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);
+ ("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;
@@ -3348,16 +3257,14 @@ int changepasswd (char *param)
printf ("Entrez un nom de compte svp.\n");
printf ("<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);
+ ("Nombre incorrect de paramètres pour changer le mot d'un passe d'un compte (commande 'password').\n");
}
else
{
printf ("Please input an account name.\n");
printf ("<example> passwd testname newpassword\n");
ladmin_log
- ("Incomplete parameters to change the password of an account ('password' command)."
- RETCODE);
+ ("Incomplete parameters to change the password of an account ('password' command).\n");
}
return 136;
}
@@ -3378,12 +3285,11 @@ int changepasswd (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour changer un mot de passe."
- RETCODE);
+ ("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;
@@ -3408,16 +3314,14 @@ int reloadGM (void)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Demande de recharger le fichier de configuration des GM envoyée."
- RETCODE);
+ ("Demande de recharger le fichier de configuration des GM envoyée.\n");
printf
("Demande de recharger le fichier de configuration des GM envoyée.\n");
printf ("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");
printf ("Request to reload the GM configuration file sended.\n");
printf ("Check the actual GM accounts (after reloading):\n");
}
@@ -3445,16 +3349,14 @@ int changesex (char *param)
printf ("Entrez un nom de compte et un sexe svp.\n");
printf ("<exemple> sex nomtest Male\n");
ladmin_log
- ("Nombre incorrect de paramètres pour changer le sexe d'un compte (commande 'sex')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour changer le sexe d'un compte (commande 'sex').\n");
}
else
{
printf ("Please input an account name and a sex.\n");
printf ("<example> sex testname Male\n");
ladmin_log
- ("Incomplete parameters to change the sex of an account ('sex' command)."
- RETCODE);
+ ("Incomplete parameters to change the sex of an account ('sex' command).\n");
}
return 136;
}
@@ -3470,13 +3372,13 @@ int changesex (char *param)
if (defaultlanguage == 'F')
{
printf ("Sexe incorrect [%s]. Entrez M ou F svp.\n", sex);
- ladmin_log ("Sexe incorrect [%s]. Entrez M ou F svp." RETCODE,
+ ladmin_log ("Sexe incorrect [%s]. Entrez M ou F svp.\n",
sex);
}
else
{
printf ("Illegal gender [%s]. Please input M or F.\n", sex);
- ladmin_log ("Illegal gender [%s]. Please input M or F." RETCODE,
+ ladmin_log ("Illegal gender [%s]. Please input M or F.\n",
sex);
}
return 103;
@@ -3485,12 +3387,11 @@ int changesex (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour changer un sexe."
- RETCODE);
+ ("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;
@@ -3542,8 +3443,7 @@ int changestatesub (char *name, int state, char *error_message7)
printf (" block <nom compte>\n");
printf (" unblock <nom compte>\n");
ladmin_log
- ("Valeur incorrecte pour le statut d'un compte (commande 'state', 'block' ou 'unblock')."
- RETCODE);
+ ("Valeur incorrecte pour le statut d'un compte (commande 'state', 'block' ou 'unblock').\n");
}
else
{
@@ -3552,8 +3452,7 @@ int changestatesub (char *name, int state, char *error_message7)
printf (" block <account name>\n");
printf (" unblock <account name>\n");
ladmin_log
- ("Invalid value for the state of an account ('state', 'block' or 'unblock' command)."
- RETCODE);
+ ("Invalid value for the state of an account ('state', 'block' or 'unblock' command).\n");
}
return 151;
}
@@ -3576,16 +3475,14 @@ int changestatesub (char *name, int state, char *error_message7)
printf
("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);
+ ("Message d'erreur trop court. Entrez un message de 1-19 caractères.\n");
}
else
{
printf
("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);
+ ("Error message is too short. Please input a message of 1-19 bytes.\n");
}
return 102;
}
@@ -3596,16 +3493,14 @@ int changestatesub (char *name, int state, char *error_message7)
printf
("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);
+ ("Message d'erreur trop long. Entrez un message de 1-19 caractères.\n");
}
else
{
printf
("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);
+ ("Error message is too long. Please input a message of 1-19 bytes.\n");
}
return 102;
}
@@ -3614,12 +3509,11 @@ int changestatesub (char *name, int state, char *error_message7)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour changer un statut."
- RETCODE);
+ ("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;
@@ -3657,8 +3551,7 @@ int changestate (char *param)
printf (" block <nom compte>\n");
printf (" unblock <nom compte>\n");
ladmin_log
- ("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'state')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'state').\n");
}
else
{
@@ -3668,8 +3561,7 @@ int changestate (char *param)
printf (" block <account name>\n");
printf (" unblock <account name>\n");
ladmin_log
- ("Incomplete parameters to change the state of an account ('state' command)."
- RETCODE);
+ ("Incomplete parameters to change the state of an account ('state' command).\n");
}
return 136;
}
@@ -3699,8 +3591,7 @@ int unblockaccount (char *param)
printf (" block <nom compte>\n");
printf (" unblock <nom compte>\n");
ladmin_log
- ("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'unblock')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'unblock').\n");
}
else
{
@@ -3710,8 +3601,7 @@ int unblockaccount (char *param)
printf (" block <account name>\n");
printf (" unblock <account name>\n");
ladmin_log
- ("Incomplete parameters to change the state of an account ('unblock' command)."
- RETCODE);
+ ("Incomplete parameters to change the state of an account ('unblock' command).\n");
}
return 136;
}
@@ -3741,8 +3631,7 @@ int blockaccount (char *param)
printf (" block <nom compte>\n");
printf (" unblock <nom compte>\n");
ladmin_log
- ("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'block')."
- RETCODE);
+ ("Nombre incorrect de paramètres pour changer le statut d'un compte (commande 'block').\n");
}
else
{
@@ -3752,8 +3641,7 @@ int blockaccount (char *param)
printf (" block <account name>\n");
printf (" unblock <account name>\n");
ladmin_log
- ("Incomplete parameters to change the state of an account ('block' command)."
- RETCODE);
+ ("Incomplete parameters to change the state of an account ('block' command).\n");
}
return 136;
}
@@ -3787,8 +3675,7 @@ int timeaddaccount (char *param)
(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
printf (" 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);
+ ("Nombre incorrect de paramètres pour modifier une date limite d'utilisation (commande 'timeadd').\n");
}
else
{
@@ -3798,8 +3685,7 @@ int timeaddaccount (char *param)
(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
printf (" and 6 years at the same time.\n");
ladmin_log
- ("Incomplete parameters to modify a limit time ('timeadd' command)."
- RETCODE);
+ ("Incomplete parameters to modify a limit time ('timeadd' command).\n");
}
return 136;
}
@@ -3904,8 +3790,7 @@ int timeaddaccount (char *param)
(" Cette exemple ajoute 1 mois et 1 seconde, et soustrait 2 minutes\n");
printf (" et 6 ans dans le même temps.\n");
ladmin_log
- ("Aucun ajustement n'est pas un ajustement (commande 'timeadd')."
- RETCODE);
+ ("Aucun ajustement n'est pas un ajustement (commande 'timeadd').\n");
}
else
{
@@ -3923,8 +3808,7 @@ int timeaddaccount (char *param)
(" this example adds 1 month and 1 second, and substracts 2 minutes\n");
printf (" and 6 years at the same time.\n");
ladmin_log
- ("No adjustment isn't an adjustment ('timeadd' command)."
- RETCODE);
+ ("No adjustment isn't an adjustment ('timeadd' command).\n");
}
return 137;
}
@@ -3935,16 +3819,14 @@ int timeaddaccount (char *param)
printf
("Entrez un ajustement d'années correct (de -127 à 127), svp.\n");
ladmin_log
- ("Ajustement de l'année hors norme ('timeadd' command)."
- RETCODE);
+ ("Ajustement de l'année hors norme ('timeadd' command).\n");
}
else
{
printf
("Please give a correct adjustment for the years (from -127 to 127).\n");
ladmin_log
- ("Abnormal adjustement for the year ('timeadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the year ('timeadd' command).\n");
}
return 137;
}
@@ -3954,16 +3836,14 @@ int timeaddaccount (char *param)
{
printf
("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
{
printf
("Please give a correct adjustment for the months (from -255 to 255).\n");
ladmin_log
- ("Abnormal adjustement for the month ('timeadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the month ('timeadd' command).\n");
}
return 137;
}
@@ -3973,16 +3853,14 @@ int timeaddaccount (char *param)
{
printf
("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
{
printf
("Please give a correct adjustment for the days (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the days ('timeadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the days ('timeadd' command).\n");
}
return 137;
}
@@ -3993,16 +3871,14 @@ int timeaddaccount (char *param)
printf
("Entrez un ajustement d'heures correct (de -32767 à 32767), svp.\n");
ladmin_log
- ("Ajustement des heures hors norme ('timeadd' command)."
- RETCODE);
+ ("Ajustement des heures hors norme ('timeadd' command).\n");
}
else
{
printf
("Please give a correct adjustment for the hours (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the hours ('timeadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the hours ('timeadd' command).\n");
}
return 137;
}
@@ -4013,16 +3889,14 @@ int timeaddaccount (char *param)
printf
("Entrez un ajustement de minutes correct (de -32767 à 32767), svp.\n");
ladmin_log
- ("Ajustement des minutes hors norme ('timeadd' command)."
- RETCODE);
+ ("Ajustement des minutes hors norme ('timeadd' command).\n");
}
else
{
printf
("Please give a correct adjustment for the minutes (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the minutes ('timeadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the minutes ('timeadd' command).\n");
}
return 137;
}
@@ -4033,16 +3907,14 @@ int timeaddaccount (char *param)
printf
("Entrez un ajustement de secondes correct (de -32767 à 32767), svp.\n");
ladmin_log
- ("Ajustement des secondes hors norme ('timeadd' command)."
- RETCODE);
+ ("Ajustement des secondes hors norme ('timeadd' command).\n");
}
else
{
printf
("Please give a correct adjustment for the seconds (from -32767 to 32767).\n");
ladmin_log
- ("Abnormal adjustement for the seconds ('timeadd' command)."
- RETCODE);
+ ("Abnormal adjustement for the seconds ('timeadd' command).\n");
}
return 137;
}
@@ -4050,13 +3922,11 @@ int timeaddaccount (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour modifier une date limite d'utilisation."
- RETCODE);
+ ("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;
@@ -4103,8 +3973,7 @@ int timesetaccount (char *param)
(" timeset <nom_du_compte> 0 (0 = illimité)\n");
printf (" 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);
+ ("Nombre incorrect de paramètres pour fixer une date limite d'utilisation (commande 'timeset').\n");
}
else
{
@@ -4115,8 +3984,7 @@ int timesetaccount (char *param)
(" timeset <account_name> 0 (0 = unlimited)\n");
printf (" Default time [hh:mm:ss]: 23:59:59.\n");
ladmin_log
- ("Incomplete parameters to set a limit time ('timeset' command)."
- RETCODE);
+ ("Incomplete parameters to set a limit time ('timeset' command).\n");
}
return 136;
}
@@ -4140,16 +4008,14 @@ int timesetaccount (char *param)
printf
("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);
+ ("Format incorrect pour la date/heure ('timeset' command).\n");
}
else
{
printf
("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);
+ ("Invalid format for the date/time ('timeset' command).\n");
}
return 102;
}
@@ -4173,15 +4039,13 @@ int timesetaccount (char *param)
if (defaultlanguage == 'F')
{
printf ("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
{
printf
("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;
}
@@ -4191,15 +4055,13 @@ int timesetaccount (char *param)
if (defaultlanguage == 'F')
{
printf ("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
{
printf
("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;
}
@@ -4212,16 +4074,14 @@ int timesetaccount (char *param)
("Entrez un jour correct en fonction du mois (%d) svp.\n",
month);
ladmin_log
- ("Jour incorrect pour ce mois correspondant ('timeset' command)."
- RETCODE);
+ ("Jour incorrect pour ce mois correspondant ('timeset' command).\n");
}
else
{
printf
("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;
}
@@ -4231,15 +4091,13 @@ int timesetaccount (char *param)
{
printf ("Entrez une heure correcte svp (entre 0 et 23).\n");
ladmin_log
- ("Heure incorrecte pour l'heure ('timeset' command)."
- RETCODE);
+ ("Heure incorrecte pour l'heure ('timeset' command).\n");
}
else
{
printf
("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;
}
@@ -4250,15 +4108,13 @@ int timesetaccount (char *param)
printf
("Entrez des minutes correctes svp (entre 0 et 59).\n");
ladmin_log
- ("Minute incorrecte pour l'heure ('timeset' command)."
- RETCODE);
+ ("Minute incorrecte pour l'heure ('timeset' command).\n");
}
else
{
printf
("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;
}
@@ -4269,15 +4125,13 @@ int timesetaccount (char *param)
printf
("Entrez des secondes correctes svp (entre 0 et 59).\n");
ladmin_log
- ("Seconde incorrecte pour l'heure ('timeset' command)."
- RETCODE);
+ ("Seconde incorrecte pour l'heure ('timeset' command).\n");
}
else
{
printf
("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;
}
@@ -4296,14 +4150,14 @@ int timesetaccount (char *param)
printf ("Date incorrecte.\n");
printf
("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
{
printf ("Invalid date.\n");
printf
("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;
}
@@ -4312,12 +4166,11 @@ int timesetaccount (char *param)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Envoi d'un requête au serveur de logins pour fixer une date limite d'utilisation."
- RETCODE);
+ ("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;
@@ -4347,14 +4200,13 @@ int whoaccount (char *param)
{
printf ("Entrez un nom de compte svp.\n");
printf ("<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
{
printf ("Please input an account name.\n");
printf ("<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;
}
@@ -4366,14 +4218,12 @@ 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);
+ ("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);
+ ("Request to login-server to obtain information about an account (by its name).\n");
}
WFIFOW (login_fd, 0) = 0x7952;
@@ -4391,10 +4241,9 @@ int checkloginversion (void)
{
if (defaultlanguage == 'F')
ladmin_log
- ("Envoi d'un requête au serveur de logins pour obtenir sa version."
- RETCODE);
+ ("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);
@@ -4530,12 +4379,12 @@ int prompt (void)
{
if (defaultlanguage == 'F')
{
- ladmin_log ("Commande: '%s' (sans paramètre)" RETCODE,
+ ladmin_log ("Commande: '%s' (sans paramètre)\n",
command, parameters);
}
else
{
- ladmin_log ("Command: '%s' (without parameters)" RETCODE,
+ ladmin_log ("Command: '%s' (without parameters)\n",
command, parameters);
}
}
@@ -4543,12 +4392,12 @@ int prompt (void)
{
if (defaultlanguage == 'F')
{
- ladmin_log ("Commande: '%s', paramètres: '%s'" RETCODE,
+ ladmin_log ("Commande: '%s', paramètres: '%s'\n",
command, parameters);
}
else
{
- ladmin_log ("Command: '%s', parameters: '%s'" RETCODE,
+ ladmin_log ("Command: '%s', parameters: '%s'\n",
command, parameters);
}
}
@@ -4721,12 +4570,12 @@ int prompt (void)
if (defaultlanguage == 'F')
{
printf ("Commande inconnue [%s].\n", buf);
- ladmin_log ("Commande inconnue [%s]." RETCODE, buf);
+ ladmin_log ("Commande inconnue [%s].\n", buf);
}
else
{
printf ("Unknown command [%s].\n", buf);
- ladmin_log ("Unknown command [%s]." RETCODE, buf);
+ ladmin_log ("Unknown command [%s].\n", buf);
}
}
}
@@ -4749,8 +4598,8 @@ void parse_fromlogin (int fd)
("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);
+ ("Impossible de se connecter au serveur de login [%s:%d] !\n",
+ loginserverip, loginserverport);
}
else
{
@@ -4758,8 +4607,8 @@ void parse_fromlogin (int fd)
("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);
+ ("Impossible to have a connection with the login-server [%s:%d] !\n",
+ loginserverip, loginserverport);
}
close (fd);
delete_session (fd);
@@ -4786,8 +4635,7 @@ void parse_fromlogin (int fd)
(" - système d'administration non activé, ou\n");
printf (" - 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);
+ ("Erreur de login: mot de passe incorrect, système d'administration non activé, ou IP non autorisée.\n");
}
else
{
@@ -4797,8 +4645,7 @@ void parse_fromlogin (int fd)
(" - administration system not activated, or\n");
printf (" - unauthorised IP.\n");
ladmin_log
- ("Error at login: incorrect password, administration system not activated, or unauthorised IP."
- RETCODE);
+ ("Error at login: incorrect password, administration system not activated, or unauthorised IP.\n");
}
session[fd]->eof = 1;
//bytes_to_read = 1; // not stop at prompt
@@ -4808,22 +4655,20 @@ void parse_fromlogin (int fd)
if (defaultlanguage == 'F')
{
printf ("Connexion établie.\n");
- ladmin_log ("Connexion établie." RETCODE);
+ ladmin_log ("Connexion établie.\n");
printf
("Lecture de la version du serveur de login...\n");
ladmin_log
- ("Lecture de la version du serveur de login..."
- RETCODE);
+ ("Lecture de la version du serveur de login...\n");
}
else
{
Iprintf ("Established connection.\n");
- ladmin_log ("Established connection." RETCODE);
+ ladmin_log ("Established connection.\n");
Iprintf
("Reading of the version of the login-server...\n");
ladmin_log
- ("Reading of the version of the login-server..."
- RETCODE);
+ ("Reading of the version of the login-server...\n");
}
//bytes_to_read = 1; // unchanged
checkloginversion ();
@@ -4859,18 +4704,16 @@ void parse_fromlogin (int fd)
if (defaultlanguage == 'F')
{
Iprintf ("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");
Iprintf ("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
{
Iprintf ("Receiving of the MD5 key.\n");
- ladmin_log ("Receiving of the MD5 key." RETCODE);
+ ladmin_log ("Receiving of the MD5 key.\n");
Iprintf ("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;
@@ -4920,8 +4763,7 @@ void parse_fromlogin (int fd)
if (defaultlanguage == 'F')
{
ladmin_log
- (" Réception d'une liste des comptes vide."
- RETCODE);
+ (" Réception d'une liste des comptes vide.\n");
if (list_count == 0)
printf ("Aucun compte trouvé.\n");
else if (list_count == 1)
@@ -4931,8 +4773,7 @@ void parse_fromlogin (int fd)
}
else
{
- ladmin_log (" Receiving of a void accounts list."
- RETCODE);
+ ladmin_log (" Receiving of a void accounts list.\n");
if (list_count == 0)
{
Iprintf ("No account found.\n");
@@ -4950,11 +4791,9 @@ void parse_fromlogin (int fd)
{
int i;
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;
@@ -5047,12 +4886,12 @@ void 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);
+ ("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);
+ ("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;
@@ -5073,8 +4912,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec à la création du compte [%s]. Un compte identique existe déjà.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5082,8 +4921,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] creation failed. Same account already exists.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5092,8 +4931,8 @@ void parse_fromlogin (int fd)
{
printf ("Compte [%s] créé avec succès [id: %d].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
- ladmin_log ("Compte [%s] créé avec succès [id: %d]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ladmin_log ("Compte [%s] créé avec succès [id: %d].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5101,8 +4940,8 @@ void parse_fromlogin (int fd)
("Account [%s] is successfully created [id: %d].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Account [%s] is successfully created [id: %d]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Account [%s] is successfully created [id: %d].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5120,8 +4959,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec de la suppression du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5129,8 +4968,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] deletion failed. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5140,8 +4979,8 @@ void parse_fromlogin (int fd)
printf ("Compte [%s][id: %d] SUPPRIME avec succès.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Compte [%s][id: %d] SUPPRIME avec succès."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Compte [%s][id: %d] SUPPRIME avec succès.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5149,8 +4988,8 @@ void parse_fromlogin (int fd)
("Account [%s][id: %d] is successfully DELETED.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Account [%s][id: %d] is successfully DELETED."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Account [%s][id: %d] is successfully DELETED.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5170,8 +5009,8 @@ void parse_fromlogin (int fd)
printf ("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));
+ ("Echec de la modification du mot de passe du compte. Le compte [%s] n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5180,8 +5019,8 @@ void parse_fromlogin (int fd)
printf ("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));
+ ("Account password changing failed. The compte [%s] doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5192,8 +5031,8 @@ void parse_fromlogin (int fd)
("Modification du mot de passe du compte [%s][id: %d] réussie.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Modification du mot de passe du compte [%s][id: %d] réussie."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Modification du mot de passe du compte [%s][id: %d] réussie.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5201,8 +5040,8 @@ void parse_fromlogin (int fd)
("Account [%s][id: %d] password successfully changed.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Account [%s][id: %d] password successfully changed."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Account [%s][id: %d] password successfully changed.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5220,8 +5059,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec du changement du statut du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5229,8 +5068,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] state changing failed. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5293,7 +5132,7 @@ void parse_fromlogin (int fd)
}
strcat (tmpstr, "]");
printf ("%s\n", tmpstr);
- ladmin_log ("%s%s", tmpstr, RETCODE);
+ ladmin_log ("%s%s", tmpstr, "\n");
}
bytes_to_read = 0;
RFIFOSKIP (fd, 34);
@@ -5309,14 +5148,12 @@ void parse_fromlogin (int fd)
if (defaultlanguage == 'F')
{
ladmin_log
- (" Réception du nombre de joueurs en ligne."
- RETCODE);
+ (" Réception du nombre de joueurs en ligne.\n");
}
else
{
ladmin_log
- (" Receiving of the number of online players."
- RETCODE);
+ (" Receiving of the number of online players.\n");
}
// Read information of the servers
if (RFIFOW (fd, 2) < 5)
@@ -5369,8 +5206,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Le compte [%s] n'existe pas ou le mot de passe est incorrect.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5378,8 +5215,8 @@ void parse_fromlogin (int fd)
("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));
+ ("The account [%s] doesn't exist or the password is incorrect.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5390,8 +5227,8 @@ void parse_fromlogin (int fd)
("Le mot de passe donné correspond bien au compte [%s][id: %d].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Le mot de passe donné correspond bien au compte [%s][id: %d]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Le mot de passe donné correspond bien au compte [%s][id: %d].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5399,8 +5236,8 @@ void parse_fromlogin (int fd)
("The proposed password is correct for the account [%s][id: %d].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("The proposed password is correct for the account [%s][id: %d]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("The proposed password is correct for the account [%s][id: %d].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5421,8 +5258,8 @@ void parse_fromlogin (int fd)
("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));
+ ("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
{
@@ -5432,8 +5269,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account sex changing failed. The compte [%s] doesn't exist or the sex is already the good sex.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5444,8 +5281,8 @@ void parse_fromlogin (int fd)
("Sexe du compte [%s][id: %d] changé avec succès.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Sexe du compte [%s][id: %d] changé avec succès."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Sexe du compte [%s][id: %d] changé avec succès.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5453,8 +5290,8 @@ void parse_fromlogin (int fd)
("Account [%s][id: %d] sex successfully changed.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Account [%s][id: %d] sex successfully changed."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Account [%s][id: %d] sex successfully changed.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5477,8 +5314,8 @@ void parse_fromlogin (int fd)
printf
("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));
+ ("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
{
@@ -5490,8 +5327,8 @@ void parse_fromlogin (int fd)
printf
("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));
+ ("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
@@ -5502,8 +5339,8 @@ void parse_fromlogin (int fd)
("Niveau de GM du compte [%s][id: %d] changé avec succès.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Niveau de GM du compte [%s][id: %d] changé avec succès."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Niveau de GM du compte [%s][id: %d] changé avec succès.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5511,8 +5348,8 @@ void parse_fromlogin (int fd)
("Account [%s][id: %d] GM level successfully changed.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Account [%s][id: %d] GM level successfully changed."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Account [%s][id: %d] GM level successfully changed.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5532,8 +5369,8 @@ void parse_fromlogin (int fd)
printf ("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));
+ ("Echec de la modification de l'e-mail du compte. Le compte [%s] n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5542,8 +5379,8 @@ void parse_fromlogin (int fd)
printf ("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));
+ ("Account e-mail changing failed. The compte [%s] doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5554,8 +5391,8 @@ void parse_fromlogin (int fd)
("Modification de l'e-mail du compte [%s][id: %d] réussie.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Modification de l'e-mail du compte [%s][id: %d] réussie."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Modification de l'e-mail du compte [%s][id: %d] réussie.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5563,8 +5400,8 @@ void parse_fromlogin (int fd)
("Account [%s][id: %d] e-mail successfully changed.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Account [%s][id: %d] e-mail successfully changed."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Account [%s][id: %d] e-mail successfully changed.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5582,8 +5419,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec du changement du mémo du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5591,8 +5428,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] memo changing failed. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5603,8 +5440,8 @@ void parse_fromlogin (int fd)
("Mémo du compte [%s][id: %d] changé avec succès.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Mémo du compte [%s][id: %d] changé avec succès."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Mémo du compte [%s][id: %d] changé avec succès.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5612,8 +5449,8 @@ void parse_fromlogin (int fd)
("Account [%s][id: %d] memo successfully changed.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Account [%s][id: %d] memo successfully changed."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Account [%s][id: %d] memo successfully changed.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5631,8 +5468,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Impossible de trouver l'id du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5640,8 +5477,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Unable to find the account [%s] id. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5650,15 +5487,15 @@ void parse_fromlogin (int fd)
{
printf ("Le compte [%s] a pour id: %d.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
- ladmin_log ("Le compte [%s] a pour id: %d." RETCODE,
+ ladmin_log ("Le compte [%s] a pour id: %d.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
printf ("The account [%s] have the id: %d.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
- ladmin_log ("The account [%s] have the id: %d."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ladmin_log ("The account [%s] have the id: %d.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
bytes_to_read = 0;
@@ -5676,8 +5513,8 @@ void parse_fromlogin (int fd)
("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas.\n",
RFIFOL (fd, 2));
ladmin_log
- ("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas."
- RETCODE, RFIFOL (fd, 2));
+ ("Impossible de trouver le nom du compte [%d]. Le compte n'existe pas.\n",
+ RFIFOL (fd, 2));
}
else
{
@@ -5685,8 +5522,8 @@ void parse_fromlogin (int fd)
("Unable to find the account [%d] name. Account doesn't exist.\n",
RFIFOL (fd, 2));
ladmin_log
- ("Unable to find the account [%d] name. Account doesn't exist."
- RETCODE, RFIFOL (fd, 2));
+ ("Unable to find the account [%d] name. Account doesn't exist.\n",
+ RFIFOL (fd, 2));
}
}
else
@@ -5695,15 +5532,15 @@ void parse_fromlogin (int fd)
{
printf ("Le compte [id: %d] a pour nom: %s.\n",
RFIFOL (fd, 2), RFIFOP (fd, 6));
- ladmin_log ("Le compte [id: %d] a pour nom: %s."
- RETCODE, RFIFOL (fd, 2), RFIFOP (fd, 6));
+ ladmin_log ("Le compte [id: %d] a pour nom: %s.\n",
+ RFIFOL (fd, 2), RFIFOP (fd, 6));
}
else
{
printf ("The account [id: %d] have the name: %s.\n",
RFIFOL (fd, 2), RFIFOP (fd, 6));
- ladmin_log ("The account [id: %d] have the name: %s."
- RETCODE, RFIFOL (fd, 2), RFIFOP (fd, 6));
+ ladmin_log ("The account [id: %d] have the name: %s.\n",
+ RFIFOL (fd, 2), RFIFOP (fd, 6));
}
}
bytes_to_read = 0;
@@ -5721,8 +5558,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5730,8 +5567,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] validity limit changing failed. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5745,8 +5582,8 @@ void parse_fromlogin (int fd)
("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Limite de validité du compte [%s][id: %d] changée avec succès en [illimité].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5754,8 +5591,8 @@ void parse_fromlogin (int fd)
("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Validity Limit of the account [%s][id: %d] successfully changed to [unlimited].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
else
@@ -5769,8 +5606,8 @@ void parse_fromlogin (int fd)
("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), 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), RFIFOL (fd, 2),
+ ("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
else
@@ -5779,8 +5616,8 @@ void parse_fromlogin (int fd)
("Validity Limit of the account [%s][id: %d] successfully changed to be until %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), tmpstr);
ladmin_log
- ("Validity Limit of the account [%s][id: %d] successfully changed to be until %s."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2),
+ ("Validity Limit of the account [%s][id: %d] successfully changed to be until %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
}
@@ -5800,8 +5637,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5809,8 +5646,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] final date of banishment changing failed. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5824,8 +5661,8 @@ void parse_fromlogin (int fd)
("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5833,8 +5670,8 @@ void parse_fromlogin (int fd)
("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
else
@@ -5848,8 +5685,8 @@ void parse_fromlogin (int fd)
("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), 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), RFIFOL (fd, 2),
+ ("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
else
@@ -5858,8 +5695,8 @@ void parse_fromlogin (int fd)
("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), tmpstr);
ladmin_log
- ("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2),
+ ("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
}
@@ -5879,8 +5716,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec du changement de la date finale de banissement du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -5888,8 +5725,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] final date of banishment changing failed. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -5903,8 +5740,8 @@ void parse_fromlogin (int fd)
("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Date finale de banissement du compte [%s][id: %d] changée avec succès en [dé-bannie].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
else
{
@@ -5912,8 +5749,8 @@ void parse_fromlogin (int fd)
("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n",
RFIFOP (fd, 6), RFIFOL (fd, 2));
ladmin_log
- ("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished]."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2));
+ ("Final date of banishment of the account [%s][id: %d] successfully changed to [unbanished].\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2));
}
}
else
@@ -5927,8 +5764,8 @@ void parse_fromlogin (int fd)
("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), 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), RFIFOL (fd, 2),
+ ("Date finale de banissement du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
else
@@ -5937,8 +5774,8 @@ void parse_fromlogin (int fd)
("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), tmpstr);
ladmin_log
- ("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2),
+ ("Final date of banishment of the account [%s][id: %d] successfully changed to be until %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
}
@@ -5957,16 +5794,14 @@ void parse_fromlogin (int fd)
printf
("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);
+ ("Echec de l'envoi du message. Aucun server de char en ligne.\n");
}
else
{
printf
("Message sending failed. No online char-server.\n");
ladmin_log
- ("Message sending failed. No online char-server."
- RETCODE);
+ ("Message sending failed. No online char-server.\n");
}
}
else
@@ -5976,16 +5811,14 @@ void parse_fromlogin (int fd)
printf
("Message transmis au server de logins avec succès.\n");
ladmin_log
- ("Message transmis au server de logins avec succès."
- RETCODE);
+ ("Message transmis au server de logins avec succès.\n");
}
else
{
printf
("Message successfully sended to login-server.\n");
ladmin_log
- ("Message successfully sended to login-server."
- RETCODE);
+ ("Message successfully sended to login-server.\n");
}
}
bytes_to_read = 0;
@@ -6003,8 +5836,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Echec du changement de la validité du compte [%s]. Le compte n'existe pas.\n",
+ RFIFOP (fd, 6));
}
else
{
@@ -6012,8 +5845,8 @@ void parse_fromlogin (int fd)
("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));
+ ("Account [%s] validity limit changing failed. Account doesn't exist.\n",
+ RFIFOP (fd, 6));
}
}
else
@@ -6031,8 +5864,8 @@ void parse_fromlogin (int fd)
printf
("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), RFIFOL (fd, 2));
+ ("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), RFIFOL (fd, 2));
}
else
{
@@ -6044,8 +5877,8 @@ void parse_fromlogin (int fd)
printf
("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), RFIFOL (fd, 2));
+ ("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), RFIFOL (fd, 2));
}
}
else
@@ -6059,8 +5892,8 @@ void parse_fromlogin (int fd)
("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), 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), RFIFOL (fd, 2),
+ ("Limite de validité du compte [%s][id: %d] changée avec succès pour être jusqu'au %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
else
@@ -6069,8 +5902,8 @@ void parse_fromlogin (int fd)
("Validity limit of the account [%s][id: %d] successfully changed to be until %s.\n",
RFIFOP (fd, 6), RFIFOL (fd, 2), tmpstr);
ladmin_log
- ("Validity limit of the account [%s][id: %d] successfully changed to be until %s."
- RETCODE, RFIFOP (fd, 6), RFIFOL (fd, 2),
+ ("Validity limit of the account [%s][id: %d] successfully changed to be until %s.\n",
+ RFIFOP (fd, 6), RFIFOL (fd, 2),
tmpstr);
}
}
@@ -6111,8 +5944,8 @@ void parse_fromlogin (int fd)
("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);
+ ("Impossible de trouver le compte [%s]. Le compte n'existe pas.\n",
+ parameters);
}
else
{
@@ -6120,8 +5953,8 @@ void parse_fromlogin (int fd)
("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);
+ ("Unabled to find the account [%s]. Account doesn't exist.\n",
+ parameters);
}
}
else if (strlen (userid) == 0)
@@ -6132,8 +5965,8 @@ void parse_fromlogin (int fd)
("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);
+ ("Impossible de trouver le compte [id: %s]. Le compte n'existe pas.\n",
+ parameters);
}
else
{
@@ -6141,8 +5974,8 @@ void parse_fromlogin (int fd)
("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);
+ ("Unabled to find the account [id: %s]. Account doesn't exist.\n",
+ parameters);
}
}
else
@@ -6150,16 +5983,14 @@ void parse_fromlogin (int fd)
if (defaultlanguage == 'F')
{
ladmin_log
- ("Réception d'information concernant un compte."
- RETCODE);
+ ("Réception d'information concernant un compte.\n");
printf
("Le compte a les caractéristiques suivantes:\n");
}
else
{
ladmin_log
- ("Receiving information about an account."
- RETCODE);
+ ("Receiving information about an account.\n");
printf ("The account is set with:\n");
}
if (RFIFOB (fd, 6) == 0)
@@ -6326,7 +6157,7 @@ void parse_fromlogin (int fd)
default:
printf
("Remote administration has been disconnected (unknown packet).\n");
- ladmin_log ("'End of connection, unknown packet." RETCODE);
+ ladmin_log ("'End of connection, unknown packet.\n");
session[fd]->eof = 1;
return;
}
@@ -6344,12 +6175,12 @@ int Connect_login_server (void)
if (defaultlanguage == 'F')
{
Iprintf ("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
{
Iprintf ("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");
}
if ((login_fd = make_connection (login_ip, loginserverport)) < 0)
@@ -6368,12 +6199,12 @@ int Connect_login_server (void)
if (defaultlanguage == 'F')
{
Iprintf ("Envoi du mot de passe...\n");
- ladmin_log ("Envoi du mot de passe..." RETCODE);
+ ladmin_log ("Envoi du mot de passe...\n");
}
else
{
Iprintf ("Sending of the password...\n");
- ladmin_log ("Sending of the password..." RETCODE);
+ ladmin_log ("Sending of the password...\n");
}
#ifdef PASSWORDENC
}
@@ -6385,12 +6216,12 @@ int Connect_login_server (void)
if (defaultlanguage == 'F')
{
Iprintf ("Demande de la clef MD5...\n");
- ladmin_log ("Demande de la clef MD5..." RETCODE);
+ ladmin_log ("Demande de la clef MD5...\n");
}
else
{
Iprintf ("Request about the MD5 key...\n");
- ladmin_log ("Request about the MD5 key..." RETCODE);
+ ladmin_log ("Request about the MD5 key...\n");
}
}
#endif
@@ -6578,16 +6409,14 @@ void term_func (void)
Iprintf
("\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);
+ ("----Fin de Ladmin (fin normale avec fermeture de tous les fichiers).\n");
}
else
{
Iprintf
("\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);
+ ("----End of Ladmin (normal end with closing of all files).\n");
}
already_exit_function = 1;
@@ -6606,11 +6435,11 @@ 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));
@@ -6632,12 +6461,12 @@ int do_init (int argc, char **argv)
if (defaultlanguage == 'F')
{
- ladmin_log ("Ladmin est prêt." RETCODE);
+ ladmin_log ("Ladmin est prêt.\n");
Iprintf ("Ladmin est \033[1;32mprêt\033[0m.\n\n");
}
else
{
- ladmin_log ("Ladmin is ready." RETCODE);
+ ladmin_log ("Ladmin is ready.\n");
Iprintf ("Ladmin is \033[1;32mready\033[0m.\n\n");
}
diff --git a/src/login/login.c b/src/login/login.c
index fd6ead7..898729b 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -148,7 +148,7 @@ int login_log (char *fmt, ...)
if (logfp)
{
if (fmt[0] == '\0') // jump a line if no message
- fprintf (logfp, RETCODE);
+ fprintf (logfp, "\n");
else
{
gettimeofday (&tv, NULL);
@@ -203,11 +203,10 @@ int read_gm_account (void)
GM_account_filename);
printf
(" 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 ("read_gm_account: GM accounts file [%s] not found.\n",
+ GM_account_filename);
login_log
- (" Actually, there is no GM accounts on the server."
- RETCODE);
+ (" Actually, there is no GM accounts on the server.\n");
return 1;
}
// limited to 4000, because we send information to char-servers (more than 4000 GM accounts???)
@@ -259,8 +258,7 @@ int read_gm_account (void)
printf
("***WARNING: 4000 GM accounts found. Next GM accounts are not readed.\n");
login_log
- ("***WARNING: 4000 GM accounts found. Next GM accounts are not readed."
- RETCODE);
+ ("***WARNING: 4000 GM accounts found. Next GM accounts are not readed.\n");
}
}
}
@@ -270,8 +268,8 @@ int read_gm_account (void)
printf ("read_gm_account: file '%s' readed (%d GM accounts found).\n",
GM_account_filename, c);
- login_log ("read_gm_account: file '%s' readed (%d GM accounts found)."
- RETCODE, GM_account_filename, c);
+ login_log ("read_gm_account: file '%s' readed (%d GM accounts found).\n",
+ GM_account_filename, c);
return 0;
}
@@ -592,11 +590,11 @@ int mmo_auth_init (void)
(" account id #%d -> account not read (saved in log file).\033[0m\n",
account_id);
login_log
- ("mmmo_auth_init: ******Error: an account has an id higher than %d."
- RETCODE, END_ACCOUNT_NUM);
+ ("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):"
- RETCODE, account_id);
+ (" account id #%d -> account not read (saved in next line):\n",
+ account_id);
login_log ("%s", line);
continue;
}
@@ -612,11 +610,10 @@ int mmo_auth_init (void)
(" account id #%d -> new account not read (saved in log file).\033[0m\n",
account_id);
login_log
- ("mmmo_auth_init: ******Error: an account has an identical id to another."
- RETCODE);
+ ("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):"
- RETCODE, account_id);
+ (" account id #%d -> new account not read (saved in next line):\n",
+ account_id);
login_log ("%s", line);
break;
}
@@ -628,11 +625,10 @@ int mmo_auth_init (void)
printf
(" Account saved in log file.\033[0m\n");
login_log
- ("mmmo_auth_init: ******Error: an account has an identical id to another."
- RETCODE);
+ ("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):"
- RETCODE, account_id);
+ (" account id #%d -> new account not read (saved in next line):\n",
+ account_id);
login_log ("%s", line);
break;
}
@@ -771,11 +767,11 @@ int mmo_auth_init (void)
(" account id #%d -> account not read (saved in log file).\033[0m\n",
account_id);
login_log
- ("mmmo_auth_init: ******Error: an account has an id higher than %d."
- RETCODE, END_ACCOUNT_NUM);
+ ("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):"
- RETCODE, account_id);
+ (" account id #%d -> account not read (saved in next line):\n",
+ account_id);
login_log ("%s", line);
continue;
}
@@ -791,11 +787,10 @@ int mmo_auth_init (void)
(" account id #%d -> new account not read (saved in log file).\033[0m\n",
account_id);
login_log
- ("mmmo_auth_init: ******Error: an account has an identical id to another."
- RETCODE);
+ ("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):"
- RETCODE, account_id);
+ (" account id #%d -> new account not read (saved in next line):\n",
+ account_id);
login_log ("%s", line);
break;
}
@@ -807,11 +802,10 @@ int mmo_auth_init (void)
printf
(" Account saved in log file.\033[0m\n");
login_log
- ("mmmo_auth_init: ******Error: an account has an identical id to another."
- RETCODE);
+ ("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):"
- RETCODE, account_id);
+ (" account id #%d -> new account not read (saved in next line):\n",
+ account_id);
login_log ("%s", line);
break;
}
@@ -964,7 +958,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;
}
@@ -1028,7 +1022,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, "%d\t%%newid%%\n", account_id_count);
@@ -1271,8 +1265,8 @@ int mmo_auth (struct mmo_account *account, int fd)
if (newaccount)
{
login_log
- ("Attempt of creation of an already existant account (account: %s_%c, ip: %s)"
- RETCODE, account->userid, account->userid[len + 1], ip);
+ ("Attempt of creation of an already existant account (account: %s_%c, ip: %s)\n",
+ account->userid, account->userid[len + 1], ip);
return 9; // 9 = Account already exists
}
ld = (struct login_session_data*) session[fd]->session_data;
@@ -1282,8 +1276,8 @@ int mmo_auth (struct mmo_account *account, int fd)
int j = account->passwdenc;
if (!ld)
{
- login_log ("Md5 key not created (account: %s, ip: %s)"
- RETCODE, account->userid, ip);
+ login_log ("Md5 key not created (account: %s, ip: %s)\n",
+ account->userid, ip);
return 1; // 1 = Incorrect Password
}
if (j > 2)
@@ -1315,8 +1309,8 @@ int mmo_auth (struct mmo_account *account, int fd)
{
if (account->passwdenc == 0)
login_log
- ("Invalid password (account: %s, ip: %s)"
- RETCODE, account->userid, ip);
+ ("Invalid password (account: %s, ip: %s)\n",
+ account->userid, ip);
#ifdef PASSWORDENC
else
@@ -1336,7 +1330,7 @@ int mmo_auth (struct mmo_account *account, int fd)
for (j = 0; j < ld->md5keylen; j++)
p += sprintf (p, "%02x",
((unsigned char *) ld->md5key)[j]);
- p += sprintf (p, "], ip: %s)" RETCODE, ip);
+ p += sprintf (p, "], ip: %s)\n", ip);
login_log (logbuf);
}
#endif
@@ -1346,8 +1340,8 @@ int mmo_auth (struct mmo_account *account, int fd)
if (auth_dat[i].state)
{
login_log
- ("Connection refused (account: %s, state: %d, ip: %s)"
- RETCODE, account->userid, auth_dat[i].state,
+ ("Connection refused (account: %s, state: %d, ip: %s)\n",
+ account->userid, auth_dat[i].state,
ip);
switch (auth_dat[i].state)
{ // packet 0x006a value + 1
@@ -1377,15 +1371,15 @@ int mmo_auth (struct mmo_account *account, int fd)
if (auth_dat[i].ban_until_time > time (NULL))
{ // always banned
login_log
- ("Connection refused (account: %s, banned until %s, ip: %s)"
- RETCODE, account->userid, tmpstr, ip);
+ ("Connection refused (account: %s, banned until %s, ip: %s)\n",
+ account->userid, tmpstr, ip);
return 6; // 6 = Your are Prohibited to log in until %s
}
else
{ // ban is finished
login_log
- ("End of ban (account: %s, previously banned until %s -> not more banned, ip: %s)"
- RETCODE, account->userid, tmpstr, ip);
+ ("End of ban (account: %s, previously banned until %s -> not more banned, ip: %s)\n",
+ account->userid, tmpstr, ip);
auth_dat[i].ban_until_time = 0; // reset the ban time
}
}
@@ -1394,21 +1388,21 @@ int mmo_auth (struct mmo_account *account, int fd)
&& auth_dat[i].connect_until_time < time (NULL))
{
login_log
- ("Connection refused (account: %s, expired ID, ip: %s)"
- RETCODE, account->userid, ip);
+ ("Connection refused (account: %s, expired ID, ip: %s)\n",
+ account->userid, 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 == 0)
{
login_log
- ("Unknown account (account: %s, ip: %s)"
- RETCODE, account->userid, ip);
+ ("Unknown account (account: %s, ip: %s)\n",
+ account->userid, ip);
return 0; // 0 = Unregistered ID
}
else
@@ -1416,8 +1410,8 @@ int mmo_auth (struct mmo_account *account, int fd)
int new_id =
mmo_auth_new (account, account->userid[len + 1], "a@a.com");
login_log
- ("Account creation and authentification accepted (account %s (id: %d), sex: %c, connection with _F/_M, ip: %s)"
- RETCODE, account->userid, new_id,
+ ("Account creation and authentification accepted (account %s (id: %d), sex: %c, connection with _F/_M, ip: %s)\n",
+ account->userid, new_id,
account->userid[len + 1], ip);
}
}
@@ -1457,8 +1451,8 @@ void char_anti_freeze_system (timer_id tid, tick_t tick, custom_id_t id, custom_
("Char-server anti-freeze system: char-server #%d '%s' is freezed -> disconnection.\n",
i, server[i].name);
login_log
- ("Char-server anti-freeze system: char-server #%d '%s' is freezed -> disconnection."
- RETCODE, i, server[i].name);
+ ("Char-server anti-freeze system: char-server #%d '%s' is freezed -> disconnection.\n",
+ i, server[i].name);
session[server_fd[i]]->eof = 1;
}
}
@@ -1484,7 +1478,7 @@ void parse_fromchar (int fd)
if (id < MAX_SERVERS)
{
printf ("Char-server '%s' has disconnected.\n", server[id].name);
- login_log ("Char-server '%s' has disconnected (ip: %s)." RETCODE,
+ 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));
@@ -1506,8 +1500,8 @@ void parse_fromchar (int fd)
// request from map-server via char-server to reload GM accounts (by Yor).
case 0x2709:
login_log
- ("Char-server '%s': Request to re-load GM configuration file (ip: %s)."
- RETCODE, server[id].name, ip);
+ ("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 ();
@@ -1535,8 +1529,8 @@ void parse_fromchar (int fd)
int p, k;
auth_fifo[i].delflag = 1;
login_log
- ("Char-server '%s': authentification of the account %d accepted (ip: %s)."
- RETCODE, server[id].name, acc, ip);
+ ("Char-server '%s': authentification of the account %d accepted (ip: %s).\n",
+ server[id].name, acc, ip);
// printf("%d\n", i);
for (k = 0; k < auth_num; k++)
{
@@ -1576,8 +1570,8 @@ void parse_fromchar (int fd)
if (i == AUTH_FIFO_SIZE)
{
login_log
- ("Char-server '%s': authentification of the account %d REFUSED (ip: %s)."
- RETCODE, server[id].name, acc, ip);
+ ("Char-server '%s': authentification of the account %d REFUSED (ip: %s).\n",
+ server[id].name, acc, ip);
WFIFOW (fd, 0) = 0x2713;
WFIFOL (fd, 2) = acc;
WFIFOB (fd, 6) = 1;
@@ -1613,8 +1607,8 @@ void parse_fromchar (int fd)
//printf("parse_fromchar: an e-mail creation of an account with a default e-mail: server '%s', account: %d, e-mail: '%s'.\n", server[id].name, acc, RFIFOP(fd,6));
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);
+ ("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++)
@@ -1625,15 +1619,15 @@ void parse_fromchar (int fd)
{
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);
+ ("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);
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);
+ ("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);
break;
@@ -1649,8 +1643,8 @@ void parse_fromchar (int fd)
if (auth_dat[i].account_id == RFIFOL (fd, 2))
{
login_log
- ("Char-server '%s': e-mail of the account %d found (ip: %s)."
- RETCODE, server[id].name, RFIFOL (fd, 2), ip);
+ ("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);
memcpy (WFIFOP (fd, 6), auth_dat[i].email, 40);
@@ -1663,8 +1657,8 @@ void parse_fromchar (int fd)
if (i == auth_num)
{
login_log
- ("Char-server '%s': e-mail of the account %d NOT found (ip: %s)."
- RETCODE, server[id].name, RFIFOL (fd, 2), ip);
+ ("Char-server '%s': e-mail of the account %d NOT found (ip: %s).\n",
+ server[id].name, RFIFOL (fd, 2), ip);
}
RFIFOSKIP (fd, 6);
break;
@@ -1700,9 +1694,8 @@ void parse_fromchar (int fd)
strftime (tmpstr, 23, date_format,
gmtime (&(tv.tv_sec)));
fprintf (fp,
- RETCODE
- "// %s: @GM command on account %d"
- RETCODE "%d %d" RETCODE, tmpstr,
+ "\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;
@@ -1712,8 +1705,8 @@ void parse_fromchar (int fd)
("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, server[id].name, acc,
+ ("Char-server '%s': GM Change of the account %d: level 0 -> %d (ip: %s).\n",
+ server[id].name, acc,
level_new_gm, ip);
}
else
@@ -1722,8 +1715,8 @@ void parse_fromchar (int fd)
("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, server[id].name, acc, ip);
+ ("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
@@ -1732,8 +1725,8 @@ void parse_fromchar (int fd)
("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, server[id].name, acc, ip);
+ ("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
@@ -1742,8 +1735,8 @@ void parse_fromchar (int fd)
("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, server[id].name, acc, ip);
+ ("Char-server '%s': Error of GM change (suggested account: %d (already GM), correct password, ip: %s).\n",
+ server[id].name, acc, ip);
}
}
else
@@ -1752,8 +1745,8 @@ void parse_fromchar (int fd)
("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, server[id].name, acc, ip);
+ ("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);
}
@@ -1776,16 +1769,16 @@ void parse_fromchar (int fd)
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, server[id].name, acc, ip);
+ ("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, server[id].name, acc, ip);
+ ("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 (strcasecmp (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, server[id].name, acc, ip);
+ ("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++)
@@ -1797,14 +1790,14 @@ void parse_fromchar (int fd)
{
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, server[id].name, acc,
+ ("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);
}
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, server[id].name, acc,
+ ("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;
@@ -1812,8 +1805,8 @@ void parse_fromchar (int fd)
}
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, server[id].name, acc, ip);
+ ("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);
}
}
RFIFOSKIP (fd, 86);
@@ -1834,8 +1827,8 @@ void parse_fromchar (int fd)
if (auth_dat[i].state != statut)
{
login_log
- ("Char-server '%s': Status change (account: %d, new status %d, ip: %s)."
- RETCODE, server[id].name, acc, statut,
+ ("Char-server '%s': Status change (account: %d, new status %d, ip: %s).\n",
+ server[id].name, acc, statut,
ip);
if (statut != 0)
{
@@ -1853,8 +1846,8 @@ void parse_fromchar (int fd)
}
else
login_log
- ("Char-server '%s': Error of Status change - actual status is already the good status (account: %d, status %d, ip: %s)."
- RETCODE, server[id].name, acc, statut,
+ ("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);
break;
}
@@ -1862,8 +1855,8 @@ void parse_fromchar (int fd)
if (i == auth_num)
{
login_log
- ("Char-server '%s': Error of Status change (account: %d not found, suggested status %d, ip: %s)."
- RETCODE, server[id].name, acc, statut, ip);
+ ("Char-server '%s': Error of Status change (account: %d not found, suggested status %d, ip: %s).\n",
+ server[id].name, acc, statut, ip);
}
RFIFOSKIP (fd, 10);
}
@@ -1913,8 +1906,8 @@ void parse_fromchar (int fd)
strftime (tmpstr, 24, date_format,
gmtime (&timestamp));
login_log
- ("Char-server '%s': Ban request (account: %d, new final date of banishment: %d (%s), ip: %s)."
- RETCODE, server[id].name, acc,
+ ("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),
@@ -1933,8 +1926,8 @@ void parse_fromchar (int fd)
else
{
login_log
- ("Char-server '%s': Error of ban request (account: %d, new date unbans the account, ip: %s)."
- RETCODE, server[id].name, acc,
+ ("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;
@@ -1942,15 +1935,15 @@ void parse_fromchar (int fd)
else
{
login_log
- ("Char-server '%s': Error of ban request (account: %d, no change for ban date, ip: %s)."
- RETCODE, server[id].name, acc, ip);
+ ("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, server[id].name, acc, ip);
+ ("Char-server '%s': Error of ban request (account: %d, invalid date, ip: %s).\n",
+ server[id].name, acc, ip);
}
break;
}
@@ -1958,8 +1951,8 @@ void parse_fromchar (int fd)
if (i == auth_num)
{
login_log
- ("Char-server '%s': Error of ban request (account: %d not found, ip: %s)."
- RETCODE, server[id].name, acc, ip);
+ ("Char-server '%s': Error of ban request (account: %d not found, ip: %s).\n",
+ server[id].name, acc, ip);
}
RFIFOSKIP (fd, 18);
}
@@ -1978,8 +1971,8 @@ void parse_fromchar (int fd)
{
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, server[id].name, acc,
+ ("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
{
@@ -1989,8 +1982,8 @@ void parse_fromchar (int fd)
else
sex = 0;
login_log
- ("Char-server '%s': Sex change (account: %d, new sex %c, ip: %s)."
- RETCODE, server[id].name, acc,
+ ("Char-server '%s': Sex change (account: %d, new sex %c, ip: %s).\n",
+ server[id].name, acc,
(sex == 2) ? 'S' : (sex ? 'M' : 'F'),
ip);
for (j = 0; j < AUTH_FIFO_SIZE; j++)
@@ -2008,8 +2001,8 @@ void 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, server[id].name, acc, ip);
+ ("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);
}
@@ -2027,8 +2020,8 @@ void parse_fromchar (int fd)
{
unsigned char buf[RFIFOW (fd, 2) + 1];
login_log
- ("Char-server '%s': receiving (from the char-server) of account_reg2 (account: %d, ip: %s)."
- RETCODE, server[id].name, acc, ip);
+ ("Char-server '%s': receiving (from the char-server) of account_reg2 (account: %d, ip: %s).\n",
+ server[id].name, acc, ip);
for (p = 8, j = 0;
p < RFIFOW (fd, 2) && j < ACCOUNT_REG2_NUM;
p += 36, j++)
@@ -2055,8 +2048,8 @@ void parse_fromchar (int fd)
{
// 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, server[id].name, acc, ip);
+ ("Char-server '%s': receiving (from the char-server) of account_reg2 (account: %d not found, ip: %s).\n",
+ server[id].name, acc, ip);
}
}
RFIFOSKIP (fd, RFIFOW (fd, 2));
@@ -2076,14 +2069,14 @@ void parse_fromchar (int fd)
{
auth_dat[i].ban_until_time = 0;
login_log
- ("Char-server '%s': UnBan request (account: %d, ip: %s)."
- RETCODE, server[id].name, acc, ip);
+ ("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, server[id].name, acc, ip);
+ ("Char-server '%s': Error of UnBan request (account: %d, no change for unban date, ip: %s).\n",
+ server[id].name, acc, ip);
}
break;
}
@@ -2091,8 +2084,8 @@ void parse_fromchar (int fd)
if (i == auth_num)
{
login_log
- ("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s)."
- RETCODE, server[id].name, acc, ip);
+ ("Char-server '%s': Error of UnBan request (account: %d not found, ip: %s).\n",
+ server[id].name, acc, ip);
}
RFIFOSKIP (fd, 6);
}
@@ -2128,8 +2121,8 @@ void parse_fromchar (int fd)
status = 1;
strcpy (auth_dat[i].pass, MD5_saltcrypt(new_pass, make_salt()));
login_log
- ("Char-server '%s': Change pass success (account: %d (%s), ip: %s."
- RETCODE, server[id].name, acc,
+ ("Char-server '%s': Change pass success (account: %d (%s), ip: %s.\n",
+ server[id].name, acc,
auth_dat[i].userid, ip);
}
}
@@ -2137,8 +2130,8 @@ void parse_fromchar (int fd)
{
status = 2;
login_log
- ("Char-server '%s': Attempt to modify a pass failed, wrong password. (account: %d (%s), ip: %s)."
- RETCODE, server[id].name, acc,
+ ("Char-server '%s': Attempt to modify a pass failed, wrong password. (account: %d (%s), ip: %s).\n",
+ server[id].name, acc,
auth_dat[i].userid, ip);
}
break;
@@ -2164,15 +2157,14 @@ void parse_fromchar (int fd)
gettimeofday (&tv, NULL);
strftime (tmpstr, 23, date_format, gmtime (&(tv.tv_sec)));
fprintf (logfp,
- "%s.%03d: receiving of an unknown packet -> disconnection"
- RETCODE, tmpstr, (int) tv.tv_usec / 1000);
+ "%s.%03d: receiving of an unknown packet -> disconnection\n",
+ tmpstr, (int) tv.tv_usec / 1000);
fprintf (logfp,
- "parse_fromchar: connection #%d (ip: %s), packet: 0x%x (with being read: %d)."
- RETCODE, fd, ip, RFIFOW (fd, 0), RFIFOREST (fd));
- fprintf (logfp, "Detail (in hex):" RETCODE);
+ "parse_fromchar: connection #%d (ip: %s), packet: 0x%x (with being read: %d).\n",
+ fd, ip, RFIFOW (fd, 0), 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"
- RETCODE);
+ "---- 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++)
{
@@ -2187,7 +2179,7 @@ void parse_fromchar (int fd)
fprintf (logfp, " ");
else if ((i + 1) % 16 == 0)
{
- fprintf (logfp, " %s" RETCODE, tmpstr);
+ fprintf (logfp, " %s\n", tmpstr);
memset (tmpstr, '\0', sizeof (tmpstr));
}
}
@@ -2199,9 +2191,9 @@ void 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);
}
}
@@ -2248,8 +2240,8 @@ void parse_admin (int fd)
switch (RFIFOW (fd, 0))
{
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);
WFIFOW (fd, 0) = 0x7531;
WFIFOB (fd, 2) = ATHENA_MAJOR_VERSION;
WFIFOB (fd, 3) = ATHENA_MINOR_VERSION;
@@ -2263,7 +2255,7 @@ void parse_admin (int fd)
break;
case 0x7532: // Request of end of connection
- login_log ("'ladmin': End of connection (ip: %s)" RETCODE,
+ login_log ("'ladmin': End of connection (ip: %s)\n",
ip);
RFIFOSKIP (fd, 2);
session[fd]->eof = 1;
@@ -2284,8 +2276,8 @@ void parse_admin (int fd)
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);
+ ("'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++)
{
@@ -2358,26 +2350,26 @@ void parse_admin (int fd)
if (strlen (ma.userid) > 23 || strlen (ma.passwd) > 23)
{
login_log
- ("'ladmin': Attempt to create an invalid account (account or pass is too long, ip: %s)"
- RETCODE, ip);
+ ("'ladmin': Attempt to create an invalid account (account or pass is too long, ip: %s)\n",
+ ip);
}
else 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, ip);
+ ("'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, invalid sex, ip: %s)"
- RETCODE, ma.userid, ip);
+ ("'ladmin': Attempt to create an invalid account (account: %s, invalid sex, ip: %s)\n",
+ ma.userid, 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, sex: %c, ip: %s)"
- RETCODE, ma.userid, ma.sex, ip);
+ ("'ladmin': Attempt to create an account, but there is no more available id number (account: %s, sex: %c, ip: %s)\n",
+ ma.userid, ma.sex, ip);
}
else
{
@@ -2389,8 +2381,8 @@ void parse_admin (int fd)
0)
{
login_log
- ("'ladmin': Attempt to create an already existing account (account: %s ip: %s)"
- RETCODE, auth_dat[i].userid, ip);
+ ("'ladmin': Attempt to create an already existing account (account: %s ip: %s)\n",
+ auth_dat[i].userid, ip);
break;
}
}
@@ -2403,8 +2395,8 @@ void parse_admin (int fd)
remove_control_chars (email);
new_id = mmo_auth_new (&ma, ma.sex, email);
login_log
- ("'ladmin': Account creation (account: %s (id: %d), sex: %c, email: %s, ip: %s)"
- RETCODE, ma.userid, new_id,
+ ("'ladmin': Account creation (account: %s (id: %d), sex: %c, email: %s, ip: %s)\n",
+ ma.userid, new_id,
ma.sex, auth_dat[i].email, ip);
WFIFOL (fd, 2) = new_id;
}
@@ -2435,11 +2427,11 @@ void parse_admin (int fd)
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, auth_dat[i].userid, auth_dat[i].account_id,
+ ("'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 (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));
@@ -2449,8 +2441,8 @@ void parse_admin (int fd)
{
memcpy (WFIFOP (fd, 6), account_name, 24);
login_log
- ("'ladmin': Attempt to delete an unknown account (account: %s, ip: %s)"
- RETCODE, account_name, ip);
+ ("'ladmin': Attempt to delete an unknown account (account: %s, ip: %s)\n",
+ account_name, ip);
}
WFIFOSET (fd, 30);
RFIFOSKIP (fd, 26);
@@ -2472,15 +2464,15 @@ void parse_admin (int fd)
auth_dat[i].pass[39] = '\0';
WFIFOL (fd, 2) = auth_dat[i].account_id;
login_log
- ("'ladmin': Modification of a password (account: %s, new password: %s, ip: %s)"
- RETCODE, auth_dat[i].userid, auth_dat[i].pass, ip);
+ ("'ladmin': Modification of a password (account: %s, new password: %s, ip: %s)\n",
+ auth_dat[i].userid, auth_dat[i].pass, ip);
}
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, account_name, ip);
+ ("'ladmin': Attempt to modify the password of an unknown account (account: %s, ip: %s)\n",
+ account_name, ip);
}
WFIFOSET (fd, 30);
RFIFOSKIP (fd, 50);
@@ -2514,19 +2506,19 @@ void parse_admin (int fd)
&& 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, account_name, statut, ip);
+ ("'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, auth_dat[i].userid, statut,
+ ("'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, auth_dat[i].userid, statut, ip);
+ ("'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];
@@ -2549,8 +2541,8 @@ void parse_admin (int fd)
{
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, account_name, statut, ip);
+ ("'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;
}
@@ -2559,8 +2551,7 @@ void parse_admin (int fd)
break;
case 0x7938: // Request for servers list and # of online players
- login_log ("'ladmin': Sending of servers list (ip: %s)"
- RETCODE, ip);
+ login_log ("'ladmin': Sending of servers list (ip: %s)\n", ip);
server_num = 0;
for (i = 0; i < MAX_SERVERS; i++)
{
@@ -2600,8 +2591,8 @@ void parse_admin (int fd)
{
WFIFOL (fd, 2) = auth_dat[i].account_id;
login_log
- ("'ladmin': Check of password OK (account: %s, password: %s, ip: %s)"
- RETCODE, auth_dat[i].userid, auth_dat[i].pass,
+ ("'ladmin': Check of password OK (account: %s, password: %s, ip: %s)\n",
+ auth_dat[i].userid, auth_dat[i].pass,
ip);
}
else
@@ -2611,16 +2602,16 @@ void parse_admin (int fd)
pass[23] = '\0';
remove_control_chars (pass);
login_log
- ("'ladmin': Failure of password check (account: %s, proposed pass: %s, ip: %s)"
- RETCODE, auth_dat[i].userid, pass, ip);
+ ("'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, account_name, ip);
+ ("'ladmin': Attempt to check the password of an unknown account (account: %s, ip: %s)\n",
+ account_name, ip);
}
WFIFOSET (fd, 30);
RFIFOSKIP (fd, 50);
@@ -2642,12 +2633,12 @@ void parse_admin (int fd)
{
if (sex > 31)
login_log
- ("'ladmin': Attempt to give an invalid sex (account: %s, received sex: %c, ip: %s)"
- RETCODE, account_name, sex, ip);
+ ("'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, account_name, ip);
+ ("'ladmin': Attempt to give an invalid sex (account: %s, received sex: 'control char', ip: %s)\n",
+ account_name, ip);
}
else
{
@@ -2671,8 +2662,8 @@ void parse_admin (int fd)
's') ? 2 : (sex == 'M'
|| sex == 'm');
login_log
- ("'ladmin': Modification of a sex (account: %s, new sex: %c, ip: %s)"
- RETCODE, auth_dat[i].userid, sex, ip);
+ ("'ladmin': Modification of a sex (account: %s, new sex: %c, ip: %s)\n",
+ auth_dat[i].userid, sex, ip);
// send to all char-server the change
WBUFW (buf, 0) = 0x2723;
WBUFL (buf, 2) = auth_dat[i].account_id;
@@ -2682,15 +2673,15 @@ void parse_admin (int fd)
else
{
login_log
- ("'ladmin': Modification of a sex, but the sex is already the good sex (account: %s, sex: %c, ip: %s)"
- RETCODE, auth_dat[i].userid, sex, ip);
+ ("'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, account_name, sex, ip);
+ ("'ladmin': Attempt to modify the sex of an unknown account (account: %s, received sex: %c, ip: %s)\n",
+ account_name, sex, ip);
}
}
}
@@ -2713,8 +2704,8 @@ void parse_admin (int fd)
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, account_name, (int) new_gm_level, ip);
+ ("'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
{
@@ -2759,7 +2750,7 @@ void parse_admin (int fd)
if ((line[0] == '/'
&& line[1] == '/')
|| line[0] == '\0')
- fprintf (fp2, "%s" RETCODE,
+ fprintf (fp2, "%s\n",
line);
else
{
@@ -2772,18 +2763,17 @@ void parse_admin (int fd)
&GM_level) !=
2)
fprintf (fp2,
- "%s" RETCODE,
+ "%s\n",
line);
else if (GM_account != acc)
fprintf (fp2,
- "%s" RETCODE,
+ "%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,
+ "// %s: 'ladmin' GM level removed on account %d '%s' (previous level: %d)\n//%d %d\n",
+ tmpstr,
acc,
auth_dat
[i].userid,
@@ -2794,9 +2784,8 @@ void parse_admin (int fd)
else
{
fprintf (fp2,
- "// %s: 'ladmin' GM level on account %d '%s' (previous level: %d)"
- RETCODE "%d %d"
- RETCODE, tmpstr,
+ "// %s: 'ladmin' GM level on account %d '%s' (previous level: %d)\n%d %d\n",
+ tmpstr,
acc,
auth_dat
[i].userid,
@@ -2808,8 +2797,7 @@ void parse_admin (int fd)
}
if (modify_flag == 0)
fprintf (fp2,
- "// %s: 'ladmin' GM level on account %d '%s' (previous level: 0)"
- RETCODE "%d %d" RETCODE,
+ "// %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);
@@ -2818,15 +2806,15 @@ void parse_admin (int fd)
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, auth_dat[i].userid, acc,
+ ("'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);
}
lock_fclose(fp2, GM_account_filename, &lock);
WFIFOL (fd, 2) = acc;
login_log
- ("'ladmin': Modification of a GM level (account: %s (%d), new GM level: %d, ip: %s)"
- RETCODE, auth_dat[i].userid, acc,
+ ("'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 ();
@@ -2835,24 +2823,24 @@ void parse_admin (int fd)
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, auth_dat[i].userid, acc,
+ ("'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, auth_dat[i].userid, acc,
+ ("'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, account_name, (int) new_gm_level,
+ ("'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);
}
}
@@ -2876,8 +2864,8 @@ void parse_admin (int fd)
if (e_mail_check (email) == 0)
{
login_log
- ("'ladmin': Attempt to give an invalid e-mail (account: %s, ip: %s)"
- RETCODE, account_name, ip);
+ ("'ladmin': Attempt to give an invalid e-mail (account: %s, ip: %s)\n",
+ account_name, ip);
}
else
{
@@ -2889,14 +2877,14 @@ void parse_admin (int fd)
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, auth_dat[i].userid, email, ip);
+ ("'ladmin': Modification of an email (account: %s, new e-mail: %s, ip: %s)\n",
+ auth_dat[i].userid, email, ip);
}
else
{
login_log
- ("'ladmin': Attempt to modify the e-mail of an unknown account (account: %s, received e-mail: %s, ip: %s)"
- RETCODE, account_name, email, ip);
+ ("'ladmin': Attempt to modify the e-mail of an unknown account (account: %s, received e-mail: %s, ip: %s)\n",
+ account_name, email, ip);
}
}
}
@@ -2937,15 +2925,15 @@ void parse_admin (int fd)
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, auth_dat[i].userid, auth_dat[i].memo, ip);
+ ("'ladmin': Modification of a memo field (account: %s, new memo: %s, ip: %s)\n",
+ auth_dat[i].userid, auth_dat[i].memo, ip);
}
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, account_name, ip);
+ ("'ladmin': Attempt to modify the memo field of an unknown account (account: %s, ip: %s)\n",
+ account_name, ip);
}
WFIFOSET (fd, 30);
RFIFOSKIP (fd, 28 + RFIFOW (fd, 26));
@@ -2965,16 +2953,16 @@ void parse_admin (int fd)
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, auth_dat[i].userid, auth_dat[i].account_id,
+ ("'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, account_name, ip);
+ ("'ladmin': ID request (by the name) of an unknown account (account: %s, ip: %s)\n",
+ account_name, ip);
}
WFIFOSET (fd, 30);
RFIFOSKIP (fd, 26);
@@ -2992,16 +2980,16 @@ void parse_admin (int fd)
{
strncpy (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, auth_dat[i].userid, RFIFOL (fd, 2), ip);
+ ("'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, RFIFOL (fd, 2), ip);
+ ("'ladmin': Name request (by id) of an unknown account (id: %d, ip: %s)\n",
+ RFIFOL (fd, 2), ip);
strncpy (WFIFOP (fd, 6), "", 24);
}
WFIFOSET (fd, 30);
@@ -3026,8 +3014,8 @@ void parse_admin (int fd)
{
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, auth_dat[i].userid, timestamp,
+ ("'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;
@@ -3036,8 +3024,7 @@ void parse_admin (int fd)
{
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, account_name, timestamp,
+ ("'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) = timestamp;
@@ -3067,8 +3054,8 @@ void parse_admin (int fd)
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, auth_dat[i].userid, timestamp,
+ ("'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)
{
@@ -3092,8 +3079,8 @@ void parse_admin (int fd)
{
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, account_name, timestamp,
+ ("'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) = timestamp;
@@ -3145,8 +3132,8 @@ void parse_admin (int fd)
strftime (tmpstr, 24, date_format,
gmtime (&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, auth_dat[i].userid,
+ ("'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,
@@ -3179,8 +3166,8 @@ void parse_admin (int fd)
strftime (tmpstr, 24, date_format,
gmtime (&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, auth_dat[i].userid,
+ ("'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),
@@ -3199,8 +3186,8 @@ void parse_admin (int fd)
{
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, account_name, ip);
+ ("'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;
}
}
@@ -3217,8 +3204,8 @@ void parse_admin (int fd)
if (RFIFOL (fd, 4) < 1)
{
login_log
- ("'ladmin': Receiving a message for broadcast, but message is void (ip: %s)"
- RETCODE, ip);
+ ("'ladmin': Receiving a message for broadcast, but message is void (ip: %s)\n",
+ ip);
}
else
{
@@ -3229,8 +3216,8 @@ void parse_admin (int fd)
if (i == MAX_SERVERS)
{
login_log
- ("'ladmin': Receiving a message for broadcast, but no char-server is online (ip: %s)"
- RETCODE, ip);
+ ("'ladmin': Receiving a message for broadcast, but no char-server is online (ip: %s)\n",
+ ip);
}
else
{
@@ -3243,12 +3230,12 @@ void parse_admin (int fd)
remove_control_chars (message);
if (RFIFOW (fd, 2) == 0)
login_log
- ("'ladmin': Receiving a message for broadcast (message (in yellow): %s, ip: %s)"
- RETCODE, message, ip);
+ ("'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, message, ip);
+ ("'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));
@@ -3282,8 +3269,8 @@ void parse_admin (int fd)
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, auth_dat[i].userid, ip);
+ ("'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
@@ -3312,8 +3299,8 @@ void parse_admin (int fd)
strftime (tmpstr2, 24, date_format,
gmtime (&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, auth_dat[i].userid,
+ ("'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),
@@ -3336,8 +3323,8 @@ void parse_admin (int fd)
gmtime (&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, auth_dat[i].userid,
+ ("'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),
@@ -3355,8 +3342,8 @@ void parse_admin (int fd)
{
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, account_name, ip);
+ ("'ladmin': Attempt to adjust the validity limit of an unknown account (account: %s, ip: %s)\n",
+ account_name, ip);
WFIFOL (fd, 30) = 0;
}
}
@@ -3397,8 +3384,8 @@ void parse_admin (int fd)
strlen (auth_dat[i].memo));
}
login_log
- ("'ladmin': Sending information of an account (request by the name; account: %s, id: %d, ip: %s)"
- RETCODE, auth_dat[i].userid, auth_dat[i].account_id,
+ ("'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));
}
@@ -3407,8 +3394,8 @@ void parse_admin (int fd)
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, account_name, ip);
+ ("'ladmin': Attempt to obtain information (by the name) of an unknown account (account: %s, ip: %s)\n",
+ account_name, ip);
WFIFOSET (fd, 150);
}
RFIFOSKIP (fd, 26);
@@ -3425,8 +3412,8 @@ void parse_admin (int fd)
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, auth_dat[i].userid, RFIFOL (fd, 2), ip);
+ ("'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);
@@ -3455,8 +3442,8 @@ void 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, RFIFOL (fd, 2), ip);
+ ("'ladmin': Attempt to obtain information (by the id) of an unknown account (id: %d, ip: %s)\n",
+ RFIFOL (fd, 2), ip);
strncpy (WFIFOP (fd, 7), "", 24);
WFIFOW (fd, 148) = 0;
WFIFOSET (fd, 150);
@@ -3466,8 +3453,8 @@ void parse_admin (int fd)
case 0x7955: // Request to reload GM file (no answer)
login_log
- ("'ladmin': Request to re-load GM configuration file (ip: %s)."
- RETCODE, ip);
+ ("'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 ();
@@ -3485,15 +3472,14 @@ void parse_admin (int fd)
gettimeofday (&tv, NULL);
strftime (tmpstr, 23, date_format, gmtime (&(tv.tv_sec)));
fprintf (logfp,
- "%s.%03d: receiving of an unknown packet -> disconnection"
- RETCODE, tmpstr, (int) tv.tv_usec / 1000);
+ "%s.%03d: receiving of an unknown packet -> disconnection\n",
+ tmpstr, (int) tv.tv_usec / 1000);
fprintf (logfp,
- "parse_admin: connection #%d (ip: %s), packet: 0x%x (with being read: %d)."
- RETCODE, fd, ip, RFIFOW (fd, 0), RFIFOREST (fd));
- fprintf (logfp, "Detail (in hex):" RETCODE);
+ "parse_admin: connection #%d (ip: %s), packet: 0x%x (with being read: %d).\n",
+ fd, ip, RFIFOW (fd, 0), 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"
- RETCODE);
+ "---- 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++)
{
@@ -3508,7 +3494,7 @@ void parse_admin (int fd)
fprintf (logfp, " ");
else if ((i + 1) % 16 == 0)
{
- fprintf (logfp, " %s" RETCODE, tmpstr);
+ fprintf (logfp, " %s\n", tmpstr);
memset (tmpstr, '\0', sizeof (tmpstr));
}
}
@@ -3520,15 +3506,15 @@ void 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);
+ ("'ladmin': End of connection, unknown packet (ip: %s)\n",
+ ip);
session[fd]->eof = 1;
printf
("Remote administration has been disconnected (unknown packet).\n");
@@ -3647,21 +3633,21 @@ void parse_login (int fd)
if (RFIFOW (fd, 0) == 0x64)
{
login_log
- ("Request for connection (non encryption mode) of %s (ip: %s)."
- RETCODE, account.userid, ip);
+ ("Request for connection (non encryption mode) of %s (ip: %s).\n",
+ account.userid, ip);
}
else
{
login_log
- ("Request for connection (encryption mode) of %s (ip: %s)."
- RETCODE, account.userid, ip);
+ ("Request for connection (encryption mode) of %s (ip: %s).\n",
+ account.userid, ip);
}
if (!check_ip (session[fd]->client_addr.sin_addr.s_addr))
{
login_log
- ("Connection refused: IP isn't authorised (deny/allow, ip: %s)."
- RETCODE, ip);
+ ("Connection refused: IP isn't authorised (deny/allow, ip: %s).\n",
+ ip);
WFIFOW (fd, 0) = 0x6a;
WFIFOB (fd, 2) = 0x03;
WFIFOSET (fd, 3);
@@ -3676,8 +3662,8 @@ void parse_login (int fd)
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, min_level_to_connect, account.userid,
+ ("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);
WFIFOW (fd, 0) = 0x81;
WFIFOL (fd, 2) = 1; // 01 = Server closed
@@ -3801,8 +3787,8 @@ void parse_login (int fd)
else
{
login_log
- ("Connection refused: there is no char-server online (account: %s, ip: %s)."
- RETCODE, account.userid, ip);
+ ("Connection refused: there is no char-server online (account: %s, ip: %s).\n",
+ account.userid, ip);
WFIFOW (fd, 0) = 0x81;
WFIFOL (fd, 2) = 1; // 01 = Server closed
WFIFOSET (fd, 3);
@@ -3862,14 +3848,14 @@ void parse_login (int fd)
}
if (RFIFOW (fd, 0) == 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);
+ ("'ladmin': Sending request of the coding key (ip: %s)\n",
+ ip);
}
// Creation of the coding key
memset (ld->md5key, '\0', sizeof (ld->md5key));
@@ -3902,9 +3888,8 @@ void parse_login (int fd)
server_name[19] = '\0';
remove_control_chars (server_name);
login_log
- ("Connection request of the char-server '%s' @ %d.%d.%d.%d:%d (ip: %s)"
- RETCODE, server_name, RFIFOB (fd, 54), RFIFOB (fd,
- 55),
+ ("Connection request of the char-server '%s' @ %d.%d.%d.%d:%d (ip: %s)\n",
+ server_name, RFIFOB (fd, 54), RFIFOB (fd, 55),
RFIFOB (fd, 56), RFIFOB (fd, 57), RFIFOW (fd, 58),
ip);
result = mmo_auth (&account, fd);
@@ -3936,8 +3921,8 @@ void parse_login (int fd)
&& server_fd[account.account_id] == -1)
{
login_log
- ("Connection of the char-server '%s' accepted (account: %s, pass: %s, ip: %s)"
- RETCODE, server_name, account.userid,
+ ("Connection of the char-server '%s' accepted (account: %s, pass: %s, ip: %s)\n",
+ server_name, account.userid,
account.passwd, ip);
printf
("Connection of the char-server '%s' accepted.\n",
@@ -3980,8 +3965,8 @@ void parse_login (int fd)
else
{
login_log
- ("Connexion of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s)"
- RETCODE, server_name, account.userid,
+ ("Connexion of the char-server '%s' REFUSED (account: %s, pass: %s, ip: %s)\n",
+ server_name, account.userid,
account.passwd, ip);
WFIFOW (fd, 0) = 0x2711;
WFIFOB (fd, 2) = 3;
@@ -3992,7 +3977,7 @@ void parse_login (int fd)
return;
case 0x7530: // Request of the server version
- login_log ("Sending of the server version (ip: %s)" RETCODE,
+ login_log ("Sending of the server version (ip: %s)\n",
ip);
WFIFOW (fd, 0) = 0x7531;
WFIFOB (fd, 2) = -1;
@@ -4005,7 +3990,7 @@ void 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);
session[fd]->eof = 1;
return;
@@ -4019,8 +4004,8 @@ void parse_login (int fd)
(session[fd]->client_addr.sin_addr.s_addr))
{
login_log
- ("'ladmin'-login: Connection in administration mode refused: IP isn't authorised (ladmin_allow, ip: %s)."
- RETCODE, ip);
+ ("'ladmin'-login: Connection in administration mode refused: IP isn't authorised (ladmin_allow, ip: %s).\n",
+ ip);
}
else
{
@@ -4036,8 +4021,8 @@ void parse_login (int fd)
&& (strcmp (password, admin_pass) == 0))
{
login_log
- ("'ladmin'-login: Connection in administration mode accepted (non encrypted password: %s, ip: %s)"
- RETCODE, password, ip);
+ ("'ladmin'-login: Connection in administration mode accepted (non encrypted password: %s, ip: %s)\n",
+ password, ip);
printf
("Connection of a remote administration accepted (non encrypted password).\n");
WFIFOB (fd, 2) = 0;
@@ -4045,12 +4030,12 @@ void parse_login (int fd)
}
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);
+ ("'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);
+ ("'ladmin'-login: Connection in administration mode REFUSED - invalid password (non encrypted password: %s, ip: %s)\n",
+ password, ip);
}
else
{ // encrypted password
@@ -4076,8 +4061,8 @@ void parse_login (int fd)
&& (memcmp (md5bin, RFIFOP (fd, 4), 16) == 0))
{
login_log
- ("'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: %s)"
- RETCODE, ip);
+ ("'ladmin'-login: Connection in administration mode accepted (encrypted password, ip: %s)\n",
+ ip);
printf
("Connection of a remote administration accepted (encrypted password).\n");
WFIFOB (fd, 2) = 0;
@@ -4085,12 +4070,12 @@ void parse_login (int fd)
}
else if (admin_state != 1)
login_log
- ("'ladmin'-login: Connection in administration mode REFUSED - remote administration is disabled (encrypted password, ip: %s)"
- RETCODE, ip);
+ ("'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);
+ ("'ladmin'-login: Connection in administration mode REFUSED - invalid password (encrypted password, ip: %s)\n",
+ ip);
}
}
}
@@ -4111,16 +4096,15 @@ void parse_login (int fd)
strftime (tmpstr, 23, date_format,
gmtime (&(tv.tv_sec)));
fprintf (logfp,
- "%s.%03d: receiving of an unknown packet -> disconnection"
- RETCODE, tmpstr, (int) tv.tv_usec / 1000);
+ "%s.%03d: receiving of an unknown packet -> disconnection\n",
+ tmpstr, (int) tv.tv_usec / 1000);
fprintf (logfp,
- "parse_login: connection #%d (ip: %s), packet: 0x%x (with being read: %d)."
- RETCODE, fd, ip, RFIFOW (fd, 0),
+ "parse_login: connection #%d (ip: %s), packet: 0x%x (with being read: %d).\n",
+ fd, ip, RFIFOW (fd, 0),
RFIFOREST (fd));
- fprintf (logfp, "Detail (in hex):" RETCODE);
+ fprintf (logfp, "Detail (in hex):\n");
fprintf (logfp,
- "---- 00-01-02-03-04-05-06-07 08-09-0A-0B-0C-0D-0E-0F"
- RETCODE);
+ "---- 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++)
{
@@ -4135,7 +4119,7 @@ void parse_login (int fd)
fprintf (logfp, " ");
else if ((i + 1) % 16 == 0)
{
- fprintf (logfp, " %s" RETCODE, tmpstr);
+ fprintf (logfp, " %s\n", tmpstr);
memset (tmpstr, '\0', sizeof (tmpstr));
}
}
@@ -4147,14 +4131,13 @@ void 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 ("End of connection, unknown packet (ip: %s)"
- RETCODE, ip);
+ login_log ("End of connection, unknown packet (ip: %s)\n", ip);
session[fd]->eof = 1;
return;
}
@@ -4280,11 +4263,11 @@ int login_lan_config_read (const char *lancfgName)
fclose_ (fp);
// log the LAN configuration
- login_log ("The LAN configuration of the server is set:" RETCODE);
- login_log ("- with LAN IP of char-server: %s." RETCODE, lan_char_ip);
+ login_log ("The LAN configuration of the server is set:\n");
+ login_log ("- with LAN IP of char-server: %s.\n", lan_char_ip);
login_log
- ("- with the sub-network of the char-server: %d.%d.%d.%d/%d.%d.%d.%d."
- RETCODE, subneti[0], subneti[1], subneti[2], subneti[3],
+ ("- with the sub-network of the char-server: %d.%d.%d.%d/%d.%d.%d.%d.\n",
+ subneti[0], subneti[1], subneti[2], subneti[3],
subnetmaski[0], subnetmaski[1], subnetmaski[2], subnetmaski[3]);
// sub-network check of the char-server
@@ -4302,8 +4285,7 @@ int login_lan_config_read (const char *lancfgName)
printf
("\033[1;31m***ERROR: LAN IP of the char-server doesn't belong to the specified Sub-network\033[0m\n");
login_log
- ("***ERROR: LAN IP of the char-server doesn't belong to the specified Sub-network."
- RETCODE);
+ ("***ERROR: LAN IP of the char-server doesn't belong to the specified Sub-network.\n");
}
}
@@ -4796,156 +4778,136 @@ 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));
+ ("- 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,
+ 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));
+ ("- 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,
+ 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,
+ 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'." RETCODE,
+ 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);
+ ("- to check GM accounts file modifications every %d seconds.\n",
+ gm_account_filename_check_timer);
// not necessary to log the 'login_log_filename', we are inside :)
- login_log ("- with the unknown packets file name: '%s'." RETCODE,
+ 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);
+ ("- 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,
+ 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);
+ ("- 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);
+ ("- 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);
+ ("- 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);
+ ("- to create new accounts with a limited time: time of creation + %d second(s).\n",
+ start_limited_time);
if (check_ip_flag)
login_log
- ("- with control of players IP between login-server and char-server."
- RETCODE);
+ ("- with control of players IP between login-server and char-server.\n");
else
login_log
- ("- to not check players IP between login-server and char-server."
- RETCODE);
+ ("- to not check players IP between login-server and char-server.\n");
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);
+ ("- 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);
+ ("- 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);
+ ("- 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,
+ login_log (" %s\n",
(char *) (access_deny + i * ACO_STRSIZE));
}
}
@@ -4954,54 +4916,50 @@ void save_config_in_log (void)
if (access_allownum == 0)
{
login_log
- ("- with the IP security order: 'allow,deny' (deny if not allow). But, NO IP IS AUTHORISED!"
- RETCODE);
+ ("- 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);
+ ("- 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);
+ ("- 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,
+ 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);
+ ("- 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,
+ 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,
+ login_log (" %s\n",
(char *) (access_deny + i * ACO_STRSIZE));
}
}
@@ -5026,8 +4984,7 @@ void do_final (void)
delete_session (login_fd);
login_log
- ("----End of login-server (normal end with closing of all files)."
- RETCODE);
+ ("----End of login-server (normal end with closing of all files).\n");
}
//------------------------------
@@ -5076,8 +5033,8 @@ int do_init (int argc, char **argv)
i = add_timer_interval (gettick () + j * 1000, check_GM_file, 0, 0, j * 1000); // every x sec we check if gm file has been changed
login_log
- ("The login-server is ready (Server is listening on the port %d)."
- RETCODE, login_port);
+ ("The login-server is ready (Server is listening on the port %d).\n",
+ login_port);
printf
("The login-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n",
diff --git a/src/tool/convert.c b/src/tool/convert.c
index 8436ebb..e256fc9 100644
--- a/src/tool/convert.c
+++ b/src/tool/convert.c
@@ -1,8 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
-#define RETCODE "\r\n"
-
#define MAX_INVENTORY 100
#define MAX_CART 100
#define MAX_SKILL 350
@@ -284,7 +282,7 @@ int mmo_char_convert (char *fname1, char *fname2)
if (ret)
{
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
fcloseall ();
diff --git a/src/tool/itemfrob.c b/src/tool/itemfrob.c
index 646ec73..4651452 100644
--- a/src/tool/itemfrob.c
+++ b/src/tool/itemfrob.c
@@ -35,7 +35,7 @@ int mmo_char_convert ()
{
transform_char (&char_dat);
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
return 0;
diff --git a/src/tool/mapfrob.c b/src/tool/mapfrob.c
index 11983eb..9dc1a5b 100644
--- a/src/tool/mapfrob.c
+++ b/src/tool/mapfrob.c
@@ -61,7 +61,7 @@ int mmo_char_convert ()
{
transform_char (&char_dat);
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
return 0;
diff --git a/src/tool/moneycount/mmo.h b/src/tool/moneycount/mmo.h
index c7ab21f..bd62b49 100644
--- a/src/tool/moneycount/mmo.h
+++ b/src/tool/moneycount/mmo.h
@@ -5,11 +5,6 @@
#define _MMO_H_
#include <time.h>
-#ifdef CYGWIN
-#define RETCODE "\r\n" // (CR/LF?FWindows?n)
-#else
-#define RETCODE "\n" // (LF?FUnix?n?j
-#endif
#define FIFOSIZE_SERVERLINK 256*1024
diff --git a/src/tool/skillfrob.c b/src/tool/skillfrob.c
index c7b6bb6..44855ac 100644
--- a/src/tool/skillfrob.c
+++ b/src/tool/skillfrob.c
@@ -39,7 +39,7 @@ int mmo_char_convert ()
{
transform_char (&char_dat);
mmo_char_tostr (line, &char_dat);
- fprintf (ofp, "%s" RETCODE, line);
+ fprintf (ofp, "%s\n", line);
}
}
fcloseall ();