summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-07-18 01:03:21 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-07-18 01:03:21 +0200
commit353230b18ba7c8c225c3b23a759798558fabb7de (patch)
tree0067b56e0aae39b654fff6570af3d181dc5a74f8
parentb2a4d38e8c7ccee495845e6be7d36d9ec0771ea8 (diff)
downloadxK-353230b18ba7c8c225c3b23a759798558fabb7de.tar.gz
xK-353230b18ba7c8c225c3b23a759798558fabb7de.tar.xz
xK-353230b18ba7c8c225c3b23a759798558fabb7de.zip
Cleanup
-rw-r--r--src/kike.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/kike.c b/src/kike.c
index 7632a35..7278363 100644
--- a/src/kike.c
+++ b/src/kike.c
@@ -612,11 +612,7 @@ irc_send_lusers (struct client *c)
n_opers++;
}
- int n_channels = 0;
- struct str_map_iter iter;
- str_map_iter_init (&iter, &c->ctx->channels);
- while (str_map_iter_next (&iter))
- n_channels++;
+ int n_channels = c->ctx->channels.len;
irc_send_reply (c, IRC_RPL_LUSERCLIENT,
n_users, n_services, 1 /* servers total */);
@@ -753,13 +749,9 @@ static void
irc_handle_lusers (const struct irc_message *msg, struct client *c)
{
if (msg->params.len > 1 && !irc_is_this_me (c->ctx, msg->params.vector[1]))
- {
irc_send_reply (c, IRC_ERR_NOSUCHSERVER, msg->params.vector[1]);
- return;
- }
else
irc_send_lusers (c);
-
}
static void