# "HIS_REWRITE" = "TRUE";
# "HIS_REMOTE" = "TRUE";
# "HIS_NETSPLIT" = "TRUE";
+# "ERR_CHANNELISFULL" = "Cannot join channel, channel is full (+l)";
+# "ERR_INVITEONLYCHAN" = "Cannot join channel, you must be invited (+i)";
+# "ERR_BANNEDFROMCHAN" = "Cannot join channel, you are banned (+b)";
+# "ERR_BADCHANNELKEY" = "Cannot join channel, you need the correct key (+k)";
+# "ERR_NEEDREGGEDNICK" = "Cannot join channel, you must be authed to join (+r)";
+# "ERR_JOINACCESS" = "Cannot join channel, you don't have enough ChanServ access (+a)";
# "HIS_SERVERNAME" = "*.undernet.org";
# "HIS_SERVERINFO" = "The Undernet Underworld";
# "HIS_URLSERVERS" = "http://www.undernet.org/servers.php";
-# "URLREG" = "http://cservice.undernet.org/live/";
# "LOC_ENABLE" = "FALSE";
# "LOC_TARGET" = "somenick";
+# "CHMODE_A_ENABLE" = "TRUE";
+# "CHMODE_A_TARGET" = "ChanServ";
+# "CHMODE_F_ENABLE" = "TRUE";
+# "UNKNOWN_CMD_ENABLE" = "TRUE";
+# "UNKNOWN_CMD_TARGET" = "OpServ";
# "NOAMSG_TIME" = "0";
# "NOAMSG_NUM" = "1";
};
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
to. If the nick is not online or has not umode +S or is not on a
services server, the LOC request is discarded.
+CHMODE_A_ENABLE
+ * Type: boolean
+ * Default: FALSE
+
+Enable ChannelMode +a (ChanServ access).
+
+CHMODE_A_TARGET
+ * Type: string
+ * Default: NULL
+
+If CHMODE_A_ENABLE is on, this is the target nick where to send the requests
+to. If the nick is not online or has not umode +S or is not on a
+services server, the JOIN request is discarded.
+
+CHMODE_F_ENABLE
+ * Type: boolean
+ * Default: FALSE
+
+Enable ChannelMode +F (Foreward Channel).
+
NOAMSG_TIME
* Type: integer
* Default: 0
* Default: 1
The number the same message must occur to be blocked in channels that block multi target messages.
+
+ERR_CHANNELISFULL
+ERR_INVITEONLYCHAN
+ERR_BANNEDFROMCHAN
+ERR_BADCHANNELKEY
+ERR_NEEDREGGEDNICK
+ERR_JOINACCESS
+ * Type: string
+ * Default: Standard error messages
+
+This allows network admins to set custom (friendly) error messages for several
+reasons a user is not able to join a channel. Defaults are the standard errors
+from vanilla.
FEAT_NOAMSG_TIME,
FEAT_NOAMSG_NUM,
+ /* friendly error messages */
+ FEAT_ERR_CHANNELISFULL,
+ FEAT_ERR_INVITEONLYCHAN,
+ FEAT_ERR_BANNEDFROMCHAN,
+ FEAT_ERR_BADCHANNELKEY,
+ FEAT_ERR_NEEDREGGEDNICK,
+ FEAT_ERR_JOINACCESS,
+
/* features that probably should not be touched */
FEAT_KILLCHASETIMELIMIT,
FEAT_MAXCHANNELSPERUSER,
/* Misc. random stuff */
FEAT_NETWORK,
FEAT_URL_CLIENTS,
- FEAT_URLREG,
FEAT_UNKNOWN_CMD_ENABLE,
FEAT_UNKNOWN_CMD_TARGET,
F_I(NOAMSG_TIME, 0, 0, 0),
F_I(NOAMSG_NUM, 0, 1, 0),
+ /* friendly error messages
+ * The errors below are the default */
+ F_S(ERR_CHANNELISFULL, FEAT_CASE, "Cannot join channel (+l)", 0),
+ F_S(ERR_INVITEONLYCHAN, FEAT_CASE, "Cannot join channel (+i)", 0),
+ F_S(ERR_BANNEDFROMCHAN, FEAT_CASE, "Cannot join channel (+b)", 0),
+ F_S(ERR_BADCHANNELKEY, FEAT_CASE, "Cannot join channel (+k)", 0),
+ F_S(ERR_NEEDREGGEDNICK, FEAT_CASE, "Cannot join channel (+r)", 0),
+ F_S(ERR_JOINACCESS, FEAT_CASE, "Cannot join channel (+a)", 0),
+
/* features that probably should not be touched */
F_I(KILLCHASETIMELIMIT, 0, 30, 0),
F_I(MAXCHANNELSPERUSER, 0, 10, 0),
/* 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),
F_B(UNKNOWN_CMD_ENABLE, 0, 0, 0),
F_S(UNKNOWN_CMD_TARGET, FEAT_NULL, 0, 0),
}
if (err) {
- switch(err) {
- case ERR_NEEDREGGEDNICK:
- send_reply(sptr,
- ERR_NEEDREGGEDNICK,
- chptr->chname,
- feature_str(FEAT_URLREG));
- break;
- default:
+ const char *error = NULL;
+ if (err == ERR_CHANNELISFULL)
+ error = feature_str(FEAT_ERR_CHANNELISFULL);
+ else if (err == ERR_INVITEONLYCHAN)
+ error = feature_str(FEAT_ERR_INVITEONLYCHAN);
+ else if (err == ERR_BANNEDFROMCHAN)
+ error = feature_str(FEAT_ERR_BANNEDFROMCHAN);
+ else if (err == ERR_BADCHANNELKEY)
+ error = feature_str(FEAT_ERR_BADCHANNELKEY);
+ else if (err == ERR_NEEDREGGEDNICK)
+ error = feature_str(FEAT_ERR_NEEDREGGEDNICK);
+ else if (err == ERR_JOINACCESS)
+ error = feature_str(FEAT_ERR_JOINACCESS);
+
+ if (error)
+ send_reply(sptr, err, chptr->chname, error);
+ else
send_reply(sptr, err, chptr->chname);
- break;
- }
continue;
}
IsChannelName(chptr->mode.altchan) && strIsIrcCh(chptr->mode.altchan)) {
mode_a_check_altchan(acptr,chptr->mode.altchan);
}
- send_reply(acptr, ERR_JOINACCESS, parv[3]);
+ send_reply(acptr, ERR_JOINACCESS, parv[3], feature_str(FEAT_ERR_JOINACCESS));
}
}
/* 469 */
{ 0 },
/* 470 */
- { ERR_JOINACCESS, "%s :Cannot join channel (+a)", "470" },
+ { ERR_JOINACCESS, "%s :%s", "470" },
/* 471 */
- { ERR_CHANNELISFULL, "%s :Cannot join channel (+l)", "471" },
+ { ERR_CHANNELISFULL, "%s :%s", "471" },
/* 472 */
{ ERR_UNKNOWNMODE, "%c :is unknown mode char to me", "472" },
/* 473 */
- { ERR_INVITEONLYCHAN, "%s :Cannot join channel (+i)", "473" },
+ { ERR_INVITEONLYCHAN, "%s :%s", "473" },
/* 474 */
- { ERR_BANNEDFROMCHAN, "%s :Cannot join channel (+b)", "474" },
+ { ERR_BANNEDFROMCHAN, "%s :%s", "474" },
/* 475 */
- { ERR_BADCHANNELKEY, "%s :Cannot join channel (+k)", "475" },
+ { ERR_BADCHANNELKEY, "%s :%s", "475" },
/* 476 */
{ ERR_BADCHANMASK, "%s :Bad Channel Mask", "476" },
/* 477 */
- { ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+r): this channel requires authentication -- you can obtain an account from %s", "477" },
+ { ERR_NEEDREGGEDNICK, "%s :%s", "477" },
/* 478 */
{ ERR_BANLISTFULL, "%s %s :Channel ban/ignore list is full", "478" },
/* 479 */