send: sendto_local_clients_with_capability() needn't use serial

sendto_local_clients_with_capability() sends to a subset of the list of
local clients and cannot visit the same client multiple times like
sendto_channel_flags() and sendto_common_channels_local() can.
This commit is contained in:
Jilles Tjoelker 2015-03-01 14:53:40 +01:00
parent bbce62d2aa
commit bed692ca0e

View file

@ -1041,18 +1041,13 @@ sendto_local_clients_with_capability(int cap, const char *pattern, ...)
rb_linebuf_putmsg(&linebuf, pattern, &args, NULL);
va_end(args);
current_serial++;
RB_DLINK_FOREACH(ptr, lclient_list.head)
{
target_p = ptr->data;
if(IsIOError(target_p) ||
target_p->serial == current_serial ||
!IsCapable(target_p, cap))
if(IsIOError(target_p) || !IsCapable(target_p, cap))
continue;
target_p->serial = current_serial;
send_linebuf(target_p, &linebuf);
}