summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-19 03:36:03 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-19 03:36:03 +0000
commitb4784c2b5cef28ebe3c104d54a0839d78cb20325 (patch)
treeace5e1c24d25aa285b716d559814db2d846c8e53 /src/map/atcommand.c
parentc9b0127ee20b85aad7183ae7566431fd7b6e62e2 (diff)
downloadhercules-b4784c2b5cef28ebe3c104d54a0839d78cb20325.tar.gz
hercules-b4784c2b5cef28ebe3c104d54a0839d78cb20325.tar.bz2
hercules-b4784c2b5cef28ebe3c104d54a0839d78cb20325.tar.xz
hercules-b4784c2b5cef28ebe3c104d54a0839d78cb20325.zip
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
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c154
1 files changed, 77 insertions, 77 deletions
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