-
- ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
- {
- if (!adding)
- {
- // Taking the mode off, we need to clean up.
- delaylist* dl;
-
- if (channel->GetExt("norejoinusers", dl))
- {
- DELETE(dl);
- channel->Shrink("norejoinusers");
- }
- }
- if ((!adding) || (atoi(parameter.c_str()) > 0))
- {
- ServerInstance->Log(DEBUG,"Got parameter: '%s'",parameter.c_str());
-
- if (!channel->IsModeSet('J'))
- {
- parameter = ConvToStr(atoi(parameter.c_str()));
- channel->SetModeParam('J', parameter.c_str(), adding);
- channel->SetMode('J', adding);
- return MODEACTION_ALLOW;
- }
- else
- {
- if (!adding)
- {
- channel->SetModeParam('J', parameter.c_str(), adding);
- return MODEACTION_ALLOW;
- }