changed Makefile; build all commands as an own file
[NeonServV5.git] / cmd_neonserv_bans.c
index 29aeb6acb328eda4161f3cf172b6861979cd16c5..31231d468053df6e78dfcf2b106f11b357ff5739 100644 (file)
@@ -1,8 +1,10 @@
 
+#include "cmd_neonserv.h"
+
 /*
 * argv[0]    (optional) mask
 */
-static CMD_BIND(neonserv_cmd_bans) {
+CMD_BIND(neonserv_cmd_bans) {
     MYSQL_RES *res;
     MYSQL_ROW row;
     //ban list
@@ -32,7 +34,7 @@ static CMD_BIND(neonserv_cmd_bans) {
                     table_change_field(table, i+1, 3, get_language_string(user, "NS_USERS_SEEN_NEVER"));
                 with_expire = 1;
             }
-            content[3] = timeToStr(user, (time(0) - atoi(row[3])), 2, expires_str);
+            content[3] = timeToStr(user, (atoi(row[3]) - time(0)), 2, expires_str);
         } else
             content[3] = (with_expire ? get_language_string(user, "NS_USERS_SEEN_NEVER") : NULL);
         content[4] = row[4];