Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2007-02-25 15:48:22 UTC
Modified files:
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.834 ircu2.10/ChangeLog:1.835
--- ircu2.10/ChangeLog:1.834 Sat Feb 3 20:18:30 2007
+++ ircu2.10/ChangeLog Sun Feb 25 07:48:12 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.77 ircu2.10/doc/example.conf:1.78
--- ircu2.10/doc/example.conf:1.77 Mon Jan 22 18:36:25 2007
+++ ircu2.10/doc/example.conf Sun Feb 25 07:48:12 2007
@@ -875,6 +875,7 @@
# "HIS_SERVERNAME" = "*.undernet.org";
# "HIS_SERVERINFO" = "The Undernet Underworld";
# "HIS_URLSERVERS" = "http://www.undernet.org/servers.php";
+# "URLREG" = "http://cservice.undernet.org/live/";
# "SPAM_OPER_COUNTDOWN" = "5";
# "SPAM_EXPIRE_TIME" = "120";
# "SPAM_JOINED_TIME" = "60";
Index: ircu2.10/doc/readme.features
diff -u ircu2.10/doc/readme.features:1.27 ircu2.10/doc/readme.features:1.28
--- ircu2.10/doc/readme.features:1.27 Sun Jul 23 11:17:50 2006
+++ ircu2.10/doc/readme.features Sun Feb 25 07:48:12 2007
@@ -766,6 +766,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.45
ircu2.10/include/ircd_features.h:1.46
--- ircu2.10/include/ircd_features.h:1.45 Sun Jul 23 11:17:50 2006
+++ ircu2.10/include/ircd_features.h Sun Feb 25 07:48:12 2007
@@ -20,7 +20,7 @@
*/
/** @file
* @brief Public interfaces and declarations for dealing with configurable
features.
- * @version $Id: ircd_features.h,v 1.45 2006/07/23 18:17:50 entrope Exp $
+ * @version $Id: ircd_features.h,v 1.46 2007/02/25 15:48:12 entrope Exp $
*/
struct Client;
@@ -182,6 +182,7 @@
/* Misc. random stuff */
FEAT_NETWORK,
FEAT_URL_CLIENTS,
+ FEAT_URLREG,
FEAT_SPAM_OPER_COUNTDOWN,
FEAT_SPAM_EXPIRE_TIME,
FEAT_SPAM_JOINED_TIME,
Index: ircu2.10/ircd/ircd_features.c
diff -u ircu2.10/ircd/ircd_features.c:1.61 ircu2.10/ircd/ircd_features.c:1.62
--- ircu2.10/ircd/ircd_features.c:1.61 Mon Jul 24 17:17:30 2006
+++ ircu2.10/ircd/ircd_features.c Sun Feb 25 07:48:12 2007
@@ -18,7 +18,7 @@
*/
/** @file
* @brief Implementation of configurable feature support.
- * @version $Id: ircd_features.c,v 1.61 2006/07/25 00:17:30 entrope Exp $
+ * @version $Id: ircd_features.c,v 1.62 2007/02/25 15:48:12 entrope Exp $
*/
#include "config.h"
@@ -495,6 +495,7 @@
/* Misc. random stuff */
F_S(NETWORK, 0, "UnderNet", set_isupport_network),
F_S(URL_CLIENTS, 0, "ftp://ftp.undernet.org/pub/irc/clients", 0),
+ F_S(URLREG, 0, "http://cservice.undernet.org/live/", 0),
F_I(SPAM_OPER_COUNTDOWN, 0, 5, 0),
F_I(SPAM_EXPIRE_TIME, 0, 120, 0),
F_I(SPAM_JOINED_TIME, 0, 60, 0),
Index: ircu2.10/ircd/m_join.c
diff -u ircu2.10/ircd/m_join.c:1.48 ircu2.10/ircd/m_join.c:1.49
--- ircu2.10/ircd/m_join.c:1.48 Sun Jul 23 19:08:33 2006
+++ ircu2.10/ircd/m_join.c Sun Feb 25 07:48:12 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.48 2006/07/24 02:08:33 entrope Exp $
+ * $Id: m_join.c,v 1.49 2007/02/25 15:48:12 entrope Exp $
*/
#include "config.h"
@@ -250,7 +250,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.75 ircu2.10/ircd/s_err.c:1.76
--- ircu2.10/ircd/s_err.c:1.75 Mon Jun 26 17:11:17 2006
+++ ircu2.10/ircd/s_err.c Sun Feb 25 07:48:12 2007
@@ -18,7 +18,7 @@
*/
/** @file
* @brief Error handling support.
- * @version $Id: s_err.c,v 1.75 2006/06/27 00:11:17 entrope Exp $
+ * @version $Id: s_err.c,v 1.76 2007/02/25 15:48:12 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