From b9d7f41c8a7f296bb81d19a8494e0b3b5ad3dea9 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 8 Jun 2008 02:13:26 -0500 Subject: [PATCH] Forgot to test the bitmask, oops. --- src/s_newconf.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/s_newconf.c b/src/s_newconf.c index 86d20b9..fa51336 100644 --- a/src/s_newconf.c +++ b/src/s_newconf.c @@ -356,12 +356,13 @@ get_oper_privs(int flags) *p = '\0'; for(i = 0; oper_flagtable[i].flag; i++) - { - if(i) - rb_strlcat(buf, ", ", sizeof(buf)); + if (flags & oper_flagtable[i].flag) + { + if(i) + rb_strlcat(buf, ", ", sizeof(buf)); - rb_strlcat(buf, oper_flagtable[i].name, sizeof(buf)); - } + rb_strlcat(buf, oper_flagtable[i].name, sizeof(buf)); + } return buf; }