From b2325ec29cb1f9add77559dc77a6cb9c2e832768 Mon Sep 17 00:00:00 2001 From: crazycatdevs <44431938+crazycatdevs@users.noreply.github.com> Date: Wed, 22 May 2024 15:35:24 +0200 Subject: [PATCH] Proposal for #1588 Following #1588 : initialize ok to -1, sets it to 0 if user is known --- src/tcluser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tcluser.c b/src/tcluser.c index 383de67f7..98236ce89 100644 --- a/src/tcluser.c +++ b/src/tcluser.c @@ -251,11 +251,13 @@ static int tcl_matchattr STDVAR { struct userrec *u; struct flag_record plus = {0}, minus = {0}, user = {0}; - int ok = 0, nom = 0; + int ok = -1; + int nom = 0; BADARGS(3, 4, " handle flags ?channel?"); if ((u = get_user_by_handle(userlist, argv[1]))) { + ok = 0; user.match = FR_GLOBAL | (argc == 4 ? FR_CHAN : 0) | FR_BOT; get_user_flagrec(u, &user, argv[3]); plus.match = user.match;