Skip to content

Commit

Permalink
Proposal for #1588
Browse files Browse the repository at this point in the history
Following #1588 : initialize ok to -1, sets it to 0 if user is known
  • Loading branch information
crazycatdevs authored May 22, 2024
1 parent e28a0a0 commit b2325ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tcluser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b2325ec

Please sign in to comment.