class PermChannel : public ModeHandler
{
public:
- PermChannel(InspIRCd* Instance, Module* Creator) : ModeHandler(Creator, 'P', PARAM_NONE, MODETYPE_CHANNEL) { }
+ PermChannel(Module* Creator) : ModeHandler(Creator, 'P', PARAM_NONE, MODETYPE_CHANNEL) { }
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
{
{
if (channel->IsModeSet('P'))
{
- if (channel->GetUserCounter() == 0 && !IS_FAKE(source))
+ if (channel->GetUserCounter() == 0 && !IS_SERVER(source))
{
/*
* ugh, ugh, UGH!
PermChannel p;
public:
- ModulePermanentChannels(InspIRCd* Me) : Module(Me), p(Me, this)
+ ModulePermanentChannels() : p(this)
{
if (!ServerInstance->Modes->AddMode(&p))
throw ModuleException("Could not add new modes!");
* Process config-defined list of permanent channels.
* -- w00t
*/
- ConfigReader MyConf(ServerInstance);
+ ConfigReader MyConf;
permchannelsconf = MyConf.ReadValue("permchanneldb", "filename", "", 0, false);
if (!c)
{
- c = new Channel(ServerInstance, channel, ServerInstance->Time());
+ c = new Channel(channel, ServerInstance->Time());
if (!topic.empty())
{
c->SetTopic(NULL, topic, true);