diff options
author | Peter Powell <petpow@saberuk.com> | 2018-03-29 17:45:56 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-04-22 23:30:41 +0100 |
commit | 6d1c1cb51753f986b86b408a5828373d0066624b (patch) | |
tree | 8169e18678174ed5b23d643981c10f824642bacb | |
parent | 35c8cde85996e9fe89920acb92a84c5d9bd6aeaf (diff) |
Always process MOTD formatting escape codes.
The options for disabling these were added to keep compatibility
with previous 2.0 releases and are not needed any more.
-rw-r--r-- | docs/conf/inspircd.conf.example | 8 | ||||
-rw-r--r-- | docs/conf/modules.conf.example | 10 | ||||
-rw-r--r-- | src/configreader.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_opermotd.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_showfile.cpp | 3 |
5 files changed, 3 insertions, 25 deletions
diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 6a9b960e0..e28319a69 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -315,14 +315,6 @@ # specified using <files secretmotd="filename"> or <execfiles ...> motd="secretmotd" - # Allow color codes to be processed in the message of the day file. - # the following characters are valid color code escapes: - # \002 or \b = Bold - # \037 or \u = Underline - # \003 or \c = Color (with a code postfixed to this char) - # \017 or \x = Stop all color sequences - allowmotdcolors="false" - # port: What port range this user is allowed to connect on. (optional) # The ports MUST be set to listen in the bind blocks above. port="6697,9999"> diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example index 6955b2d74..5f219da76 100644 --- a/docs/conf/modules.conf.example +++ b/docs/conf/modules.conf.example @@ -1403,11 +1403,7 @@ # onoper - If on, the message is sent on /OPER, otherwise it's # # only sent when /OPERMOTD is used. # # # -# processcolors - Allow color codes to be processed in the opermotd. # -# Read the comment above <connect:allowmotdcolors> in # -# inspircd.conf.example for details. # -# # -#<opermotd file="examples/opermotd.txt.example" onoper="yes" processcolors="false"> +#<opermotd file="examples/opermotd.txt.example" onoper="yes"> #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Override module: Adds support for oper override. @@ -1864,9 +1860,6 @@ # (similar to /MOTD; the default). # # * notice: Send contents as a series of notices. # # * msg: Send contents as a series of private messages. # -# colors - If true, color codes (\c, \b, \u, etc.) will be processed # -# and sent as ANSI colors. If false (default) the file will # -# be displayed as-is. # # # # When using the method "numeric", the following extra settings are # # available: # @@ -1879,7 +1872,6 @@ # # #<showfile name="RULES" # file="rules.txt" -# colors="true" # introtext="Server rules:" # endtext="End of server rules."> diff --git a/src/configreader.cpp b/src/configreader.cpp index 7941e4844..c9fa62510 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -624,9 +624,6 @@ void ServerConfig::Apply(ServerConfig* old, const std::string &useruid) for (ClassVector::const_iterator it = this->Classes.begin(), it_end = this->Classes.end(); it != it_end; ++it) { ConfigTag *tag = (*it)->config; - // Make sure our connection class allows motd colors - if(!tag->getBool("allowmotdcolors")) - continue; ConfigFileCache::iterator file = this->Files.find(tag->getString("motd", "motd")); if (file != this->Files.end()) diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index 30f2ce303..6884cd447 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -100,14 +100,12 @@ class ModuleOpermotd : public Module { FileReader reader(conf->getString("file", "opermotd")); cmd.opermotd = reader.GetVector(); + InspIRCd::ProcessColors(cmd.opermotd); } catch (CoreException&) { // Nothing happens here as we do the error handling in ShowOperMOTD. } - - if (conf->getBool("processcolors")) - InspIRCd::ProcessColors(cmd.opermotd); } }; diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index 2d1354aff..83030b7a1 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -91,8 +91,7 @@ class CommandShowFile : public Command method = SF_NOTICE; contents = filecontents; - if (tag->getBool("colors")) - InspIRCd::ProcessColors(contents); + InspIRCd::ProcessColors(contents); } }; |