* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
- unsigned long expire = ServerInstance->Duration(parameters[1]) + time(NULL);
- if (ServerInstance->Duration(parameters[1]) < 1)
+ long duration = ServerInstance->Duration(parameters[1]);
+ unsigned long expire = duration + time(NULL);
+ if (duration < 1)
- channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s added a timed ban on %s lasting for %s seconds.", channel->name, user->nick, mask.c_str(), duration);
+ channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name, user->nick, mask.c_str(), duration);
// falls into the abyss :p
userrec* temp = new userrec(ServerInstance);
temp->SetFd(FD_MAGIC_NUMBER);
// falls into the abyss :p
userrec* temp = new userrec(ServerInstance);
temp->SetFd(FD_MAGIC_NUMBER);
- /* FIX: Send mode remotely*/
- std::deque<std::string> n;
- n.push_back(setban[0]);
- n.push_back("-b");
- n.push_back(setban[2]);
+ /* FIX: Send mode remotely*/
+ std::deque<std::string> n;
+ n.push_back(setban[0]);
+ n.push_back("-b");
+ n.push_back(setban[2]);
- Event rmode((char *)&n, NULL, "send_mode");
- rmode.Send(ServerInstance);
+ Event rmode((char *)&n, NULL, "send_mode");
+ rmode.Send(ServerInstance);