+ /** Display the list for this mode
+ * @param user The user to send the list to
+ * @param channel The channel the user is requesting the list for
+ */
+ virtual void DisplayList(User* user, Channel* channel)
+ {
+ modelist* el;
+ channel->GetExt(infokey, el);
+ if (el)
+ {
+ for (modelist::reverse_iterator it = el->rbegin(); it != el->rend(); ++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 DisplayEmptyList(User* user, Channel* channel)
+ {
+ user->WriteServ("%s %s %s :%s", endoflistnumeric.c_str(), user->nick, channel->name, endofliststring.c_str());
+ }
+
+ /** Remove all instances of the mode from a channel.
+ * See mode.h
+ * @param channel The channel to remove all instances of the mode from
+ */
+ virtual void RemoveMode(Channel* channel)
+ {
+ modelist* el;
+ channel->GetExt(infokey, el);
+ if (el)
+ {
+ irc::modestacker modestack(false);
+ std::deque<std::string> stackresult;
+ const char* mode_junk[MAXMODES+2];
+ mode_junk[0] = channel->name;
+
+ for (modelist::iterator it = el->begin(); it != el->end(); it++)
+ {
+ modestack.Push(this->GetModeChar(), assign(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, ServerInstance->FakeClient);
+ }
+ }
+ }
+
+ /** See mode.h
+ */
+ virtual void RemoveMode(User*)
+ {
+ /* Listmodes dont get set on users */
+ }
+
+ /** Perform a rehash of this mode's configuration data
+ */