summaryrefslogtreecommitdiff
path: root/kike.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-08-10 17:27:58 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-08-10 17:27:58 +0200
commit753eacab420348265da7c5c1e00c477297d65aac (patch)
treea43516fb1edc8fd6be26fc0b8c1781cf48ee16f8 /kike.c
parentfa2f234343eb4e2a76288a17cfdb4ae6306579f2 (diff)
downloadxK-753eacab420348265da7c5c1e00c477297d65aac.tar.gz
xK-753eacab420348265da7c5c1e00c477297d65aac.tar.xz
xK-753eacab420348265da7c5c1e00c477297d65aac.zip
kike: cleanup
Diffstat (limited to 'kike.c')
-rw-r--r--kike.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/kike.c b/kike.c
index bd30529..4511dae 100644
--- a/kike.c
+++ b/kike.c
@@ -1209,10 +1209,8 @@ irc_channel_multicast (struct channel *chan, const char *message,
struct client *except)
{
for (struct channel_user *iter = chan->users; iter; iter = iter->next)
- {
if (iter->c != except)
client_send (iter->c, "%s", message);
- }
}
static bool
@@ -2037,14 +2035,13 @@ irc_part_all_channels (struct client *c)
{
struct str_map_iter iter;
str_map_iter_init (&iter, &c->ctx->channels);
- struct channel *chan = str_map_iter_next (&iter), *next;
- while (chan)
+ struct channel *chan, *next = str_map_iter_next (&iter);
+ for (chan = next; chan; chan = next)
{
// We have to be careful here, the channel might get destroyed
next = str_map_iter_next (&iter);
if (channel_get_user (chan, c))
irc_try_part (c, chan->name, NULL);
- chan = next;
}
}