~ubuntu-branches/ubuntu/oneiric/inspircd/oneiric-security

« back to all changes in this revision

Viewing changes to src/modules/m_operjoin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Darren Blaber
  • Date: 2008-04-21 12:51:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080421125101-m6lqhtn1wna8u2go
Tags: 1.1.19+dfsg-1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
{
23
23
        private:
24
24
                std::string operChan;
25
 
                std::vector<std::string> operChans;             
 
25
                std::vector<std::string> operChans;
 
26
                bool override;
26
27
 
27
28
                int tokenize(const string &str, std::vector<std::string> &tokens)
28
29
                {
57
58
                virtual void OnRehash(userrec* user, const std::string &parameter)
58
59
                {
59
60
                        ConfigReader* conf = new ConfigReader(ServerInstance);
60
 
 
 
61
    
61
62
                        operChan = conf->ReadValue("operjoin", "channel", 0);
 
63
                        override = conf->ReadFlag("operjoin", "override", "0", 0);
62
64
                        operChans.clear();
63
65
                        if (!operChan.empty())
64
66
                                tokenize(operChan,operChans);
82
84
 
83
85
                        for(std::vector<std::string>::iterator it = operChans.begin(); it != operChans.end(); it++)
84
86
                                if (ServerInstance->IsChannel(it->c_str()))
85
 
                                        chanrec::JoinUser(ServerInstance, user, it->c_str(), false, "", ServerInstance->Time(true));
 
87
                                        chanrec::JoinUser(ServerInstance, user, it->c_str(), override, "", ServerInstance->Time(true));
86
88
                }
87
89
 
88
90
};