Visibility = NULL;
ip = NULL;
MyClass = NULL;
+ io = NULL;
AllowedUserModes = NULL;
AllowedChanModes = NULL;
AllowedOperCommands = NULL;
- memset(AllowedUserModes, 0, sizeof(AllowedUserModes));
- memset(AllowedChanModes, 0, sizeof(AllowedChanModes));
chans.clear();
invites.clear();
memset(modes,0,sizeof(modes));
if (this->AllowedUserModes)
{
- delete AllowedUserModes;
+ delete[] AllowedUserModes;
AllowedUserModes = NULL;
}
if (this->AllowedChanModes)
{
- delete AllowedChanModes;
+ delete[] AllowedChanModes;
AllowedChanModes = NULL;
}
{
if (*c == '*')
{
- memset(this->AllowedUserModes, (int)(true), sizeof(this->AllowedUserModes));
+ memset(this->AllowedUserModes, (int)(true), 64);
}
else
{
{
if (*c == '*')
{
- memset(this->AllowedChanModes, (int)(true), sizeof(this->AllowedChanModes));
+ memset(this->AllowedChanModes, (int)(true), 64);
}
else
{
delete AllowedOperCommands;
AllowedOperCommands = NULL;
}
+ if (AllowedUserModes)
+ {
+ delete[] AllowedUserModes;
+ AllowedUserModes = NULL;
+ }
+ if (AllowedChanModes)
+ {
+ delete[] AllowedChanModes;
+ AllowedChanModes = NULL;
+ }
+
}
}
return;
}
- if (ServerInstance->Config->GetIOHook(this->GetPort()))
+ if (this->io)
{
/* XXX: The lack of buffering here is NOT a bug, modules implementing this interface have to
* implement their own buffering mechanisms
*/
try
{
- ServerInstance->Config->GetIOHook(this->GetPort())->OnRawSocketWrite(this->fd, text.data(), text.length());
+ this->io->OnRawSocketWrite(this->fd, text.data(), text.length());
}
catch (CoreException& modexcept)
{