]> jfr.im git - solanum.git/commitdiff
send: sendto_local_clients_with_capability() needn't use serial
authorJilles Tjoelker <redacted>
Sun, 1 Mar 2015 13:53:40 +0000 (14:53 +0100)
committerJilles Tjoelker <redacted>
Sun, 1 Mar 2015 13:55:57 +0000 (14:55 +0100)
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.

src/send.c

index cbc4575f051de027ee390ef1bb55523974489e34..cc169f1bed725d6ea77fe9d25884a2bfb4c43382 100644 (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);
        }