diff options
-rw-r--r-- | docs/conf/inspircd.conf.example | 7 | ||||
-rw-r--r-- | include/configreader.h | 4 | ||||
-rw-r--r-- | src/configreader.cpp | 1 | ||||
-rw-r--r-- | src/users.cpp | 3 |
4 files changed, 13 insertions, 2 deletions
diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 7616786c3..67806e9e4 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -610,7 +610,12 @@ # nosnoticestack: This prevents snotices from 'stacking' and giving you # the message saying '(last message repeated X times)'. Defaults to no. - nosnoticestack="no"> + nosnoticestack="no" + + # welcomenotice: When turned on, this sends a NOTICE to connecting users + # with the text Welcome to <networkname>! after successful registration. + # Defaults to yes. + welcomenotice="yes"> #-#-#-#-#-#-#-#-#-#-#-# PERFORMANCE CONFIGURATION #-#-#-#-#-#-#-#-#-#-# diff --git a/include/configreader.h b/include/configreader.h index e360d3917..910b6cabf 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -598,6 +598,10 @@ class CoreExport ServerConfig */ bool NoSnoticeStack; + /** If true, a "Welcome to <networkname>!" NOTICE will be sent to + * connecting users + */ + bool WelcomeNotice; }; /** The background thread for config reading, so that reading from executable includes diff --git a/src/configreader.cpp b/src/configreader.cpp index 166e124ca..b8796430b 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -520,6 +520,7 @@ void ServerConfig::Fill() Limits.MaxAway = ConfValue("limits")->getInt("maxaway", 200); InvBypassModes = options->getBool("invitebypassmodes", true); NoSnoticeStack = options->getBool("nosnoticestack", false); + WelcomeNotice = options->getBool("welcomenotice", true); range(SoftLimit, 10, ServerInstance->SE->GetMaxFds(), ServerInstance->SE->GetMaxFds(), "<performance:softlimit>"); range(MaxConn, 0, SOMAXCONN, SOMAXCONN, "<performance:somaxconn>"); diff --git a/src/users.cpp b/src/users.cpp index 459b9e3ce..6e282f7c0 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -770,7 +770,8 @@ void LocalUser::FullConnect() if (quitting) return; - this->WriteServ("NOTICE Auth :Welcome to \002%s\002!",ServerInstance->Config->Network.c_str()); + if (ServerInstance->Config->WelcomeNotice) + this->WriteServ("NOTICE Auth :Welcome to \002%s\002!",ServerInstance->Config->Network.c_str()); this->WriteNumeric(RPL_WELCOME, "%s :Welcome to the %s IRC Network %s!%s@%s",this->nick.c_str(), ServerInstance->Config->Network.c_str(), this->nick.c_str(), this->ident.c_str(), this->host.c_str()); this->WriteNumeric(RPL_YOURHOSTIS, "%s :Your host is %s, running version %s",this->nick.c_str(),ServerInstance->Config->ServerName.c_str(),BRANCH); this->WriteNumeric(RPL_SERVERCREATED, "%s :This server was created %s %s", this->nick.c_str(), __TIME__, __DATE__); |