From b4784c2b5cef28ebe3c104d54a0839d78cb20325 Mon Sep 17 00:00:00 2001 From: codemaster Date: Sun, 19 Dec 2004 03:36:03 +0000 Subject: Fixed compiling problem for TXT since a few commands were placed within an #ifndef TXT_ONLY when they weren't supposed to be git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@625 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 154 ++++++++++++++++++++++++++-------------------------- 1 file changed, 77 insertions(+), 77 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 8e4559cab..742061caa 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -7981,82 +7981,6 @@ int atcommand_misceffect( return 0; } -#ifndef TXT_ONLY /* Begin SQL-Only commands */ - -/*========================================== - * Mail System commands by [Valaris] - *------------------------------------------ - */ -int atcommand_listmail( - const int fd, struct map_session_data* sd, - const char* command, const char* message) -{ - if(!battle_config.mail_system) - return 0; - - nullpo_retr(-1, sd); - - if(strlen(command)==12) - mail_check(sd,3); - else if(strlen(command)==9) - mail_check(sd,2); - else - mail_check(sd,1); - return 0; -} - -int atcommand_readmail( - const int fd, struct map_session_data* sd, - const char* command, const char* message) -{ - if(!battle_config.mail_system) - return 0; - - nullpo_retr(-1, sd); - - if (!message || !*message) { - clif_displaymessage(sd->fd,"You must specify a message number."); - return 0; - } - - if(strlen(command)==11) - mail_delete(sd,atoi(message)); - else - mail_read(sd,atoi(message)); - - return 0; -} - -int atcommand_sendmail( - const int fd, struct map_session_data* sd, - const char* command, const char* message) -{ - char name[24],text[80]; - - if(!battle_config.mail_system) - return 0; - - nullpo_retr(-1, sd); - - if (!message || !*message) { - clif_displaymessage(sd->fd,"You must specify a recipient and a message."); - return 0; - } - - if ((sscanf(message, "\"%[^\"]\" %79[^\n]", name, text) < 2) && - (sscanf(message, "%23s %79[^\n]", name, text) < 2)) { - clif_displaymessage(sd->fd,"You must specify a recipient and a message."); - return 0; - } - - if(strlen(command)==17) - mail_send(sd,name,text,1); - else - mail_send(sd,name,text,0); - - return 0; -} - int charid2sessionid(int charid) { int i; @@ -8693,6 +8617,82 @@ atcommand_charkillableid2( return 0; } +#ifndef TXT_ONLY /* Begin SQL-Only commands */ + +/*========================================== + * Mail System commands by [Valaris] + *------------------------------------------ + */ +int atcommand_listmail( + const int fd, struct map_session_data* sd, + const char* command, const char* message) +{ + if(!battle_config.mail_system) + return 0; + + nullpo_retr(-1, sd); + + if(strlen(command)==12) + mail_check(sd,3); + else if(strlen(command)==9) + mail_check(sd,2); + else + mail_check(sd,1); + return 0; +} + +int atcommand_readmail( + const int fd, struct map_session_data* sd, + const char* command, const char* message) +{ + if(!battle_config.mail_system) + return 0; + + nullpo_retr(-1, sd); + + if (!message || !*message) { + clif_displaymessage(sd->fd,"You must specify a message number."); + return 0; + } + + if(strlen(command)==11) + mail_delete(sd,atoi(message)); + else + mail_read(sd,atoi(message)); + + return 0; +} + +int atcommand_sendmail( + const int fd, struct map_session_data* sd, + const char* command, const char* message) +{ + char name[24],text[80]; + + if(!battle_config.mail_system) + return 0; + + nullpo_retr(-1, sd); + + if (!message || !*message) { + clif_displaymessage(sd->fd,"You must specify a recipient and a message."); + return 0; + } + + if ((sscanf(message, "\"%[^\"]\" %79[^\n]", name, text) < 2) && + (sscanf(message, "%23s %79[^\n]", name, text) < 2)) { + clif_displaymessage(sd->fd,"You must specify a recipient and a message."); + return 0; + } + + if(strlen(command)==17) + mail_send(sd,name,text,1); + else + mail_send(sd,name,text,0); + + return 0; +} + /*========================================== * Refresh online command for SQL [Valaris] * Will refresh and check online column of @@ -8710,4 +8710,4 @@ int atcommand_refreshonline( return 0; } -#endif /* end sql only */ +#endif /* end sql only */ \ No newline at end of file -- cgit v1.2.3-70-g09d2