From 69b42417f3133154536034074b0d60d2f0314a72 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 7 May 2008 18:24:55 +0000 Subject: Make u_listmode more sensible and make it properly use WriteNumeric, and a few other misc fixes found during today git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9659 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/u_listmode.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/u_listmode.h b/include/u_listmode.h index 3b0fb5c3f..5c5ddd9ff 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -87,10 +87,10 @@ class ListModeBase : public ModeHandler std::string infokey; /** Numeric to use when outputting the list */ - std::string listnumeric; + unsigned int listnumeric; /** Numeric to indicate end of list */ - std::string endoflistnumeric; + unsigned int endoflistnumeric; /** String to send for end of list */ std::string endofliststring; @@ -115,7 +115,7 @@ class ListModeBase : public ModeHandler * @param autotidy Automatically tidy list entries on add * @param ctag Configuration tag to get limits from */ - ListModeBase(InspIRCd* Instance, char modechar, const std::string &eolstr, const std::string &lnum, const std::string &eolnum, bool autotidy, const std::string &ctag = "banlist") + ListModeBase(InspIRCd* Instance, char modechar, const std::string &eolstr, unsigned int lnum, unsigned int eolnum, bool autotidy, const std::string &ctag = "banlist") : ModeHandler(Instance, modechar, 1, 1, true, MODETYPE_CHANNEL, false), listnumeric(lnum), endoflistnumeric(eolnum), endofliststring(eolstr), tidy(autotidy), configtag(ctag) { this->DoRehash(); @@ -153,15 +153,15 @@ class ListModeBase : public ModeHandler { 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->WriteNumeric(listnumeric, "%s %s %s %s %s", 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()); + user->WriteNumeric(endoflistnumeric, "%s %s :%s", 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()); + user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick, channel->name, endofliststring.c_str()); } /** Remove all instances of the mode from a channel. -- cgit v1.2.3