changed Makefile; build all commands as an own file
[NeonServV5.git] / cmd_neonserv_trim.c
index 345a9e23e8e701b0494d24af76f06ba183b3d10e..67501a7107033f4ed77b84da759f77b9c6524fc4 100644 (file)
@@ -1,4 +1,6 @@
 
+#include "cmd_neonserv.h"
+
 /*
 * argv[0]  target (format: minaccess-maxaccess/users/bans)
 * argv[1]  duration
@@ -15,7 +17,7 @@ struct neonserv_cmd_trim_cache {
     int duration;
 };
 
-static CMD_BIND(neonserv_cmd_trim) {
+CMD_BIND(neonserv_cmd_trim) {
     if(stricmp(argv[0], "bans") && !checkChannelAccess(user, chan, "channel_candel", 0, 0)) {
         if(isGodMode(user)) {
             event->flags |= CMDFLAG_OPLOG;
@@ -46,7 +48,7 @@ static CMD_BIND(neonserv_cmd_trim) {
             seperator++;
             min_access = atoi(argv[0]);
             max_access = atoi(seperator);
-            if(max_access > min_access) {
+            if(max_access < min_access) {
                 reply(getTextBot(), user, "NS_INVALID_ACCESS_RANGE", min_access, max_access);
                 return;
             }