diff options
author | dequis <dx@dxzone.com.ar> | 2016-01-25 01:42:34 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-03-20 00:58:05 -0300 |
commit | 3c3b9160c645f22297d5f5add083eb539a25f1f5 (patch) | |
tree | e48224e1ce32df164ff47101d86d12a6126b28bb | |
parent | 8f8a56f6216214dd8a945dbc0106f21421832e4b (diff) |
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.
-rw-r--r-- | irc_channel.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; |