diff options
| author | 2008-03-30 12:03:37 +0000 | |
|---|---|---|
| committer | 2008-03-30 12:03:37 +0000 | |
| commit | 2c5b062d55673c3cdb340a779da30c9fc5a2bdad (patch) | |
| tree | 4a8492da284016a42eafee5c10bcd5eca2082359 /src/modules/m_operjoin.cpp | |
| parent | Same here, i cant make this error occur without changing code so we'll just m... (diff) | |
Backport r9219-9220 from trunk. Override on operjoin, for those cases where operchans and operoverride will not satisfy your needs.
git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@9221 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_operjoin.cpp')
| -rw-r--r-- | src/modules/m_operjoin.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp index 2bc397f4c..f7a10e74d 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -22,7 +22,8 @@ class ModuleOperjoin : public Module { private: std::string operChan; - std::vector<std::string> operChans; + std::vector<std::string> operChans; + bool override; int tokenize(const string &str, std::vector<std::string> &tokens) { @@ -57,8 +58,9 @@ class ModuleOperjoin : public Module virtual void OnRehash(userrec* user, const std::string ¶meter) { ConfigReader* conf = new ConfigReader(ServerInstance); - + operChan = conf->ReadValue("operjoin", "channel", 0); + override = conf->ReadFlag("operjoin", "override", "0", 0); operChans.clear(); if (!operChan.empty()) tokenize(operChan,operChans); @@ -82,7 +84,7 @@ class ModuleOperjoin : public Module for(std::vector<std::string>::iterator it = operChans.begin(); it != operChans.end(); it++) if (ServerInstance->IsChannel(it->c_str())) - chanrec::JoinUser(ServerInstance, user, it->c_str(), false, "", ServerInstance->Time(true)); + chanrec::JoinUser(ServerInstance, user, it->c_str(), override, "", ServerInstance->Time(true)); } }; |
