From 3c3b9160c645f22297d5f5add083eb539a25f1f5 Mon Sep 17 00:00:00 2001 From: dequis Date: Mon, 25 Jan 2016 01:42:34 -0300 Subject: irc_channel_add_user: Don't call update_ops if not needed It only affects irc->user and irc->root, and this was calling it for everyone. --- irc_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'irc_channel.c') diff --git a/irc_channel.c b/irc_channel.c index 6ba5a4d7..3ccbce55 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -244,7 +244,9 @@ int irc_channel_add_user(irc_channel_t *ic, irc_user_t *iu) ic->users = g_slist_insert_sorted(ic->users, icu, irc_channel_user_cmp); - irc_channel_update_ops(ic, set_getstr(&ic->irc->b->set, "ops")); + if (iu == ic->irc->user || iu == ic->irc->root) { + irc_channel_update_ops(ic, set_getstr(&ic->irc->b->set, "ops")); + } if (iu == ic->irc->user || ic->flags & IRC_CHANNEL_JOINED) { ic->flags |= IRC_CHANNEL_JOINED; -- cgit v1.2.3