]> jfr.im git - solanum.git/blobdiff - modules/core/m_ban.c
Replace most checks for +o with oper:general
[solanum.git] / modules / core / m_ban.c
index b46e830b007096e471246c3e40a5c1f0e86560c4..b1e738d3a77eb326f284fc4ee4893560b6cdcead 100644 (file)
@@ -31,8 +31,7 @@
 #include "send.h"
 #include "channel.h"
 #include "client.h"
-#include "common.h"
-#include "config.h"
+#include "defaults.h"
 #include "ircd.h"
 #include "match.h"
 #include "s_conf.h"
@@ -65,7 +64,7 @@ m_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p,
 {
        sendto_one_notice(source_p, ":The BAN command is not user-accessible.");
        sendto_one_notice(source_p, ":To ban a user from a channel, see /QUOTE HELP CMODE");
-       if (IsOper(source_p))
+       if (IsOperGeneral(source_p))
                sendto_one_notice(source_p, ":To ban a user from a server or from the network, see /QUOTE HELP KLINE");
 }
 
@@ -287,20 +286,7 @@ ms_ban(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p
                        else
                        {
                                add_conf_by_address(aconf->host, CONF_KILL, aconf->user, NULL, aconf);
-                               if(ConfigFileEntry.kline_delay ||
-                                               (IsServer(source_p) &&
-                                                !HasSentEob(source_p)))
-                               {
-                                       if(kline_queued == 0)
-                                       {
-                                               rb_event_addonce("check_klines", check_klines_event, NULL,
-                                                       ConfigFileEntry.kline_delay ?
-                                                               ConfigFileEntry.kline_delay : 1);
-                                               kline_queued = 1;
-                                       }
-                               }
-                               else
-                                       check_klines();
+                               check_one_kline(aconf);
                        }
                        break;
                case CONF_XLINE: