Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-07-12 02:47:19 UTC

Modified files:
     ChangeLog doc/example.conf doc/readme.features
     include/ircd_features.h include/supported.h ircd/channel.c
     ircd/ircd_features.c ircd/m_join.c ircd/m_names.c

Log message:

Add CHANNELLEN feature, analogous to NICKLEN feature.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.658 ircu2.10/ChangeLog:1.659
--- ircu2.10/ChangeLog:1.658    Mon Jul 11 19:13:08 2005
+++ ircu2.10/ChangeLog  Mon Jul 11 19:46:59 2005
@@ -1,3 +1,25 @@
+2005-07-11  Michael Poole <[EMAIL PROTECTED]>
+
+       * doc/readme.features: Document FEAT_CHANNELLEN.
+
+       * doc/example.conf: Give an example of it.
+
+       * ircd/m_join.c (ms_join): Do not clean channel names from remote
+       servers, to avoid desynchs.
+
+       * ircd/m_names.c (ms_names): Likewise.
+
+2005-07-11  Stephan Peijnik <[EMAIL PROTECTED]>
+
+       * include/ircd_features.h: Declare new FEAT_CHANNELLEN.
+
+       * include/supported.h: Add it to the ISUPPORT display.
+
+       * ircd/channel.c (clean_channelname): Impose the lower limit
+       between FEAT_CHANNELLEN and CHANNELLEN.
+
+       * ircd/ircd_features.c: Define FEAT_CHANNELLEN.
+
 2005-07-11  Reed Loden <[EMAIL PROTECTED]>
 
        * include/sys.h: Move FD_SETSIZE redefinition to engine_select.c.
Index: ircu2.10/doc/example.conf
diff -u ircu2.10/doc/example.conf:1.57 ircu2.10/doc/example.conf:1.58
--- ircu2.10/doc/example.conf:1.57      Sun Apr 24 20:35:54 2005
+++ ircu2.10/doc/example.conf   Mon Jul 11 19:47:07 2005
@@ -805,6 +805,7 @@
 # "IPCHECK_CLONE_LIMIT" = "4";
 # "IPCHECK_CLONE_PERIOD" = "40";
 # "IPCHECK_CLONE_DELAY" = "600";
+# "CHANNELLEN" = "200";
 # "CONFIG_OPERCMDS" = "FALSE";
 # "OPLEVELS" = "TRUE";
 # "LOCAL_CHANNELS" = "TRUE";
Index: ircu2.10/doc/readme.features
diff -u ircu2.10/doc/readme.features:1.17 ircu2.10/doc/readme.features:1.18
--- ircu2.10/doc/readme.features:1.17   Tue Mar 29 20:13:23 2005
+++ ircu2.10/doc/readme.features        Mon Jul 11 19:47:07 2005
@@ -848,3 +848,11 @@
 If set, send the current topic value and timestamp for channels during
 burst.  This generally only makes sense for hubs to use, and it causes
 a large increase in net.burst size.
+
+CHANNELLEN
+ * Type: integer
+ * Default: 200
+
+This is the allowed length of locally created channels.  It may not be
+larger than the CHANNELLEN #define.  Like the NICKLEN feature, this is
+intended to ease changes in channel name length across a network.
Index: ircu2.10/include/ircd_features.h
diff -u ircu2.10/include/ircd_features.h:1.36 
ircu2.10/include/ircd_features.h:1.37
--- ircu2.10/include/ircd_features.h:1.36       Tue Mar 29 20:13:24 2005
+++ ircu2.10/include/ircd_features.h    Mon Jul 11 19:47:07 2005
@@ -20,7 +20,7 @@
  */
 /** @file
  * @brief Public interfaces and declarations for dealing with configurable 
features.
- * @version $Id: ircd_features.h,v 1.36 2005/03/30 04:13:24 entrope Exp $
+ * @version $Id: ircd_features.h,v 1.37 2005/07/12 02:47:07 entrope Exp $
  */
 
 struct Client;
@@ -77,6 +77,7 @@
   FEAT_IPCHECK_CLONE_LIMIT,
   FEAT_IPCHECK_CLONE_PERIOD,
   FEAT_IPCHECK_CLONE_DELAY,
+  FEAT_CHANNELLEN,
 
   /* Some misc. default paths */
   FEAT_MPATH,
Index: ircu2.10/include/supported.h
diff -u ircu2.10/include/supported.h:1.18 ircu2.10/include/supported.h:1.19
--- ircu2.10/include/supported.h:1.18   Thu Sep 16 20:42:58 2004
+++ ircu2.10/include/supported.h        Mon Jul 11 19:47:07 2005
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: supported.h,v 1.18 2004/09/17 03:42:58 entrope Exp $
+ * $Id: supported.h,v 1.19 2005/07/12 02:47:07 entrope Exp $
  *
  * Description: This file has the featureset that ircu announces on connecting
  *              a client.  It's in this .h because it's likely to be appended
@@ -47,7 +47,8 @@
                 " TOPICLEN=%i" \
                 " AWAYLEN=%i" \
                 " KICKLEN=%i" \
-                " CHANNELLEN=%i"
+                " CHANNELLEN=%i" \
+                " MAXCHANNELLEN=%i"
 
 #define FEATURES2 "CHANTYPES=%s" \
                 " PREFIX=%s" \
@@ -59,7 +60,8 @@
 #define FEATURESVALUES1 feature_int(FEAT_MAXSILES), MAXMODEPARAMS, \
                        feature_int(FEAT_MAXCHANNELSPERUSER), \
                         feature_int(FEAT_MAXBANS), feature_int(FEAT_NICKLEN), \
-                        NICKLEN, TOPICLEN, AWAYLEN, TOPICLEN, CHANNELLEN
+                        NICKLEN, TOPICLEN, AWAYLEN, TOPICLEN, \
+                        feature_int(FEAT_CHANNELLEN), CHANNELLEN
 
 #define FEATURESVALUES2 (feature_bool(FEAT_LOCAL_CHANNELS) ? "#&" : "#"), 
"(ov)@+", "@+", \
                         (feature_bool(FEAT_OPLEVELS) ? "b,AkU,l,imnpstrD" : 
"b,k,l,imnpstrD"), \
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.133 ircu2.10/ircd/channel.c:1.134
--- ircu2.10/ircd/channel.c:1.133       Thu Jun 16 20:55:12 2005
+++ ircu2.10/ircd/channel.c     Mon Jul 11 19:47:07 2005
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief Channel management and maintenance
- * @version $Id: channel.c,v 1.133 2005/06/17 03:55:12 entrope Exp $
+ * @version $Id: channel.c,v 1.134 2005/07/12 02:47:07 entrope Exp $
  */
 #include "config.h"
 
@@ -1288,7 +1288,8 @@
   int i;
 
   for (i = 0; cn[i]; i++) {
-    if (i >= CHANNELLEN || !IsChannelChar(cn[i])) {
+    if (i >= IRCD_MIN(CHANNELLEN, feature_int(FEAT_CHANNELLEN))
+        || !IsChannelChar(cn[i])) {
       cn[i] = '\0';
       return;
     }
Index: ircu2.10/ircd/ircd_features.c
diff -u ircu2.10/ircd/ircd_features.c:1.47 ircu2.10/ircd/ircd_features.c:1.48
--- ircu2.10/ircd/ircd_features.c:1.47  Tue Mar 29 20:13:24 2005
+++ ircu2.10/ircd/ircd_features.c       Mon Jul 11 19:47:08 2005
@@ -18,7 +18,7 @@
  */
 /** @file
  * @brief Implementation of configurable feature support.
- * @version $Id: ircd_features.c,v 1.47 2005/03/30 04:13:24 entrope Exp $
+ * @version $Id: ircd_features.c,v 1.48 2005/07/12 02:47:08 entrope Exp $
  */
 #include "config.h"
 
@@ -316,6 +316,7 @@
   F_I(IPCHECK_CLONE_LIMIT, 0, 4, 0),
   F_I(IPCHECK_CLONE_PERIOD, 0, 40, 0),
   F_I(IPCHECK_CLONE_DELAY, 0, 600, 0),
+  F_I(CHANNELLEN, 0, 200, 0),
 
   /* Some misc. default paths */
   F_S(MPATH, FEAT_CASE | FEAT_MYOPER, "ircd.motd", motd_init),
Index: ircu2.10/ircd/m_join.c
diff -u ircu2.10/ircd/m_join.c:1.26 ircu2.10/ircd/m_join.c:1.27
--- ircu2.10/ircd/m_join.c:1.26 Wed May  4 19:14:54 2005
+++ ircu2.10/ircd/m_join.c      Mon Jul 11 19:47:09 2005
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_join.c,v 1.26 2005/05/05 02:14:54 entrope Exp $
+ * $Id: m_join.c,v 1.27 2005/07/12 02:47:09 entrope Exp $
  */
 
 /*
@@ -367,7 +367,6 @@
 
   for (name = ircd_strtok(&p, chanlist, ","); name;
        name = ircd_strtok(&p, 0, ",")) {
-    clean_channelname(name);
 
     if (join0(&join, cptr, sptr, name)) /* did client do a JOIN 0? */
       continue;
Index: ircu2.10/ircd/m_names.c
diff -u ircu2.10/ircd/m_names.c:1.20 ircu2.10/ircd/m_names.c:1.21
--- ircu2.10/ircd/m_names.c:1.20        Sun Mar 20 05:45:28 2005
+++ ircu2.10/ircd/m_names.c     Mon Jul 11 19:47:09 2005
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_names.c,v 1.20 2005/03/20 13:45:28 entrope Exp $
+ * $Id: m_names.c,v 1.21 2005/07/12 02:47:09 entrope Exp $
  */
 
 /*
@@ -469,7 +469,6 @@
    *  (As performed with each /join) - ** High frequency usage **
    */
 
-  clean_channelname(para);
   chptr = FindChannel(para); 
 
   if (chptr) {
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to