summaryrefslogtreecommitdiff
path: root/src/listmode.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-11-12 06:51:31 -0500
committerAdam <Adam@anope.org>2013-11-12 06:51:31 -0500
commit6c7a3ceb6c674a9af09da955ee0238e9291cf29a (patch)
treec9fd79d5814685e43f5d9ade75cad5f11da06364 /src/listmode.cpp
parent407f8ef1391e5d09e99e0abfc570389decc3ce2d (diff)
Use WriteNumeric() everywhere we send numerics and include the user's nick automatically
Diffstat (limited to 'src/listmode.cpp')
-rw-r--r--src/listmode.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/listmode.cpp b/src/listmode.cpp
index 33578b738..2e6703df3 100644
--- a/src/listmode.cpp
+++ b/src/listmode.cpp
@@ -34,15 +34,15 @@ void ListModeBase::DisplayList(User* user, Channel* channel)
{
for (ModeList::reverse_iterator it = cd->list.rbegin(); it != cd->list.rend(); ++it)
{
- user->WriteNumeric(listnumeric, "%s %s %s %s %lu", user->nick.c_str(), channel->name.c_str(), it->mask.c_str(), (!it->setter.empty() ? it->setter.c_str() : ServerInstance->Config->ServerName.c_str()), (unsigned long) it->time);
+ user->WriteNumeric(listnumeric, "%s %s %s %lu", channel->name.c_str(), it->mask.c_str(), (!it->setter.empty() ? it->setter.c_str() : ServerInstance->Config->ServerName.c_str()), (unsigned long) it->time);
}
}
- user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name.c_str(), endofliststring.c_str());
+ user->WriteNumeric(endoflistnumeric, "%s :%s", channel->name.c_str(), endofliststring.c_str());
}
void ListModeBase::DisplayEmptyList(User* user, Channel* channel)
{
- user->WriteNumeric(endoflistnumeric, "%s %s :%s", user->nick.c_str(), channel->name.c_str(), endofliststring.c_str());
+ user->WriteNumeric(endoflistnumeric, "%s :%s", channel->name.c_str(), endofliststring.c_str());
}
void ListModeBase::RemoveMode(Channel* channel, irc::modestacker& stack)
@@ -209,7 +209,7 @@ bool ListModeBase::ValidateParam(User*, Channel*, std::string&)
void ListModeBase::TellListTooLong(User* source, Channel* channel, std::string& parameter)
{
- source->WriteNumeric(478, "%s %s %s :Channel ban list is full", source->nick.c_str(), channel->name.c_str(), parameter.c_str());
+ source->WriteNumeric(ERR_BANLISTFULL, "%s %s :Channel ban list is full", channel->name.c_str(), parameter.c_str());
}
void ListModeBase::TellAlreadyOnList(User*, Channel*, std::string&)