m_privs: don't leave a damaged privset behind
This commit is contained in:
parent
373ba193b8
commit
bd8b9a37be
1 changed files with 6 additions and 1 deletions
|
@ -106,8 +106,13 @@ static void show_privs(struct Client *source_p, struct Client *target_p)
|
|||
buf[0] = '\0';
|
||||
|
||||
if (target_p->user->privset)
|
||||
for (const char *s = strtok(target_p->user->privset->privs, " "); s != NULL; s = strtok(NULL, " "))
|
||||
for (char *s = target_p->user->privset->privs; s != NULL; (s = strchr(s, ' ')) && s++)
|
||||
{
|
||||
char *c = strchr(s, ' ');
|
||||
if (c) *c = '\0';
|
||||
append_priv(source_p, target_p, buf, s, "");
|
||||
if (c) *c = ' ';
|
||||
}
|
||||
|
||||
if (IsOper(target_p))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue