#define FLAGS_HIDDEN_HOST 0x2000 /* user's host is masked by their account */
#define FLAGS_REGNICK 0x4000 /* user owns their current nick */
#define FLAGS_REGISTERING 0x8000 /* user has issued account register command, is waiting for email cookie */
+#define FLAGS_CLOAKHOST 0x10000 /* user has cloaked host */
+#define FLAGS_CLOAKIP 0x20000 /* user has cloaked ip */
#define IsOper(x) ((x)->modes & FLAGS_OPER)
#define IsService(x) ((x)->modes & FLAGS_SERVICE)
{
struct userNode *oldUser, *uNode;
unsigned int n, ignore_user;
+ char *tstr;
+ int type;
if ((strlen(numeric) < 3) || (strlen(numeric) > 5)) {
log_module(MAIN_LOG, LOG_WARNING, "AddUser(%p, %s, ...): numeric %s wrong length!", uplink, nick, numeric);
safestrncpy(uNode->numeric, numeric, sizeof(uNode->numeric));
irc_p10_pton(&uNode->ip, realip);
- if (irc_in_addr_is_ipv4(uNode->ip)) {
- make_virtip((char*)irc_ntoa(&uNode->ip), (char*)irc_ntoa(&uNode->ip), uNode->cryptip);
- make_virthost((char*)irc_ntoa(&uNode->ip), uNode->hostname, uNode->crypthost);
- } else if (irc_in_addr_is_ipv6(uNode->ip)) {
- make_ipv6virthost((char*)irc_ntoa(&uNode->ip), uNode->hostname, uNode->crypthost);
+ tstr = conf_get_data("server/type", RECDB_QSTRING);
+ type = atoi(tstr);
+ if (type > 6) {
+ if (irc_in_addr_is_ipv4(uNode->ip)) {
+ make_virtip((char*)irc_ntoa(&uNode->ip), (char*)irc_ntoa(&uNode->ip), uNode->cryptip);
+ make_virthost((char*)irc_ntoa(&uNode->ip), uNode->hostname, uNode->crypthost);
+ } else if (irc_in_addr_is_ipv6(uNode->ip)) {
+ make_ipv6virthost((char*)irc_ntoa(&uNode->ip), uNode->hostname, uNode->crypthost);
+ }
}
if (!uNode->crypthost && uNode->cryptip)
// case 'h': do_user_mode(FLAGS_HELPER); break;
// I check if there's an 'h' in the first part, and if there,
// then everything after the space becomes their new host.
+ case 'C': do_user_mode(FLAGS_CLOAKHOST);
+ if (*word) {
+ char cloakhost[MAXLEN];
+ unsigned int ii;
+ for (ii=0; (*word != ' ') && (*word != '\0'); )
+ cloakhost[ii++] = *word++;
+ cloakhost[ii] = 0;
+ while (*word == ' ')
+ word++;
+ safestrncpy(user->crypthost, cloakhost, sizeof(user->crypthost));
+ }
+ break;
+ case 'c': do_user_mode(FLAGS_CLOAKIP);
+ if (*word) {
+ char cloakip[MAXLEN];
+ unsigned int ii;
+ for (ii=0; (*word != ' ') && (*word != '\0'); )
+ cloakip[ii++] = *word++;
+ cloakip[ii] = 0;
+ while (*word == ' ')
+ word++;
+ safestrncpy(user->cryptip, cloakip, sizeof(user->cryptip));
+ }
+ break;
case 'h': do_user_mode(FLAGS_SETHOST);
if (*word) {
char sethost[MAXLEN];
"key1" "45432"; // Set these key values to the network KEY values you use
"key2" "76934"; // for host hiding style 2.
"key3" "98336";
+ "prefix" "AfterNET"; // If you use style 2 then this is the name that is prefixed to hosts.
"numeric" "51"; // hint: If you get collisions on link, CHANGE THIS.
/* Type handles some changes in nefarious 1.0 (was 0.5.0)
* 4 - nefarious 0.4.x and other ircds
- * 5 - nefarious 1.0.x and higher (Branch Revision)
- * 6 - nefarious 1.0.x and higher (Trunk Revision)
+ * 5 - nefarious 1.0.x and higher (Obselete)
+ * 6 - nefarious 1.1.0 and higher (Branch Revision)
+ * 7 - nefarious 1.2.0 and higher (Trunk Revsions)
*/
- "type" "5";
+ "type" "6";
"host_in_topic" "1"; //Set to 1 if your Nefarious server have the HOST_IN_TOPIC F:line set to TRUE.
"max_users" "256"; // You can save a little memory by setting this to a lower value.
"force_n2k" "1"; // Use extended (5-digit) numnick for self, even if 3 are possible.