]> jfr.im git - irc/freenode/ircd-seven.git/commitdiff
Test sendto_channel_local_priv not ONLY_OPERS
authorEd Kellett <redacted>
Sun, 7 Jun 2020 17:06:51 +0000 (18:06 +0100)
committerEd Kellett <redacted>
Tue, 4 Aug 2020 21:58:31 +0000 (22:58 +0100)
tests/client_util.c
tests/send1.c

index 52209380ab9622f4bfb971c6c53a22531f2a4630..0b30ca71a464e2cb9cfee6ffc6ad30b412eb157f 100644 (file)
@@ -98,6 +98,8 @@ void make_local_person_oper(struct Client *client)
        rb_dlinkAddAlloc(client, &local_oper_list);
        rb_dlinkAddAlloc(client, &oper_list);
        SetOper(client);
+       struct PrivilegeSet *p = privilegeset_set_new("test", "test:test", 0);
+       client->user->privset = privilegeset_ref(p);
 }
 
 void remove_local_person(struct Client *client)
index 13d4a218144e0bbc0d3d5f08a5c974048fc823fe..973323226c223b5b0e537d95ad3705423da5ce1d 100644 (file)
@@ -1574,7 +1574,7 @@ static void sendto_channel_local1(void)
        is_client_sendq_empty(server, MSG);
        is_client_sendq_empty(server2, MSG);
 
-       sendto_channel_local(user, ONLY_OPERS, channel, "Hello %s!", "World");
+       sendto_channel_local_priv(user, ALL_MEMBERS, "test:test", channel, "Hello %s!", "World");
        is_client_sendq_empty(user, "Not an oper; " MSG);
        is_client_sendq_empty(local_chan_o, "Not an oper; " MSG);
        is_client_sendq_empty(local_chan_ov, "Not an oper; " MSG);
@@ -1603,7 +1603,7 @@ static void sendto_channel_local1(void)
        is_client_sendq_empty(server2, MSG);
        is_client_sendq_empty(server3, MSG);
 
-       sendto_channel_local(user, ONLY_OPERS, lchannel, "Hello %s!", "World");
+       sendto_channel_local_priv(user, ALL_MEMBERS, "test:test", lchannel, "Hello %s!", "World");
        is_client_sendq_empty(user, "Not an oper; " MSG);
        is_client_sendq("Hello World!" CRLF, oper1, "Is an oper; " MSG);
        is_client_sendq("Hello World!" CRLF, oper2, "Is an oper; " MSG);
@@ -1664,7 +1664,7 @@ static void sendto_channel_local1__tags(void)
        is_client_sendq_empty(server, MSG);
        is_client_sendq_empty(server2, MSG);
 
-       sendto_channel_local(user, ONLY_OPERS, channel, "Hello %s!", "World");
+       sendto_channel_local_priv(user, ALL_MEMBERS, "test:test", channel, "Hello %s!", "World");
        is_client_sendq_empty(user, "Not an oper; " MSG);
        is_client_sendq_empty(local_chan_o, "Not an oper; " MSG);
        is_client_sendq_empty(local_chan_ov, "Not an oper; " MSG);
@@ -1696,7 +1696,7 @@ static void sendto_channel_local1__tags(void)
        is_client_sendq_empty(server2, MSG);
        is_client_sendq_empty(server3, MSG);
 
-       sendto_channel_local(user, ONLY_OPERS, lchannel, "Hello %s!", "World");
+       sendto_channel_local_priv(user, ALL_MEMBERS, "test:test", lchannel, "Hello %s!", "World");
        is_client_sendq_empty(user, "Not an oper; " MSG);
        is_client_sendq("@account=test Hello World!" CRLF, oper1, "Is an oper; " MSG);
        is_client_sendq("@time=" ADVENTURE_TIME " Hello World!" CRLF, oper2, "Is an oper; " MSG);
@@ -1715,7 +1715,7 @@ static void sendto_channel_local1__tags(void)
        is_client_sendq_empty(server2, MSG);
        is_client_sendq_empty(server3, MSG);
 
-       sendto_channel_local(user, ONLY_OPERS, lchannel, "Hello %s!", "World");
+       sendto_channel_local_priv(user, ALL_MEMBERS, "test:test", lchannel, "Hello %s!", "World");
        is_client_sendq_empty(user, "Not an oper; " MSG);
        is_client_sendq("Hello World!" CRLF, oper1, "Is an oper; " MSG);
        is_client_sendq("@time=" ADVENTURE_TIME ";account=test Hello World!" CRLF, oper2, "Is an oper; " MSG);