From 4aeda51771f6fcc2b0d548fa33394af59038aedd Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 9 Feb 2010 05:35:19 +0000 Subject: Clean up documentation of connect blocks a bit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12410 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/inspircd.conf.example | 16 +++++++++++++--- src/configparser.cpp | 9 ++++++++- src/users.cpp | 4 ++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index 5a5a6c7c5..43afc22f0 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -20,7 +20,6 @@ # This is an example of the config file for InspIRCd. # # Change the options to suit your network # # # -# $Id$ # # # ____ _ _____ _ _ ____ _ _ _ # # | _ \ ___ __ _ __| | |_ _| |__ (_)___ | __ )(_) |_| | # @@ -214,7 +213,14 @@ # and allow tags at the top, progressively more general, followed # # by a # + @@ -279,9 +285,13 @@ # block have a valid ident response, use SSL, or have authenticated. # Requires m_ident, m_sslinfo, or m_services_account respectively. requiressl="on" + # NOTE: For requireaccount, you must complete the signon prior to full + # connection. Currently, this is only possible by using SASL + # authentication; passforward and PRIVMSG NickServ happen after + # your final connect block has been found. # Alternate MOTD file for this connect class. The contents of this file are - # specified using or + # specified using or motd="secretmotd" # port: What port this user is allowed to connect on. (optional) diff --git a/src/configparser.cpp b/src/configparser.cpp index 558c49117..4a0c9b58d 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -429,7 +429,14 @@ bool ConfigTag::getBool(const std::string &key, bool def) if(!readString(key, result)) return def; - return (result == "yes" || result == "true" || result == "1" || result == "on"); + if (result == "yes" || result == "true" || result == "1" || result == "on") + return true; + if (result == "no" || result == "false" || result == "0" || result == "off") + return false; + + ServerInstance->Logs->Log("CONFIG",DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() + + " is not valid, ignoring"); + return def; } std::string ConfigTag::getTagLocation() diff --git a/src/users.cpp b/src/users.cpp index c01b5d1b2..62bf0f543 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1646,6 +1646,10 @@ void LocalUser::SetClass(const std::string &explicit_name) continue; } + bool regdone = (registered != REG_NONE); + if (c->config->getBool("registered", regdone) != regdone) + continue; + /* we stop at the first class that meets ALL critera. */ found = c; break; -- cgit v1.2.3