- 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);
- CleanUser(user);
-}
-
-// .. 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;
-
- /* Users with a visibility state that hides them dont appear */
- if (user->Visibility && !user->Visibility->VisibleTo(i->first))
- continue;
-
- i->first->Write(std::string(tb));
- }
+ channel->WriteAllExceptSender(user, false, 0, "MODE %s +%s", channel->name.c_str(), n.c_str());