if (redirect_all_immediately)
{
/* Redirect everyone but the oper sending the command */
- for (std::vector<LocalUser*>::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); i++)
+ for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i)
{
User* t = *i;
if (!IS_OPER(t))
public:
ModuleJumpServer() : js(this)
{
- ServerInstance->AddCommand(&js);
+ }
+
+ void init()
+ {
+ ServerInstance->Modules->AddService(js);
Implementation eventlist[] = { I_OnUserRegister, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleJumpServer()