- delaylist* dl;
- if (chan->GetExt("norejoinusers", dl))
- {
- ServerInstance->Log(DEBUG, "m_kicknorejoin.so: got delay list, iterating over it");
- std::vector<userrec*> itemstoremove;
-
- for (delaylist::iterator iter = dl->begin(); iter != dl->end(); iter++)
- {
- ServerInstance->Log(DEBUG, "m_kicknorejoin.so:\t[%s] => %d", iter->first->nick, iter->second);
- if (iter->second > time(NULL))
- {
- ServerInstance->Log(DEBUG, "m_kicknorejoin.so: still inside time slot");
- if (iter->first == user)
- {
- ServerInstance->Log(DEBUG, "m_kicknorejoin.so: and we have the right user");
- user->WriteServ( "495 %s %s :You cannot rejoin this channel yet after being kicked (+J)", user->nick, chan->name);
- return 1;
- }
- }
- else
- {
- // Expired record, remove.
- ServerInstance->Log(DEBUG, "m_kicknorejoin.so: record expired");
- itemstoremove.push_back(iter->first);
- }
- }
-
- for (unsigned int i = 0; i < itemstoremove.size(); i++)
- dl->erase(itemstoremove[i]);
-
- if (!dl->size())
- {
- // 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;
- if (!chan->GetExt("norejoinusers", dl))