diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-30 10:48:26 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-30 10:48:26 +0000 |
commit | 0b1775f8cfe48b951fa273da086ec17b9b963214 (patch) | |
tree | 9055a7f43744257404dd0c444c2e93d6390a6819 /src | |
parent | 38c8b9290e33ad3173c46f80cd4e5e020d7f6389 (diff) |
Add override option to operjoin, handy if your operchan has a key or is invite only.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9219 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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 c03b3f854..21f9aae30 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -19,7 +19,8 @@ class ModuleOperjoin : public Module { private: std::string operChan; - std::vector<std::string> operChans; + std::vector<std::string> operChans; + bool override; int tokenize(const std::string &str, std::vector<std::string> &tokens) { @@ -52,8 +53,9 @@ class ModuleOperjoin : public Module virtual void OnRehash(User* 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); @@ -77,7 +79,7 @@ class ModuleOperjoin : public Module for(std::vector<std::string>::iterator it = operChans.begin(); it != operChans.end(); it++) if (ServerInstance->IsChannel(it->c_str())) - Channel::JoinUser(ServerInstance, user, it->c_str(), false, "", false, ServerInstance->Time()); + Channel::JoinUser(ServerInstance, user, it->c_str(), override, "", false, ServerInstance->Time()); } }; |