- this->WriteCommonFrom(user, channel, "JOIN %s", channel->name.c_str());
-
- std::string n = this->ServerInstance->Modes->ModeString(user, channel);
- if (n.length() > 0)
- this->WriteCommonFrom(user, channel, "MODE %s +%s", channel->name.c_str(), n.c_str());
-
- /* Shrink off the neccessary metadata for a specific channel */
- user->Shrink("delayjoin_"+channel->name);
-
- /* Check if the user is left on any other +D channels, if so don't take away the
- * metadata that says theyre on one or more channels
- */
- for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++)
- if (f->first->IsModeSet('D'))
- return;
-
- user->Shrink("delayjoin");
-}
-
-// .. is there a real need to duplicate WriteCommonExcept?
-void ModuleDelayJoin::WriteCommonFrom(User *user, Channel* channel, const char* text, ...)
-{
- va_list argsPtr;
- char textbuffer[MAXBUF];
- char tb[MAXBUF];
-
- va_start(argsPtr, text);
- vsnprintf(textbuffer, MAXBUF, text, argsPtr);
- va_end(argsPtr);
- snprintf(tb,MAXBUF,":%s %s",user->GetFullHost().c_str(), textbuffer);
-
- CUList *ulist = channel->GetUsers();
-
- for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
- {
- /* User doesnt get a JOIN sent to themselves */
- if (user == i->first)
- continue;