]> jfr.im git - solanum.git/blobdiff - tests/client_util.c
tests: add client util make_local_person_oper()
[solanum.git] / tests / client_util.c
index 9a6468e94e213137de8b428858cc68ef7e331a14..20ac1dadde97b9e4a757460b3aaea8dac88e0218 100644 (file)
@@ -60,6 +60,13 @@ struct Client *make_local_person_full(const char *nick, const char *username, co
        return client;
 }
 
+void make_local_person_oper(struct Client *client)
+{
+       rb_dlinkAddAlloc(client, &local_oper_list);
+       rb_dlinkAddAlloc(client, &oper_list);
+       SetOper(client);
+}
+
 void remove_local_person(struct Client *client)
 {
        exit_client(NULL, client, &me, "Test client removed");