]> jfr.im git - solanum.git/blobdiff - tests/client_util.c
add SNO_FARCONNECT to the help text (#260)
[solanum.git] / tests / client_util.c
index 52209380ab9622f4bfb971c6c53a22531f2a4630..322f3c56725b626734ee6eecfb982cae8639b1fe 100644 (file)
@@ -33,7 +33,6 @@
 #define MSG "%s:%d (%s)", __FILE__, __LINE__, __FUNCTION__
 
 static struct Listener fake_listener = {
-       .next = NULL,
        .name = "fake",
        .F = NULL,
        .ref_count = 0,
@@ -59,6 +58,7 @@ struct Client *make_local_unknown(void)
        rb_dlinkAdd(client, &client->lnode, &client->servptr->serv->users);
        client->localClient->listener = &fake_listener;
        client->preClient->auth.accepted = true;
+       client->localClient->localflags |= LFLAGS_FAKE;
 
        return client;
 }
@@ -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)
@@ -121,6 +123,7 @@ struct Client *make_remote_server_full(struct Client *uplink, const char *name,
 
        client = make_client(NULL);
        client->servptr = uplink;
+       client->localClient->localflags |= LFLAGS_FAKE;
 
        attach_server_conf(client, find_server_conf(name));