/* $ModDesc: Only opers may create new channels if this module is loaded */
-Server *Srv;
-
class ModuleRestrictChans : public Module
{
+ Server* Srv;
std::map<irc::string,int> allowchans;
irc::string channel = txt.c_str();
allowchans[channel] = 1;
}
- delete MyConf;
+ DELETE(MyConf);
}
public:
ReadConfig();
}
- virtual void OnRehash(std::string parameter)
+ virtual void OnRehash(const std::string ¶meter)
{
ReadConfig();
}
{
irc::string x = cname;
// user is not an oper and its not in the allow list
- if ((!strchr(user->modes,'o')) && (allowchans.find(x) == allowchans.end()))
+ if ((!*user->oper) && (allowchans.find(x) == allowchans.end()))
{
// channel does not yet exist (record is null, about to be created IF we were to allow it)
if (!chan)