Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2007-02-25 14:32:51 UTC

Modified files:
  Tag: u2_10_12_branch
     ChangeLog doc/example.conf doc/readme.features
     include/ircd_features.h ircd/ircd_features.c ircd/m_join.c
     ircd/s_err.c

Log message:

Author: Jeannot Langlois
Make ERR_NEEDREGGEDNICK more informative at the raw protocol level.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.146 ircu2.10/ChangeLog:1.710.2.147
--- ircu2.10/ChangeLog:1.710.2.146      Sat Feb  3 20:16:16 2007
+++ ircu2.10/ChangeLog  Sun Feb 25 06:32:40 2007
@@ -1,3 +1,19 @@
+2007-01-27  Jeannot Langlois <[EMAIL PROTECTED]>
+
+       * doc/example.conf (Features): Illustrate URLREG feature.
+
+       * doc/readme.features (URLREG): Define new feature.
+
+       * include/ircd_features.h (Feature): Add FEAT_URLREG.
+
+       * ircd/ircd_features.c (features): Set the default value.
+
+       * ircd/m_join.c (m_join): For ERR_NEEDREGGEDNICK, include the
+       URLREG value as a format argument.
+
+       * ircd/s_err.c (replyTable): Update ERR_NEEDREGGEDNICK
+       appropriately.
+
 2007-02-03  Michael Poole <[EMAIL PROTECTED]>
 
        * ircd/ircd_reply.c (protocol_violation): Avoid reusing the
Index: ircu2.10/doc/example.conf
diff -u ircu2.10/doc/example.conf:1.61.2.12 ircu2.10/doc/example.conf:1.61.2.13
--- ircu2.10/doc/example.conf:1.61.2.12 Mon Jan 22 18:05:45 2007
+++ ircu2.10/doc/example.conf   Sun Feb 25 06:32:40 2007
@@ -866,6 +866,7 @@
 #  "HIS_SERVERNAME" = "*.undernet.org";
 #  "HIS_SERVERINFO" = "The Undernet Underworld";
 #  "HIS_URLSERVERS" = "http://www.undernet.org/servers.php";;
+#  "URLREG" = "http://cservice.undernet.org/live/";;
 };
 
 # Well, you have now reached the end of this sample configuration
Index: ircu2.10/doc/readme.features
diff -u ircu2.10/doc/readme.features:1.19.2.4 
ircu2.10/doc/readme.features:1.19.2.5
--- ircu2.10/doc/readme.features:1.19.2.4       Tue May 30 19:43:00 2006
+++ ircu2.10/doc/readme.features        Sun Feb 25 06:32:40 2007
@@ -765,6 +765,14 @@
 
 This defines a URL that users may visit to find compatible IRC clients.
 
+URLREG
+ * Type: string
+ * Default: "http://cservice.undernet.org/live/";
+
+This defines a URL that is used in server response 477 (ERR_NEEDREGGEDNICK) to
+let users know which website they must visit to obtain a proper account for
+authentication.
+
 NICKLEN
  * Type: integer
  * Default: 12
Index: ircu2.10/include/ircd_features.h
diff -u ircu2.10/include/ircd_features.h:1.38.2.5 
ircu2.10/include/ircd_features.h:1.38.2.6
--- ircu2.10/include/ircd_features.h:1.38.2.5   Wed Feb 15 19:49:54 2006
+++ ircu2.10/include/ircd_features.h    Sun Feb 25 06:32:41 2007
@@ -20,7 +20,7 @@
  */
 /** @file
  * @brief Public interfaces and declarations for dealing with configurable 
features.
- * @version $Id: ircd_features.h,v 1.38.2.5 2006/02/16 03:49:54 entrope Exp $
+ * @version $Id: ircd_features.h,v 1.38.2.6 2007/02/25 14:32:41 entrope Exp $
  */
 
 struct Client;
@@ -154,6 +154,7 @@
   /* Misc. random stuff */
   FEAT_NETWORK,
   FEAT_URL_CLIENTS,
+  FEAT_URLREG,
 
   FEAT_LAST_F
 };
Index: ircu2.10/ircd/ircd_features.c
diff -u ircu2.10/ircd/ircd_features.c:1.50.2.5 
ircu2.10/ircd/ircd_features.c:1.50.2.6
--- ircu2.10/ircd/ircd_features.c:1.50.2.5      Wed Feb 15 19:49:54 2006
+++ ircu2.10/ircd/ircd_features.c       Sun Feb 25 06:32:41 2007
@@ -18,7 +18,7 @@
  */
 /** @file
  * @brief Implementation of configurable feature support.
- * @version $Id: ircd_features.c,v 1.50.2.5 2006/02/16 03:49:54 entrope Exp $
+ * @version $Id: ircd_features.c,v 1.50.2.6 2007/02/25 14:32:41 entrope Exp $
  */
 #include "config.h"
 
@@ -407,6 +407,7 @@
   /* Misc. random stuff */
   F_S(NETWORK, 0, "UnderNet", 0),
   F_S(URL_CLIENTS, 0, "ftp://ftp.undernet.org/pub/irc/clients";, 0),
+  F_S(URLREG, 0, "http://cservice.undernet.org/live/";, 0),
 
 #undef F_S
 #undef F_B
Index: ircu2.10/ircd/m_join.c
diff -u ircu2.10/ircd/m_join.c:1.34.2.9 ircu2.10/ircd/m_join.c:1.34.2.10
--- ircu2.10/ircd/m_join.c:1.34.2.9     Sat Feb  4 16:50:22 2006
+++ ircu2.10/ircd/m_join.c      Sun Feb 25 06:32:41 2007
@@ -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.34.2.9 2006/02/05 00:50:22 entrope Exp $
+ * $Id: m_join.c,v 1.34.2.10 2007/02/25 14:32:41 entrope Exp $
  */
 
 #include "config.h"
@@ -239,7 +239,17 @@
 
       /* Is there some reason the user may not join? */
       if (err) {
-        send_reply(sptr, err, chptr->chname);
+        switch(err) {
+          case ERR_NEEDREGGEDNICK:
+            send_reply(sptr, 
+                       ERR_NEEDREGGEDNICK, 
+                       chptr->chname, 
+                       feature_str(FEAT_URLREG));            
+            break;
+          default:
+            send_reply(sptr, err, chptr->chname);
+            break;
+        }
         continue;
       }
 
Index: ircu2.10/ircd/s_err.c
diff -u ircu2.10/ircd/s_err.c:1.72.2.3 ircu2.10/ircd/s_err.c:1.72.2.4
--- ircu2.10/ircd/s_err.c:1.72.2.3      Thu Jun  8 19:12:25 2006
+++ ircu2.10/ircd/s_err.c       Sun Feb 25 06:32:41 2007
@@ -18,7 +18,7 @@
  */
 /** @file
  * @brief Error handling support.
- * @version $Id: s_err.c,v 1.72.2.3 2006/06/09 02:12:25 entrope Exp $
+ * @version $Id: s_err.c,v 1.72.2.4 2007/02/25 14:32:41 entrope Exp $
  */
 #include "config.h"
 
@@ -986,7 +986,7 @@
 /* 476 */
   { ERR_BADCHANMASK, "%s :Bad Channel Mask", "476" },
 /* 477 */
-  { ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+r)", "477" },
+  { ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+r): this channel requires 
authentication -- you can obtain an account from %s", "477" },
 /* 478 */
   { ERR_BANLISTFULL, "%s %s :Channel ban/ignore list is full", "478" },
 /* 479 */
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to