aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_operjoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_operjoin.cpp')
-rw-r--r--src/modules/m_operjoin.cpp8
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 &parameter)
{
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));
}
};