Преглед изворни кода

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://svn.code.sf.net/p/rathena/svn/branches/stable@625 54d463be-8e91-2dee-dedb-b68131a5f0ec
codemaster пре 20 година
родитељ
комит
e0f657f0f9
1 измењених фајлова са 77 додато и 77 уклоњено
  1. 77 77
      src/map/atcommand.c

+ 77 - 77
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 */