diff options
author | Test_User <hax@andrewyu.org> | 2024-09-05 03:48:11 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-09-05 03:48:11 -0400 |
commit | c83e033d4c1981c1f929ed656d757b40a5a96885 (patch) | |
tree | 9d6bdb4d5c7a0cf947701f4ef9df78aa8e0eb54e /pseudoclients/services.c | |
parent | dd52e3a0dd88a42f900ae7e81eccbf6fd1fe48c1 (diff) | |
download | haxircd-c83e033d4c1981c1f929ed656d757b40a5a96885.tar.gz haxircd-c83e033d4c1981c1f929ed656d757b40a5a96885.zip |
Convert to non-UB haxtable stuff
Diffstat (limited to 'pseudoclients/services.c')
-rw-r--r-- | pseudoclients/services.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pseudoclients/services.c b/pseudoclients/services.c index 5d4c249..c9243f6 100644 --- a/pseudoclients/services.c +++ b/pseudoclients/services.c @@ -63,7 +63,8 @@ int services_pseudoclient_post_reload(void) { if (!has_table_index(user_list, NICKSERV_UID)) { if (add_user(SID, SID, NICKSERV_UID, NICKSERV_NICK, NICKSERV_FULLNAME, NICKSERV_IDENT, NICKSERV_VHOST, NICKSERV_HOST, NICKSERV_ADDRESS, now, now, 0, 0, 0, 1, SERVICES_PSEUDOCLIENT) != 0) return 1; - struct user_info *user = get_table_index(user_list, NICKSERV_UID); + char exists; + struct user_info *user = get_table_index(user_list, NICKSERV_UID, &exists).data; if (set_channel(SID, SERVICES_CHANNEL, now, 1, &user) != 0) return 1; } @@ -147,8 +148,9 @@ int services_pseudoclient_allow_kick(struct string from, struct string source, s } void services_pseudoclient_handle_privmsg(struct string from, struct string source, struct string target, struct string msg) { - struct user_info *user = get_table_index(user_list, source); - if (!user) + char exists; + struct user_info *user = get_table_index(user_list, source, &exists).data; + if (!exists) return; if (STRING_EQ(target, NICKSERV_UID)) { |