- // channel does not yet exist (record is null, about to be created IF we were to allow it)
- if (!chan)
- {
- user->WriteServ("530 %s %s :Only IRC operators may create new channels",user->nick,cname,cname);
- return 1;
- }
- }
- return 0;
- }
-
- virtual ~ModuleRestrictChans()
- {
- }
-
- virtual Version GetVersion()
- {
- return Version(1,1,0,1,VF_VENDOR,API_VERSION);
- }
-};
+ const std::string name = i->second->getString("name");
+ if (name.empty())
+ throw ModuleException("Empty <allowchannel:name> at " + i->second->getTagLocation());