summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-07 18:24:55 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-07 18:24:55 +0000
commit69b42417f3133154536034074b0d60d2f0314a72 (patch)
tree90521a6e44139025c51860a0dd276425f0db8450 /include
parent565173aedd3926e63ae4b782466ce1e21c22ab4a (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/u_listmode.h12
1 files changed, 6 insertions, 6 deletions
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.