]> jfr.im git - solanum.git/blobdiff - modules/core/m_ban.c
Unify oper:{global,local}_kill
[solanum.git] / modules / core / m_ban.c
index 94c18f2dcf2d5a15d4541db5d7d2bb959b8fd669..897a40b02d2babbe469c4486983a2b17db26ece2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * charybdis: An advanced ircd.
+ * Solanum: a slightly advanced ircd
  * m_ban.c: Propagates network bans across servers.
  *
  *  Copyright (C) 2010 Jilles Tjoelker
@@ -64,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");
 }
 
@@ -286,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: