From 0b1775f8cfe48b951fa273da086ec17b9b963214 Mon Sep 17 00:00:00 2001 From: peavey Date: Sun, 30 Mar 2008 10:48:26 +0000 Subject: 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 --- src/modules/m_operjoin.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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 operChans; + std::vector operChans; + bool override; int tokenize(const std::string &str, std::vector &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::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()); } }; -- cgit v1.2.3