]> jfr.im git - irc/freenode/ircd-seven.git/commitdiff
Initial merge of charybdis 3.3 development
authorStephen Bennett <redacted>
Mon, 19 Apr 2010 20:26:34 +0000 (21:26 +0100)
committerStephen Bennett <redacted>
Mon, 19 Apr 2010 20:26:34 +0000 (21:26 +0100)
48 files changed:
1  2 
Makefile.in
configure.ac
doc/example.conf
doc/reference.conf
extensions/Makefile.in
include/channel.h
include/chmode.h
include/client.h
include/numeric.h
include/s_conf.h
include/s_newconf.h
include/s_serv.h
include/setup.h.in
modules/Makefile.in
modules/core/m_join.c
modules/core/m_message.c
modules/core/m_mode.c
modules/m_cap.c
modules/m_challenge.c
modules/m_dline.c
modules/m_info.c
modules/m_invite.c
modules/m_kline.c
modules/m_oper.c
modules/m_rehash.c
modules/m_resv.c
modules/m_scan.c
modules/m_stats.c
modules/m_topic.c
modules/m_whois.c
modules/m_xline.c
old/hurt.c
src/channel.c
src/chmode.c
src/client.c
src/ircd.c
src/listener.c
src/logger.c
src/messages.tab
src/modules.c
src/newconf.c
src/s_conf.c
src/s_newconf.c
src/s_serv.c
src/s_user.c
src/send.c
src/sslproc.c
src/version.c.SH

diff --cc Makefile.in
Simple merge
diff --cc configure.ac
index a6084100a573458a3ed6bf652d941cd4ee976a37,e32a053275a5c760d5898e8037fc37aa53211e03..3945c0a1379bcf64fec5514e7b5713511fb284b0
  
  AC_CONFIG_FILES(                      \
        Makefile                        \
+       bandb/Makefile                  \
        ssld/Makefile                   \
        extensions/Makefile             \
 -      unsupported/Makefile            \
        src/Makefile                    \
        modules/Makefile                \
        tools/Makefile                  \
Simple merge
Simple merge
index b3704a26e6042e42faa11d320b5c6bd9fe1f927e,cea88c2a5249c42afd1bc584de084f0286335adc..7cefa5b54cc583a4a7765358c7ffa453a58970b9
@@@ -45,14 -44,13 +45,16 @@@ SRCS =                          
    extb_realname.c             \
    extb_extgecos.c             \
    force_user_invis.c          \
 -  hurt.c                      \
 +  identify_msg.c              \
    ip_cloaking.c                       \
    ip_cloaking_old.c           \
 +  make_override_immune.c      \
 +  sno_channelcreate.c           \
+   ip_cloaking_3.0.c           \
+   ip_cloaking_4.0.c           \
    sno_farconnect.c            \
    sno_globalkline.c           \
 +  sno_globalnickchange.c        \
    sno_globaloper.c            \
    sno_whois.c                 \
    m_42.c                      \
Simple merge
Simple merge
index e8ecc3c12013238d8012a1ed203d4f1288fe79d6,e145aa5476e7f6bb0d7b1f1c624e4223afe94fad..b1f4d78365080a9baa7d2df5e4c90d7bbc9fd9db
@@@ -473,7 -443,7 +466,8 @@@ struct ListClien
  
  #define CLICAP_MULTI_PREFIX   0x0001
  #define CLICAP_SASL           0x0002
 -#define CLICAP_ACCOUNT_HOSTMASK       0x0004
 +#define CLICAP_IDENTIFY_MSG   0x0004
++#define CLICAP_ACCOUNT_HOSTMASK       0x0008
  
  /*
   * flags macros.
Simple merge
index 36734149a4a48f51bb2f0c2275631e76d206b88b,03e0d5faf94b7289ae0b2dc09bf0575aaee8a5d8..422747b774ec74d515c2c5c7f88d32c8b58f5df5
@@@ -222,8 -224,7 +228,9 @@@ struct config_file_entr
        int default_umodes;
        int global_snotices;
        int operspy_dont_care_user_info;
 +      int operhide;
 +      int expire_override_time;
+       int use_propagated_bans;
  };
  
  struct config_channel_entry
Simple merge
index 807e5772f6c06879f558670e6f398f41b0ed782d,16d9e066ae91f7e8cf85637e46a3367266436b15..80b7e3f6b3463c5e92ec5ae3a215239795bf7656
@@@ -54,32 -54,33 +54,34 @@@ struct Capabilit
        unsigned int required;  /* 1 if required, 0 if not */
  };
  
 -#define CAP_CAP         0x00001       /* received a CAP to begin with */
 -#define CAP_QS          0x00002       /* Can handle quit storm removal */
 -#define CAP_EX          0x00004       /* Can do channel +e exemptions */
 -#define CAP_CHW         0x00008       /* Can do channel wall @# */
 -#define CAP_IE          0x00010       /* Can do invite exceptions */
 -#define CAP_KLN               0x00040 /* Can do KLINE message */
 -#define CAP_ZIP         0x00100       /* Can do ZIPlinks */
 -#define CAP_KNOCK     0x00400 /* supports KNOCK */
 -#define CAP_TB                0x00800 /* supports TBURST */
 -#define CAP_UNKLN       0x01000       /* supports remote unkline */
 -#define CAP_CLUSTER     0x02000       /* supports cluster stuff */
 -#define CAP_ENCAP     0x04000 /* supports ENCAP */
 -#define CAP_TS6               0x08000 /* supports TS6 or above */
 -#define CAP_SERVICE   0x10000
 -#define CAP_RSFNC     0x20000 /* rserv FNC */
 -#define CAP_SAVE      0x40000 /* supports SAVE (nick collision FNC) */
 -#define CAP_EUID      0x80000 /* supports EUID (ext UID + nonencap CHGHOST) */
 -#define CAP_EOPMOD    0x100000 /* supports EOPMOD (ext +z + ext topic) */
 -#define CAP_BAN               0x200000 /* supports propagated bans */
 -#define CAP_MLOCK     0x400000 /* supports MLOCK messages */
 +#define CAP_CAP         0x000001 /* received a CAP to begin with */
 +#define CAP_QS          0x000002 /* Can handle quit storm removal */
 +#define CAP_EX          0x000004 /* Can do channel +e exemptions */
 +#define CAP_CHW         0x000008 /* Can do channel wall @# */
 +#define CAP_IE          0x000010 /* Can do invite exceptions */
 +#define CAP_KLN               0x000040 /* Can do KLINE message */
 +#define CAP_ZIP         0x000100 /* Can do ZIPlinks */
 +#define CAP_KNOCK     0x000400 /* supports KNOCK */
 +#define CAP_TB                0x000800 /* supports TBURST */
 +#define CAP_UNKLN       0x001000 /* supports remote unkline */
 +#define CAP_CLUSTER     0x002000 /* supports cluster stuff */
 +#define CAP_ENCAP     0x004000 /* supports ENCAP */
 +#define CAP_TS6               0x008000 /* supports TS6 or above */
 +#define CAP_SERVICE   0x010000
 +#define CAP_RSFNC     0x020000 /* rserv FNC */
 +#define CAP_SAVE      0x040000 /* supports SAVE (nick collision FNC) */
 +#define CAP_EUID      0x080000 /* supports EUID (ext UID + nonencap CHGHOST) */
 +#define CAP_REMOVE    0x100000 /* supports REMOVE */
 +#define CAP_EOPMOD    0x200000 /* supports EOPMOD (ext +z + ext topic) */
++#define CAP_BAN               0x400000 /* supports propagated bans */
++#define CAP_MLOCK     0x800000 /* supports MLOCK messages */
  
  #define CAP_MASK        (CAP_QS  | CAP_EX   | CAP_CHW  | \
                           CAP_IE  | CAP_KLN  | CAP_SERVICE |\
                           CAP_CLUSTER | CAP_ENCAP | \
                           CAP_ZIP  | CAP_KNOCK  | CAP_UNKLN | \
 -                       CAP_RSFNC | CAP_SAVE | CAP_EUID | CAP_EOPMOD | \
 -                       CAP_BAN | CAP_MLOCK)
 +                       CAP_RSFNC | CAP_SAVE | CAP_EUID | \
-                        CAP_REMOVE | CAP_EOPMOD)
++                       CAP_REMOVE | CAP_EOPMOD | CAP_BAN | CAP_MLOCK)
  
  #ifdef HAVE_LIBZ
  #define CAP_ZIP_SUPPORTED       CAP_ZIP
Simple merge
Simple merge
index 689600fb43f01051d55da016eaf5bc6e156a4a2d,c01aba7791bc42182a780852464e906cd461ab21..424acb727d7d9b5beeb4b3a03785dc5885b51718
@@@ -310,29 -286,29 +302,31 @@@ m_join(struct Client *client_p, struct 
                        }
                }
  
 -              /* can_join checks for +i key, bans etc */
 -              if((i = can_join(source_p, chptr, key)))
 -              {
 -                      if ((i != ERR_NEEDREGGEDNICK && i != ERR_THROTTLE && i != ERR_INVITEONLYCHAN && i != ERR_CHANNELISFULL) ||
 -                          (!ConfigChannel.use_forward || (chptr = check_forward(source_p, chptr, key)) == NULL))
 -                      {
 -                              /* might be wrong, but is there any other better location for such?
 -                               * see extensions/chm_operonly.c for other comments on this
 -                               * -- dwr
 -                               */
 -                              if(i != ERR_CUSTOM)
 -                                      sendto_one(source_p, form_str(i), me.name, source_p->name, name);
 +              if(!IsOper(source_p) && !IsExemptSpambot(source_p))
 +                      check_spambot_warning(source_p, name);
  
 -                              continue;
 -                      }
 +              /* If check_forward returns NULL, they couldn't join and there wasn't a usable forward channel. */
 +              if(!(chptr2 = check_forward(source_p, chptr, key, &i)))
 +              {
 +                      /* might be wrong, but is there any other better location for such?
 +                       * see extensions/chm_operonly.c for other comments on this
 +                       * -- dwr
 +                       */
 +                      if(i != ERR_CUSTOM)
 +                              sendto_one(source_p, form_str(i), me.name, source_p->name, name);
  
-                       if(successful_join_count > 0)
-                               successful_join_count--;
 -                      sendto_one_numeric(source_p, ERR_LINKCHANNEL, form_str(ERR_LINKCHANNEL), name, chptr->chname);
 +                      continue;
                }
 +              else if(chptr != chptr2)
 +                      sendto_one_numeric(source_p, ERR_LINKCHANNEL, form_str(ERR_LINKCHANNEL), name, chptr2->chname);
 +
 +              chptr = chptr2;
 +
  
+               if(flags == 0 &&
+                               !IsOper(source_p) && !IsExemptSpambot(source_p))
+                       check_spambot_warning(source_p, name);
                /* add the user to the channel */
                add_user_to_channel(chptr, source_p, flags);
                if (chptr->mode.join_num &&
index cf9a12359491872ca8dc7a8a659684bef5dcdf26,faca81371c5cd7ab0fad5d26d44210eb1eb62a60..20dfea2b77c95c64f9ea5b4539ca4c6361f78cc5
@@@ -686,13 -638,10 +686,9 @@@ msg_channel_flags(int p_or_n, const cha
                        source_p->localClient->last = rb_current_time();
        }
  
 -      sendto_channel_flags(client_p, type, source_p, chptr, "%s %c%s :%s",
 -                           command, c, chptr->chname, text);
 +      sendto_channel_message(client_p, type, source_p, chptr, command, target, "%s", text);
  }
  
- #define PREV_FREE_TARGET(x) ((FREE_TARGET(x) == 0) ? 9 : FREE_TARGET(x) - 1)
- #define PREV_TARGET(i) ((i == 0) ? i = 9 : --i)
- #define NEXT_TARGET(i) ((i == 9) ? i = 0 : ++i)
  static void
  expire_tgchange(void *unused)
  {
@@@ -857,7 -735,11 +782,8 @@@ msg_client(int p_or_n, const char *comm
                        /* Here is the anti-flood bot/spambot code -db */
                        if(accept_message(source_p, target_p) || IsOper(source_p))
                        {
 -                              sendto_one(target_p, ":%s!%s@%s %s %s :%s",
 -                                         source_p->name,
 -                                         source_p->username,
 -                                         source_p->host, command, target_p->name, text);
+                               add_reply_target(target_p, source_p);
 +                              sendto_anywhere_message(target_p, source_p, command, "%s", text);
                        }
                        else if (IsSetRegOnlyMsg(target_p) && !source_p->user->suser[0])
                        {
                        }
                }
                else
 -                      sendto_anywhere(target_p, source_p, command, ":%s", text);
+               {
+                       add_reply_target(target_p, source_p);
 +                      sendto_anywhere_message(target_p, source_p, command, "%s", text);
+               }
        }
        else
                sendto_anywhere(target_p, source_p, command, ":%s", text);
Simple merge
diff --cc modules/m_cap.c
index 79d52ff6befcc17f1fd9ffaea8e89665c9bc8c44,bf9299533f398990ca47970ddb05735e04522980..242a74391d255d9bd00c537af413f005224a2e90
@@@ -68,9 -68,9 +68,10 @@@ static struct clica
        int flags;
        int namelen;
  } clicap_list[] = {
 +      _CLICAP("identify-msg", CLICAP_IDENTIFY_MSG, 0, 0),
        _CLICAP("multi-prefix", CLICAP_MULTI_PREFIX, 0, 0),
-       _CLICAP("sasl", CLICAP_SASL, 0, 0)
+       _CLICAP("sasl", CLICAP_SASL, 0, 0),
+       _CLICAP("source-account-hostmask", CLICAP_ACCOUNT_HOSTMASK, 0, 0),
  };
  
  #define CLICAP_LIST_LEN (sizeof(clicap_list) / sizeof(struct clicap))
index 6a2c28b563be2a564138cdc28e44d430daee0ff2,5b56cfe4c2f42856b7529529b85ed953b01522c4..462720c3cd206affc2eec494321d6f6d1265588a
@@@ -172,10 -172,9 +172,9 @@@ m_challenge(struct Client *client_p, st
  
                if(oper_p == NULL)
                {
-                       sendto_one(source_p, form_str(ERR_NOOPERHOST), 
-                                  me.name, source_p->name);
+                       sendto_one_numeric(source_p, ERR_NOOPERHOST, form_str(ERR_NOOPERHOST));
                        ilog(L_FOPER, "FAILED OPER (%s) by (%s!%s@%s) (%s)",
 -                           source_p->localClient->opername, source_p->name,
 +                           source_p->user->opername, source_p->name,
                             source_p->username, source_p->host,
                             source_p->sockhost);
  
index d193d5ad4b8393e68bfd67df1f75c46abf9b359e,bb928ac4c92a02686dccfdaf6e6bf15b1c7632bd..652044be54cec44cd0021d82f9c7c3f9f0c08800
@@@ -83,10 -85,9 +85,9 @@@ mo_dline(struct Client *client_p, struc
        const char *target_server = NULL;
        int loc = 1;
  
 -      if(!IsOperK(source_p))
 +      if(!IsOperKline(source_p))
        {
-               sendto_one(source_p, form_str(ERR_NOPRIVS),
-                          me.name, source_p->name, "kline");
+               sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "kline");
                return 0;
        }
  
@@@ -141,13 -142,12 +142,12 @@@ mo_undline(struct Client *client_p, str
        const char *cidr;
        const char *target_server = NULL;
  
 -      if(!IsOperK(source_p))
 +      if(!IsOperKline(source_p))
        {
-               sendto_one(source_p, form_str(ERR_NOPRIVS),
-                          me.name, source_p->name, "unkline");
-               return 0;
-       }
-  
+               sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "unkline");
+               return 0;
+       }
        cidr = parv[1];
  
        if(parc >= 4 && !irccmp(parv[2], "ON"))
@@@ -313,23 -309,22 +309,22 @@@ apply_dline(struct Client *source_p, co
  
                if(EmptyString(oper_reason))
                {
 -                      sendto_realops_snomask(SNO_GENERAL, L_ALL,
 +                      sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
-                                            "%s added temporary %d min. D-Line for [%s] [%s]",
-                                            get_oper_name(source_p), tdline_time / 60,
-                                            aconf->host, reason);
+                                              "%s added temporary %d min. D-Line for [%s] [%s]",
+                                              get_oper_name(source_p), tdline_time / 60,
+                                              aconf->host, reason);
                        ilog(L_KLINE, "D %s %d %s %s",
-                               get_oper_name(source_p), tdline_time / 60,
-                               aconf->host, reason);
+                            get_oper_name(source_p), tdline_time / 60, aconf->host, reason);
                }
                else
                {
 -                      sendto_realops_snomask(SNO_GENERAL, L_ALL,
 +                      sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
-                                            "%s added temporary %d min. D-Line for [%s] [%s|%s]",
-                                            get_oper_name(source_p), tdline_time / 60,
-                                            aconf->host, reason, oper_reason);
+                                              "%s added temporary %d min. D-Line for [%s] [%s|%s]",
+                                              get_oper_name(source_p), tdline_time / 60,
+                                              aconf->host, reason, oper_reason);
                        ilog(L_KLINE, "D %s %d %s %s|%s",
-                               get_oper_name(source_p), tdline_time / 60,
-                               aconf->host, reason, oper_reason);
+                            get_oper_name(source_p), tdline_time / 60,
+                            aconf->host, reason, oper_reason);
                }
  
                sendto_one(source_p, ":%s NOTICE %s :Added temporary %d min. D-Line for [%s]",
@@@ -379,96 -384,19 +384,19 @@@ apply_undline(struct Client *source_p, 
                sendto_one(source_p,
                           ":%s NOTICE %s :Un-dlined [%s] from temporary D-lines",
                           me.name, source_p->name, buf);
 -              sendto_realops_snomask(SNO_GENERAL, L_ALL,
 +              sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
-                                    "%s has removed the temporary D-Line for: [%s]",
-                                    get_oper_name(source_p), buf);
+                                      "%s has removed the temporary D-Line for: [%s]",
+                                      get_oper_name(source_p), buf);
                ilog(L_KLINE, "UD %s %s", get_oper_name(source_p), buf);
                return 0;
        }
  
-       filename = get_conf_name(DLINE_TYPE);
+       bandb_del(BANDB_DLINE, aconf->host, NULL);
  
-       if((in = fopen(filename, "r")) == 0)
-       {
-               sendto_one(source_p, ":%s NOTICE %s :Cannot open %s", me.name, source_p->name, filename);
-               return 0;
-       }
-       oldumask = umask(0);
-       if((out = fopen(temppath, "w")) == 0)
-       {
-               sendto_one(source_p, ":%s NOTICE %s :Cannot open %s", me.name, source_p->name, temppath);
-               fclose(in);
-               umask(oldumask);
-               return 0;
-       }
-       umask(oldumask);
-       while (fgets(buf, sizeof(buf), in))
-       {
-               rb_strlcpy(buff, buf, sizeof(buff));
-               if((p = strchr(buff, '\n')) != NULL)
-                       *p = '\0';
-               if((*buff == '\0') || (*buff == '#'))
-               {
-                       if(!error_on_write)
-                               flush_write(source_p, out, buf, temppath);
-                       continue;
-               }
-               if((found_cidr = getfield(buff)) == NULL)
-               {
-                       if(!error_on_write)
-                               flush_write(source_p, out, buf, temppath);
-                       continue;
-               }
-               if(irccmp(found_cidr, aconf->host) == 0)
-               {
-                       pairme++;
-               }
-               else
-               {
-                       if(!error_on_write)
-                               flush_write(source_p, out, buf, temppath);
-                       continue;
-               }
-       }
-       fclose(in);
-       if (fclose(out))
-               error_on_write = YES;
-       if(error_on_write)
-       {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :Couldn't write D-line file, aborted", 
-                          me.name, source_p->name);
-               return 0;
-       }
-       else if(!pairme)
-       {
-               sendto_one_notice(source_p, ":Cannot find D-Line for %s in file",
-                               aconf->host);
-               if(temppath != NULL)
-                       (void) unlink(temppath);
-               return 0;
-       }
-       if (rename(temppath, filename))
-       {
-               sendto_one_notice(source_p, ":Couldn't rename temp file, aborted");
-               return 0;
-       }
-       sendto_one(source_p, ":%s NOTICE %s :D-Line for [%s] is removed", me.name, source_p->name, aconf->host);
-       sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
-                            "%s has removed the D-Line for: [%s]", get_oper_name(source_p), aconf->host);
+       sendto_one(source_p, ":%s NOTICE %s :D-Line for [%s] is removed", me.name, source_p->name,
+                  aconf->host);
 -      sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s has removed the D-Line for: [%s]",
++      sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s has removed the D-Line for: [%s]",
+                              get_oper_name(source_p), aconf->host);
        ilog(L_KLINE, "UD %s %s", get_oper_name(source_p), aconf->host);
        delete_one_address_conf(aconf->host, aconf);
  
Simple merge
Simple merge
index ab84f1f97e72e3a264056ca577fba53785e9bc46,89ba2353344abf36250841176cc4144a36addf53..2567753c5a40fd5c9070cdc52c0a8395db15a24a
@@@ -106,11 -107,11 +107,11 @@@ mo_kline(struct Client *client_p, struc
        struct ConfItem *aconf;
        int tkline_time = 0;
        int loc = 1;
+       int propagated = ConfigFileEntry.use_propagated_bans;
  
 -      if(!IsOperK(source_p))
 +      if(!IsOperKline(source_p))
        {
-               sendto_one(source_p, form_str(ERR_NOPRIVS),
-                          me.name, source_p->name, "kline");
+               sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, source_p->name, "kline");
                return 0;
        }
  
  
        if(target_server != NULL)
        {
-                                       "%s is adding a temporary %d min. K-Line for [%s@%s] on %s [%s|%s]",
 +              if (tkline_time)
 +                      sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
-                                       reason, oper_reason);
++                                      "%s is adding a temporary %d min. K-Line for [%s@%s] on %s [%s]",
 +                                      get_oper_name(source_p), tkline_time / 60, user, host, target_server,
-                                       "%s is adding a K-Line for [%s@%s] on %s [%s|%s]",
-                                       get_oper_name(source_p), user, host, target_server, reason, oper_reason);
++                                      reason);
 +              else
 +                      sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
++                                      "%s is adding a K-Line for [%s@%s] on %s [%s]",
++                                      get_oper_name(source_p), user, host, target_server, reason);
 +
                propagate_generic(source_p, "KLINE", target_server, CAP_KLN,
-                               "%d %s %s :%s|%s",
-                               tkline_time, user, host, reason, oper_reason);
+                                 "%d %s %s :%s", tkline_time, user, host, reason);
  
                /* If we are sending it somewhere that doesnt include us, stop */
                if(!match(target_server, me.name))
@@@ -409,11 -404,7 +414,10 @@@ mo_unkline(struct Client *client_p, str
                        return 0;
                }
  
-               propagate_generic(source_p, "UNKLINE", parv[3], CAP_UNKLN,
-                               "%s %s", user, host);
 +              sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is removing the K-Line for [%s@%s] on %s",
 +                              get_oper_name(source_p), user, host, parv[3]);
 +
+               propagate_generic(source_p, "UNKLINE", parv[3], CAP_UNKLN, "%s %s", user, host);
  
                if(match(parv[3], me.name) == 0)
                        return 0;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 85c60f79315c59dffe6be4a3b29bdcee008ad563,55be75ae95970d25f6aa7d28cd71eb01883ff7ff..54b282cec6dd04aa0a4e3207e6c49351766edfa5
@@@ -118,37 -114,30 +118,39 @@@ m_topic(struct Client *client_p, struc
                        return 0;
                }
  
-               if(MyClient(source_p) && (chptr->mode.mode & MODE_TOPICLIMIT) && !is_chanop(msptr))
 -              if(((chptr->mode.mode & MODE_TOPICLIMIT) == 0 ||
++              if(!MyClient(source_p) || (((chptr->mode.mode & MODE_TOPICLIMIT) == 0 ||
+                                       is_chanop(msptr)) &&
 -                              (!MyClient(source_p) ||
+                                can_send(chptr, source_p, msptr)))
                {
 -                      char topic_info[USERHOST_REPLYLEN];
 -                      rb_sprintf(topic_info, "%s!%s@%s",
 -                                      source_p->name, source_p->username, source_p->host);
 -                      set_channel_topic(chptr, parv[2], topic_info, rb_current_time());
 -
 -                      sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
 -                                      ":%s TOPIC %s :%s",
 -                                      use_id(source_p), chptr->chname,
 -                                      chptr->topic == NULL ? "" : chptr->topic);
 -                      sendto_channel_local(ALL_MEMBERS,
 -                                      chptr, ":%s!%s@%s TOPIC %s :%s",
 -                                      source_p->name, source_p->username,
 -                                      source_p->host, chptr->chname,
 -                                      chptr->topic == NULL ? "" : chptr->topic);
 +                      if(IsOverride(source_p))
 +                              sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
 +                                              "%s is overriding TOPIC on [%s]",
 +                                              get_oper_name(source_p), chptr->chname);
 +                      else
 +                      {
 +                              sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
 +                                              get_id(&me, source_p),
 +                                              get_id(source_p, source_p), name);
 +                              return 0;
 +                      }
                }
 -              else
 -                      sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED),
 -                                      get_id(&me, source_p),
 -                                      get_id(source_p, source_p), name);
 +
 +              rb_strlcpy(topic, parv[2], BUFSIZE);
 +              strip_colour(topic);
 +
 +              rb_sprintf(topic_info, "%s!%s@%s",
 +                              source_p->name, source_p->username, source_p->host);
 +              set_channel_topic(chptr, topic, topic_info, rb_current_time());
 +
 +              sendto_server(client_p, chptr, CAP_TS6, NOCAPS,
 +                              ":%s TOPIC %s :%s",
 +                              use_id(source_p), chptr->chname,
 +                              chptr->topic == NULL ? "" : chptr->topic);
 +              sendto_channel_local(ALL_MEMBERS,
 +                              chptr, ":%s!%s@%s TOPIC %s :%s",
 +                              source_p->name, source_p->username,
 +                              source_p->host, chptr->chname,
 +                              chptr->topic == NULL ? "" : chptr->topic);
        }
        else if(MyClient(source_p))
        {
Simple merge
index 4e9ace668f0cdd612cd999ea36d98ea5e347d5a5,d1975ecdb8436b98745023364e83e3354d482958..0e358df220805e9ec3bc4506b54b873fd5cc69df
@@@ -145,41 -148,23 +148,29 @@@ mo_xline(struct Client *client_p, struc
  
        reason = parv[loc];
  
-       if (temp_time == 0)
-       {
-               escapedname = escape_perm_xline(name);
-               if (strcmp(escapedname, name))
-                       sendto_one_notice(source_p, ":Changed xline from [%s] to [%s]",
-                                       name, escapedname);
-       }
-       else
-               escapedname = rb_strdup(name);
        if(target_server != NULL)
        {
-               propagate_xline(source_p, target_server, temp_time,
-                               escapedname, "2", reason);
 +              if (temp_time)
 +                      sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is adding a temporary %d min. X-Line for [%s] on %s [%s]",
 +                                      get_oper_name(source_p), temp_time / 60, name, target_server, reason);
 +              else
 +                      sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is adding a permanent X-Line for [%s] on %s [%s]",
 +                                      get_oper_name(source_p), name, target_server, reason);
+               propagate_xline(source_p, target_server, temp_time, name, "2", reason);
  
                if(!match(target_server, me.name))
-               {
-                       rb_free(escapedname);
                        return 0;
-               }
+               /* Set as local-only. */
+               propagated = 0;
        }
-       else if(rb_dlink_list_length(&cluster_conf_list) > 0)
-               cluster_xline(source_p, temp_time, escapedname, reason);
+       else if(!propagated && rb_dlink_list_length(&cluster_conf_list) > 0)
+               cluster_xline(source_p, temp_time, name, reason);
  
-       if((aconf = find_xline_mask(escapedname)) != NULL)
+       if((aconf = find_xline_mask(name)) != NULL)
        {
                sendto_one(source_p, ":%s NOTICE %s :[%s] already X-Lined by [%s] - %s",
-                          me.name, source_p->name, escapedname, aconf->name, aconf->passwd);
-               rb_free(escapedname);
+                          me.name, source_p->name, name, aconf->host, aconf->passwd);
                return 0;
        }
  
@@@ -522,11 -419,7 +425,10 @@@ mo_unxline(struct Client *client_p, str
                        return 0;
                }
  
-               propagate_generic(source_p, "UNXLINE", parv[3], CAP_CLUSTER,
-                               "%s", parv[1]);
 +              sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "%s is removing the X-Line for [%s] on %s.",
 +                              get_oper_name(source_p), parv[1], parv[3]);
 +
+               propagate_generic(source_p, "UNXLINE", parv[3], CAP_CLUSTER, "%s", parv[1]);
  
                if(match(parv[3], me.name) == 0)
                        return 0;
diff --cc old/hurt.c
Simple merge
diff --cc src/channel.c
index 8b5004558478c0649a8ea38a187aabbfe6bfd27f,1a159f1477904e39bbaf01bc1482f19300ed282b..fc509389b296be92d1771cd8d4a7b677b4d32df7
@@@ -1131,11 -1121,11 +1130,11 @@@ channel_modes_real(struct Channel *chpt
                *mbuf++ = 'j';
  
                if(pbuf > buf2 || !IsClient(client_p) || IsMember(client_p, chptr))
-                       pbuf += rb_sprintf(pbuf, " %d:%d", chptr->mode.join_num,
-                                          chptr->mode.join_time);
+                       pbuf += rb_sprintf(pbuf, " %d:%d", mode->join_num,
+                                          mode->join_time);
        }
  
 -      if(*mode->forward && (ConfigChannel.use_forward || !IsClient(client_p)))
 +      if(*chptr->mode.forward)
        {
                *mbuf++ = 'f';
  
diff --cc src/chmode.c
index 4e42bba95dc9489ffced36ce8b152f8f7af9ddfb,ea0613ba5b16d1a969d30cb7404210180bf9927d..d0a5915a418e00e228e8c8942712a922cb05d5be
@@@ -101,24 -98,16 +100,8 @@@ construct_cflags_strings(void
                        chmode_flags[i] = 0;
                }
                  
-               if (prev_chmode_flags[i] != 0 && prev_chmode_flags[i] != chmode_flags[i])
-               {
-                       if (chmode_flags[i] == 0)
-                       {
-                                 chmode_table[i].set_func = chm_orphaned;
-                               sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "Cmode +%c is now orphaned", i);
-                       }
-                       else
-                       {
-                               sendto_realops_snomask(SNO_DEBUG, L_NETWIDE, "Orphaned cmode +%c is picked up by module", i);
-                       }
-                       chmode_flags[i] = prev_chmode_flags[i];
-               }
-               else
-                       prev_chmode_flags[i] = chmode_flags[i];
-                 
                switch (chmode_flags[i])
                {
 -                  case MODE_EXLIMIT:
 -                  case MODE_DISFORWARD:
 -                      if(ConfigChannel.use_forward)
 -                      {
 -                          *ptr++ = (char) i;
 -                      }
 -                      
 -                      break;
                    case MODE_REGONLY:
                        if(rb_dlink_list_length(&service_list))
                        {
@@@ -527,8 -516,13 +538,8 @@@ chm_simple(struct Client *source_p, str
                return;
  
        /* setting + */
-       if((dir == MODE_ADD) && !(chptr->mode.mode & mode_type))
+       if((dir == MODE_ADD) && !(chptr->mode.mode & mode_type) && !(chptr->mode_lock.off_mode & mode_type))
        {
 -              /* if +f is disabled, ignore an attempt to set +QF locally */
 -              if(!ConfigChannel.use_forward && MyClient(source_p) &&
 -                 (c == 'Q' || c == 'F'))
 -                      return;
 -
                chptr->mode.mode |= mode_type;
  
                mode_changes[mode_count].letter = c;
                mode_changes[mode_count].nocaps = 0;
                mode_changes[mode_count].id = NULL;
                mode_changes[mode_count].mems = ALL_MEMBERS;
 +              mode_changes[mode_count].override = override;
                mode_changes[mode_count++].arg = NULL;
        }
-       else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type))
+       else if((dir == MODE_DEL) && (chptr->mode.mode & mode_type) && !(chptr->mode_lock.mode & mode_type))
        {
                chptr->mode.mode &= ~mode_type;
  
@@@ -804,21 -729,12 +815,18 @@@ chm_ban(struct Client *source_p, struc
  
                RB_DLINK_FOREACH(ptr, list->head)
                {
 +                      char buf[BANLEN];
                        banptr = ptr->data;
 +                      if(banptr->forward)
 +                              rb_snprintf(buf, sizeof(buf), "%s$%s", banptr->banstr, banptr->forward);
 +                      else
 +                              rb_strlcpy(buf, banptr->banstr, sizeof(buf));
 +
                        sendto_one(source_p, form_str(rpl_list),
                                   me.name, source_p->name, chptr->chname,
 -                                 banptr->banstr, banptr->who, banptr->when);
 +                                 buf, banptr->who, banptr->when);
                }
-               if (mode_type == CHFL_QUIET)
-                       sendto_one(source_p, ":%s %d %s %s :End of Channel Quiet List", me.name, rpl_endlist, source_p->name, chptr->chname);
-               else
-                       sendto_one(source_p, form_str(rpl_endlist), me.name, source_p->name, chptr->chname);
+               sendto_one(source_p, form_str(rpl_endlist), me.name, source_p->name, chptr->chname);
                return;
        }
  
diff --cc src/client.c
index ae64b8d771a4d689fd4b7a173c3b342a9103032d,144e3288a0205917aac7a4aac7b2bcbb49f7b1fe..1d0a83271dc6f290586b93cbff69ae7a8ec7d90d
@@@ -238,13 -231,10 +238,14 @@@ free_local_client(struct Client *client
                rb_free(client_p->localClient->passwd);
        }
  
 +      if(client_p->localClient->override_timeout_event)
 +      {
 +              rb_event_delete(client_p->localClient->override_timeout_event);
 +      }
 +
+       rb_free(client_p->localClient->auth_user);
        rb_free(client_p->localClient->challenge);
        rb_free(client_p->localClient->fullcaps);
 -      rb_free(client_p->localClient->opername);
        rb_free(client_p->localClient->mangledhost);
        if (client_p->localClient->privset)
                privilegeset_unref(client_p->localClient->privset);
@@@ -593,10 -584,10 +595,10 @@@ check_xlines(void
                {
                        if(IsExemptKline(client_p))
                        {
 -                              sendto_realops_snomask(SNO_GENERAL, L_ALL,
 +                              sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                     "XLINE over-ruled for %s, client is kline_exempt [%s]",
                                                     get_client_name(client_p, HIDE_IP),
-                                                    aconf->name);
+                                                    aconf->host);
                                continue;
                        }
  
diff --cc src/ircd.c
index f523cb0ce0417204b85907bf948e7f3608edcaad,b5f8076ac3fc667635d5696bc2da9482eebb42ef..d48fa064a27a380a2bde9ba1334024c9436b140b
@@@ -331,11 -324,11 +324,14 @@@ initialize_global_set_options(void
                splitchecking = 1;
        }
  
-       GlobalSetOptions.ident_timeout = IDENT_TIMEOUT;
+       if(ConfigFileEntry.default_ident_timeout)
+               GlobalSetOptions.ident_timeout = ConfigFileEntry.default_ident_timeout;
+       else
+               GlobalSetOptions.ident_timeout = IDENT_TIMEOUT;
  
 +      rb_strlcpy(GlobalSetOptions.helperstring,
 +              ConfigFileEntry.default_helperstring,
 +              sizeof(GlobalSetOptions.helperstring));
        rb_strlcpy(GlobalSetOptions.operstring,
                ConfigFileEntry.default_operstring,
                sizeof(GlobalSetOptions.operstring));
diff --cc src/listener.c
Simple merge
diff --cc src/logger.c
Simple merge
Simple merge
diff --cc src/modules.c
Simple merge
diff --cc src/newconf.c
index 89c61fea44496fd762ec5f0f97130c666bceda0c,1769d35d8097d718ea74740f16e8a86e3ca0c88b..9d15f8be5244242c147db39c10043f5834d6c4aa
@@@ -2130,9 -2134,9 +2136,10 @@@ static struct ConfEntry conf_general_ta
        { "client_exit",        CF_YESNO, NULL, 0, &ConfigFileEntry.client_exit         },
        { "client_flood",       CF_INT,   NULL, 0, &ConfigFileEntry.client_flood        },
        { "collision_fnc",      CF_YESNO, NULL, 0, &ConfigFileEntry.collision_fnc       },
 +      { "post_registration_delay", CF_TIME, NULL, 0, &ConfigFileEntry.post_registration_delay },
        { "connect_timeout",    CF_TIME,  NULL, 0, &ConfigFileEntry.connect_timeout     },
        { "default_floodcount", CF_INT,   NULL, 0, &ConfigFileEntry.default_floodcount  },
+       { "default_ident_timeout",      CF_INT, NULL, 0, &ConfigFileEntry.default_ident_timeout         },
        { "disable_auth",       CF_YESNO, NULL, 0, &ConfigFileEntry.disable_auth        },
        { "dots_in_ident",      CF_INT,   NULL, 0, &ConfigFileEntry.dots_in_ident       },
        { "failed_oper_notice", CF_YESNO, NULL, 0, &ConfigFileEntry.failed_oper_notice  },
        { "ts_warn_delta",      CF_TIME,  NULL, 0, &ConfigFileEntry.ts_warn_delta       },
        { "use_whois_actually", CF_YESNO, NULL, 0, &ConfigFileEntry.use_whois_actually  },
        { "warn_no_nline",      CF_YESNO, NULL, 0, &ConfigFileEntry.warn_no_nline       },
 +      { "hide_opers",         CF_YESNO, NULL, 0, &ConfigFileEntry.operhide            },
 +      { "expire_override_time",CF_TIME, NULL, 0, &ConfigFileEntry.expire_override_time},
+       { "use_propagated_bans",CF_YESNO, NULL, 0, &ConfigFileEntry.use_propagated_bans },
        { "\0",                 0,        NULL, 0, NULL }
  };
  
diff --cc src/s_conf.c
index 5ffd9596b65149a4355190ca5d5e9db20f338975,d8808c70a953252cf1bd3f189e84994731f37de2..84a6a7f84966d47970177ff579592aaedd4c9105
@@@ -346,11 -357,11 +357,11 @@@ verify_access(struct Client *client_p, 
  
                        if(IsConfSpoofNotice(aconf))
                        {
 -                              sendto_realops_snomask(SNO_GENERAL, L_ALL,
 +                              sendto_realops_snomask(SNO_GENERAL, L_NETWIDE,
                                                "%s spoofing: %s as %s",
                                                client_p->name,
-                                               show_ip(NULL, client_p) ? client_p->host : aconf->name,
-                                               aconf->name);
+                                               show_ip(NULL, client_p) ? client_p->host : aconf->info.name,
+                                               aconf->info.name);
                        }
  
                        /* user@host spoof */
diff --cc src/s_newconf.c
Simple merge
diff --cc src/s_serv.c
index f10d692b59312d1d07dded97f1ba50d5ea0600dc,684e3a1696d911ff17d81acd6242d0b4d7ab8bde..337db2f388b9e151d2dfa4d713a8ff0fbf55cd5c
@@@ -87,8 -87,9 +87,10 @@@ struct Capability captab[] = 
        { "RSFNC",      CAP_RSFNC },
        { "SAVE",       CAP_SAVE },
        { "EUID",       CAP_EUID },
 +      { "REMOVE",     CAP_REMOVE },
        { "EOPMOD",     CAP_EOPMOD },
+       { "BAN",        CAP_BAN },
+       { "MLOCK",      CAP_MLOCK },
        {0, 0}
  };
  
diff --cc src/s_user.c
Simple merge
diff --cc src/send.c
Simple merge
diff --cc src/sslproc.c
Simple merge
index 26389ff1025c8ef6acd5572a7e14d12858009c5f,641bda1057e49f53b22175ba53defe77dee233aa..0d893351420671221f1c550a02fee7a04bb37d6d
@@@ -65,9 -64,8 +65,9 @@@ const char *infotext[] 
    "Based on the original code written by Jarkko Oikarinen",
    "Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
    "Copyright (c) 1996-2001 Hybrid Development Team", 
-   "Copyright (c) 2002-2008 ircd-ratbox Development Team",
-   "Copyright (c) 2005-2009 charybdis development team",
-   "Copyright (c) 2007-2009 ircd-seven development team",
+   "Copyright (c) 2002-2009 ircd-ratbox Development Team",
+   "Copyright (c) 2005-2010 charybdis development team",
++  "Copyright (c) 2007-2010 ircd-seven development team",
    "",
    "This program is free software; you can redistribute it and/or",
    "modify it under the terms of the GNU General Public License as",