- virtual ~ModuleDelayJoin();
- virtual Version GetVersion();
- virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick);
- virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent);
- void CleanUser(User* user);
- bool OnHostCycle(User* user);
- void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent);
- void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent);
- void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message);
- void OnText(User* user, void* dest, int target_type, const std::string &text, char status, CUList &exempt_list);
- void WriteCommonFrom(User *user, Channel* channel, const char* text, ...) CUSTOM_PRINTF(4, 5);
+
+ ModResult OnPreEventSend(LocalUser* user, const ClientProtocol::Event& ev, ClientProtocol::MessageList& messagelist) CXX11_OVERRIDE
+ {
+ const ClientProtocol::Events::Join& join = static_cast<const ClientProtocol::Events::Join&>(ev);
+ const Membership* const memb = join.GetMember();
+ const User* const u = memb->user;
+ if ((unjoined.get(memb)) && (u != user))
+ return MOD_RES_DENY;
+ return MOD_RES_PASSTHRU;
+ }