kike: cleanup
This commit is contained in:
parent
fa2f234343
commit
753eacab42
7
kike.c
7
kike.c
|
@ -1209,11 +1209,9 @@ irc_channel_multicast (struct channel *chan, const char *message,
|
||||||
struct client *except)
|
struct client *except)
|
||||||
{
|
{
|
||||||
for (struct channel_user *iter = chan->users; iter; iter = iter->next)
|
for (struct channel_user *iter = chan->users; iter; iter = iter->next)
|
||||||
{
|
|
||||||
if (iter->c != except)
|
if (iter->c != except)
|
||||||
client_send (iter->c, "%s", message);
|
client_send (iter->c, "%s", message);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
irc_modify_mode (unsigned *mask, unsigned mode, bool add)
|
irc_modify_mode (unsigned *mask, unsigned mode, bool add)
|
||||||
|
@ -2037,14 +2035,13 @@ irc_part_all_channels (struct client *c)
|
||||||
{
|
{
|
||||||
struct str_map_iter iter;
|
struct str_map_iter iter;
|
||||||
str_map_iter_init (&iter, &c->ctx->channels);
|
str_map_iter_init (&iter, &c->ctx->channels);
|
||||||
struct channel *chan = str_map_iter_next (&iter), *next;
|
struct channel *chan, *next = str_map_iter_next (&iter);
|
||||||
while (chan)
|
for (chan = next; chan; chan = next)
|
||||||
{
|
{
|
||||||
// We have to be careful here, the channel might get destroyed
|
// We have to be careful here, the channel might get destroyed
|
||||||
next = str_map_iter_next (&iter);
|
next = str_map_iter_next (&iter);
|
||||||
if (channel_get_user (chan, c))
|
if (channel_get_user (chan, c))
|
||||||
irc_try_part (c, chan->name, NULL);
|
irc_try_part (c, chan->name, NULL);
|
||||||
chan = next;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue