+ infokey = "listbase_mode_" + std::string(1, mode) + "_list";
+ }
+
+ /** See mode.h
+ */
+ std::pair<bool,std::string> ModeSet(User*, User*, Channel* channel, const std::string ¶meter)
+ {
+ modelist* el;
+ channel->GetExt(infokey, el);
+ if (el)
+ {
+ for (modelist::iterator it = el->begin(); it != el->end(); it++)
+ {
+ if(parameter == it->mask)
+ {
+ return std::make_pair(true, parameter);
+ }
+ }
+ }
+ return std::make_pair(false, parameter);
+ }
+
+ /** 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->WriteNumeric(listnumeric, "%s %s %s %s %s", user->nick, channel->name, it->mask.c_str(), it->nick.c_str(), it->time.c_str());
+ }
+ }
+ user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick, channel->name, endofliststring.c_str());