virtual ~ModuleBanException()
{
ServerInstance->Modes->DelMode(be);
- DELETE(be);
+ delete be;
ServerInstance->UnpublishInterface("ChannelBanList", this);
}
};
{
ServerInstance->Modes->DelMode(cu);
ServerInstance->Modes->DelMode(cc);
- DELETE(cu);
- DELETE(cc);
+ delete cu;
+ delete cc;
}
virtual void ReplaceLine(irc::string &text, irc::string pattern, irc::string replace)
*/
ConfigReader* MyConf = new ConfigReader(ServerInstance);
censors.clear();
+
for (int index = 0; index < MyConf->Enumerate("badword"); index++)
{
irc::string pattern = (MyConf->ReadValue("badword","text",index)).c_str();
irc::string replace = (MyConf->ReadValue("badword","replace",index)).c_str();
censors[pattern] = replace;
}
- DELETE(MyConf);
+
+ delete MyConf;
}
virtual Version GetVersion()
if (text)
{
user->Shrink("ctitle");
- DELETE(text);
+ delete text;
}
text = new std::string(title);
if (ctitle)
{
user->Shrink("ctitle");
- DELETE(ctitle);
+ delete ctitle;
}
}
if (ctitle)
{
user->Shrink("ctitle");
- DELETE(ctitle);
+ delete ctitle;
}
}
}
}
else
{
- DELETE(dl);
+ delete dl;
user->Shrink("dccallow_list");
// remove from userlist
user->GetExt("dccallow_list", dl);
if (dl)
{
- DELETE(dl);
+ delete dl;
user->Shrink("dccallow_list");
RemoveFromUserlist(user);
}
Conf = new ConfigReader(ServerInstance);
IdentTimeout = Conf->ReadInteger("ident", "timeout", 0, true);
PortBind = Conf->ReadValue("ident", "bind", 0);
+
if (!IdentTimeout)
IdentTimeout = 1;
- DELETE(Conf);
+
+ delete Conf;
}
ModuleIdent(InspIRCd* Me)
public:
ModuleKnock(InspIRCd* Me) : Module(Me)
{
-
kn = new Knock(ServerInstance);
+
if (!ServerInstance->AddMode(kn, 'K'))
throw ModuleException("Could not add new modes!");
+
mycommand = new cmd_knock(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
virtual ~ModuleKnock()
{
ServerInstance->Modes->DelMode(kn);
- DELETE(kn);
+ delete kn;
}
virtual Version GetVersion()
virtual ~ModuleNoCTCP()
{
ServerInstance->Modes->DelMode(nc);
- DELETE(nc);
+ delete nc;
}
virtual Version GetVersion()
virtual ~ModuleNoNotice()
{
ServerInstance->Modes->DelMode(nt);
- DELETE(nt);
+ delete nt;
}
virtual Version GetVersion()
if (!operChan.empty())
tokenize(operChan,operChans);
- DELETE(conf);
+ delete conf;
}
virtual ~ModuleOperjoin()
return 1;
}
- DELETE(last_list_time);
+ delete last_list_time;
user->Shrink("safelist_last");
}
if (ld->list_ended)
{
user->Shrink("safelist_cache");
- DELETE(ld);
+ delete ld;
global_listing--;
}
}
if (ld)
{
u->Shrink("safelist_cache");
- DELETE(ld);
+ delete ld;
global_listing--;
}
time_t* last_list_time;
u->GetExt("safelist_last", last_list_time);
if (last_list_time)
{
- DELETE(last_list_time);
+ delete last_list_time;
u->Shrink("safelist_last");
}
}
{
ConfigReader* MyConf = new ConfigReader(ServerInstance);
allowlist.clear();
+
for (int i = 0; i < MyConf->Enumerate("securehost"); i++)
allowlist.push_back(MyConf->ReadValue("securehost", "exception", i));
+
WaitTime = MyConf->ReadInteger("securelist", "waittime", "60", 0, true);
- DELETE(MyConf);
+ delete MyConf;
}
void Implements(char* List)
ServerInstance->Modes->DelMode(m3);
ServerInstance->Modes->DelMode(m4);
ServerInstance->Modes->DelMode(m5);
- DELETE(m1);
- DELETE(m2);
- DELETE(m3);
- DELETE(m4);
- DELETE(m5);
+ delete m1;
+ delete m2;
+ delete m3;
+ delete m4;
+ delete m5;
}
virtual Version GetVersion()
ServerInstance->Modes->DelMode(m1);
ServerInstance->Modes->DelMode(m2);
ServerInstance->Modes->DelMode(m3);
- DELETE(m1);
- DELETE(m2);
- DELETE(m3);
+ delete m1;
+ delete m2;
+ delete m3;
}
virtual Version GetVersion()
/* $ModDesc: Provides masking of user hostnames via traditional /VHOST command */
-static ConfigReader* Conf;
-
/** Handle /VHOST
*/
class cmd_vhost : public command_t
CmdResult Handle (const char** parameters, int pcnt, userrec *user)
{
+ ConfigReader *Conf = new ConfigReader(ServerInstance);
+
for (int index = 0; index < Conf->Enumerate("vhost"); index++)
{
std::string mask = Conf->ReadValue("vhost","host",index);
{
user->WriteServ("NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask);
user->ChangeDisplayedHost(mask.c_str());
+ delete Conf;
return CMD_LOCALONLY;
}
}
}
user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid username or password.");
+ delete Conf;
return CMD_FAILURE;
}
};
public:
ModuleVHost(InspIRCd* Me) : Module(Me)
{
-
- Conf = new ConfigReader(ServerInstance);
mycommand = new cmd_vhost(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
virtual ~ModuleVHost()
{
- DELETE(Conf);
}
void Implements(char* List)
{
- List[I_OnRehash] = 1;
}
- virtual void OnRehash(userrec* user, const std::string ¶meter)
- {
- DELETE(Conf);
- Conf = new ConfigReader(ServerInstance);
- }
-
virtual Version GetVersion()
{
return Version(1,1,0,1,VF_VENDOR,API_VERSION);