- {
- // Now it's empty..
- DELETE(dl);
- chan->Shrink("norejoinusers");
- }
- }
- }
- return 0;
- }
-
- virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, const std::string &reason)
- {
- if (chan->IsModeSet('J') && (source != user))
- {
- delaylist* dl = (delaylist*)chan->GetExt("norejoinusers");
-
- if (!dl)
- {
- dl = new delaylist;
- chan->Extend("norejoinusers", (char*)dl);
- }
-
- log(DEBUG, "m_kicknorejoin.so: setting record for %s, %d second delay", user->nick, strtoint(chan->GetModeParameter('J')));
- (*dl)[user] = time(NULL) + strtoint(chan->GetModeParameter('J'));