RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
{
+ if (IS_LOCAL(user))
+ return ROUTE_LOCALONLY; // spanningtree will send ADDLINE
+
return ROUTE_BROADCAST;
}
};
public:
ModuleCBan() : mycommand(this)
+ {
+ }
+
+ void init()
{
ServerInstance->XLines->RegisterFactory(&f);
- ServerInstance->AddCommand(&mycommand);
+ ServerInstance->Modules->AddService(mycommand);
Implementation eventlist[] = { I_OnUserPreJoin, I_OnStats };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
virtual ~ModuleCBan()