+ modelist* el;
+ channel->GetExt(infokey, el);
+ if (el)
+ {
+ for(modelist::iterator it = el->begin(); it != el->end(); it++)
+ {
+ user->WriteServ("%s %s %s %s %s %s", listnumeric.c_str(), user->nick, channel->name, it->mask.c_str(), it->nick.c_str(), it->time.c_str());
+ }
+ }
+ user->WriteServ("%s %s %s :%s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
+ }
+
+ virtual void RemoveMode(chanrec* channel)
+ {
+ ServerInstance->Log(DEBUG,"Removing listmode base from %s %s",channel->name,infokey.c_str());
+ modelist* el;
+ channel->GetExt(infokey, el);
+ if (el)
+ {
+ ServerInstance->Log(DEBUG,"Channel is extended with a list");
+ irc::modestacker modestack(false);
+ std::deque<std::string> stackresult;
+ const char* mode_junk[MAXMODES+1];
+ mode_junk[0] = channel->name;
+ userrec* n = new userrec(ServerInstance);
+ n->SetFd(FD_MAGIC_NUMBER);
+ for(modelist::iterator it = el->begin(); it != el->end(); it++)
+ {
+ modestack.Push(this->GetModeChar(), it->mask);
+ }
+ while (modestack.GetStackedLine(stackresult))
+ {
+ for (size_t j = 0; j < stackresult.size(); j++)
+ {
+ mode_junk[j+1] = stackresult[j].c_str();
+ }
+ ServerInstance->SendMode(mode_junk, stackresult.size() + 1, n);
+ }
+
+ delete n;
+ }
+ }
+
+ virtual void RemoveMode(userrec* user)
+ {
+ /* Listmodes dont get set on users */
+ }
+
+ virtual void DoRehash()
+ {
+ ConfigReader Conf(ServerInstance);
+