Visibility = NULL;
ip = NULL;
MyClass = NULL;
+ AllowedUserModes = NULL;
+ AllowedChanModes = NULL;
AllowedOperCommands = NULL;
memset(AllowedUserModes, 0, sizeof(AllowedUserModes));
memset(AllowedChanModes, 0, sizeof(AllowedChanModes));
AllowedOperCommands = NULL;
}
+ if (this->AllowedUserModes)
+ {
+ delete AllowedUserModes;
+ AllowedUserModes = NULL;
+ }
+
+ if (this->AllowedChanModes)
+ {
+ delete AllowedChanModes;
+ AllowedChanModes = NULL;
+ }
+
this->InvalidateCache();
this->DecrementModes();
if (!IS_OPER(this))
return false;
+ if (!AllowedUserModes || !AllowedChanModes)
+ return false;
+
return ((type == MODETYPE_USER ? AllowedUserModes : AllowedChanModes))[(mode - 'A')];
}
else
AllowedOperCommands = new std::map<std::string, bool>;
+ if (!AllowedChanModes)
+ AllowedChanModes = new bool[64];
+
+ if (!AllowedUserModes)
+ AllowedUserModes = new bool[64];
+
+ memset(AllowedUserModes, 0, 64);
+ memset(AllowedChanModes, 0, 64);
+
char* Classes = strdup(iter_opertype->second);
char* myclass = strtok_r(Classes," ",&savept);
while (myclass)