ModuleRedirect()
: re(this), re_u(this)
+ {
+ }
+
+ void init()
{
/* Setting this here so it isn't changable by rehasing the config later. */
UseUsermode = ServerInstance->Config->ConfValue("redirect")->getBool("antiredirect");
ServerInstance->Modules->Attach(eventlist, this, 1);
}
-
virtual ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (chan)
{
if (chan->IsModeSet('L') && chan->IsModeSet('l'))
{
- if (chan->GetUserCounter() >= atoi(chan->GetModeParameter('l').c_str()))
+ if (chan->GetUserCounter() >= ConvToInt(chan->GetModeParameter('l')))
{
std::string channel = chan->GetModeParameter('L');