- std::string txt;
- txt = MyConf->ReadValue("allowchannel", "name", i);
- irc::string channel = txt.c_str();
- allowchans[channel] = 1;
+ ConfigTag* tag = ServerInstance->Config->ConfValue("allowchannel", i);
+ if (!tag)
+ return;
+ std::string txt = tag->getString("name");
+ allowchans.insert(txt.c_str());