summaryrefslogtreecommitdiff
path: root/src/messages.c
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-11 20:28:06 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2009-06-11 20:28:06 +0000
commitfc78e51452a0244ee672fca91752eb7d982e2541 (patch)
tree60f6f06b3e3acf0ad3f29a14ae7aef62fb16b1f7 /src/messages.c
parent8fa67528583b83a23030d5d358e070586672cc87 (diff)
Make stristr() const-safe, replace post-increment on iterators with pre-increment, remove now unused variables, made my_memo_lang() in hs_request.c const-safe.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2320 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/messages.c')
-rw-r--r--src/messages.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/messages.c b/src/messages.c
index a29841b6a..d77b62809 100644
--- a/src/messages.c
+++ b/src/messages.c
@@ -216,7 +216,6 @@ int m_privmsg(const char *source, const char *receiver, const char *msg)
int m_stats(const char *source, int ac, const char **av)
{
- int i;
User *u;
NickCore *nc;
@@ -245,13 +244,12 @@ int m_stats(const char *source, int ac, const char **av)
} else {
std::list<std::pair<std::string, std::string> >::iterator it;
- for (it = svsopers_in_config.begin(); it != svsopers_in_config.end(); it++)
+ for (it = svsopers_in_config.begin(); it != svsopers_in_config.end(); ++it)
{
- const std::string nick = it->first;
- const std::string type = it->second;
+ std::string nick = it->first, type = it->second;
- if ((nc = findcore(it->first.c_str())))
- ircdproto->SendNumeric(ServerName, 243, source, "O * * %s %s 0", it->first.c_str(), it->second.c_str());
+ if ((nc = findcore(nick.c_str())))
+ ircdproto->SendNumeric(ServerName, 243, source, "O * * %s %s 0", nick.c_str(), type.c_str());
}
ircdproto->SendNumeric(ServerName, 219, source, "%c :End of /STATS report.", *av[0] ? *av[0] : '*');