diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-09 17:36:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-09 17:36:30 +0000 |
commit | f16ef27e0e5df0249ecb38f7adf76735a550ad0a (patch) | |
tree | 0670687af7656d28480e8e9741e5cc4aefd861dc /include | |
parent | cbff8c76278f7cb706e3c4ae0c8bc4cb63c15f96 (diff) |
Altered u_listmode to have a constructor arg 'autotidy' which if set to true runs input through ModeParser::CleanMask() otherwise leaves it alone
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4236 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/u_listmode.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/u_listmode.h b/include/u_listmode.h index d30da1e5e..a03efce00 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -48,7 +48,7 @@ class ListModeBase : public ModeHandler { protected: Server* Srv; - + bool tidy; std::string infokey; std::string listnumeric; std::string endoflistnumeric; @@ -57,8 +57,8 @@ class ListModeBase : public ModeHandler limitlist chanlimits; public: - ListModeBase(Server* serv, char modechar, const std::string &eolstr, const std::string &lnum, const std::string &eolnum, const std::string &ctag = "banlist") - : ModeHandler(modechar, 1, 1, true, MODETYPE_CHANNEL, false), Srv(serv), listnumeric(lnum), endoflistnumeric(eolnum), endofliststring(eolstr), configtag(ctag) + ListModeBase(Server* serv, char modechar, const std::string &eolstr, const std::string &lnum, const std::string &eolnum, bool autotidy, const std::string &ctag = "banlist") + : ModeHandler(modechar, 1, 1, true, MODETYPE_CHANNEL, false), Srv(serv), listnumeric(lnum), endoflistnumeric(eolnum), endofliststring(eolstr), tidy(autotidy), configtag(ctag) { this->DoRehash(); infokey = "exceptionbase_mode_" + std::string(1, mode) + "_list"; @@ -130,7 +130,8 @@ class ListModeBase : public ModeHandler } // Clean the mask up - ModeParser::CleanMask(parameter); + if (this->tidy) + ModeParser::CleanMask(parameter); // Check if the item already exists in the list for (modelist::iterator it = el->begin(); it != el->end(); it++) |