Merge pull request #2 from gholms/mlocktweak-allchr
mlocktweaker: consider all mode characters
This commit is contained in:
commit
20a31ab093
|
@ -47,17 +47,21 @@ static void handle_channel_register(hook_channel_req_t *hdata)
|
||||||
target = &mc->mlock_on;
|
target = &mc->mlock_on;
|
||||||
it = str;
|
it = str;
|
||||||
|
|
||||||
switch(*it++ != '\0')
|
while (*it != '\0')
|
||||||
{
|
{
|
||||||
case '+':
|
switch (*it)
|
||||||
target = &mc->mlock_on;
|
{
|
||||||
break;
|
case '+':
|
||||||
case '-':
|
target = &mc->mlock_on;
|
||||||
target = &mc->mlock_off;
|
break;
|
||||||
break;
|
case '-':
|
||||||
default:
|
target = &mc->mlock_off;
|
||||||
*target |= mode_to_flag(*it);
|
break;
|
||||||
break;
|
default:
|
||||||
|
*target |= mode_to_flag(*it);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
|
|
||||||
mc->mlock_off &= ~mc->mlock_on;
|
mc->mlock_off &= ~mc->mlock_on;
|
||||||
|
|
Loading…
Reference in New Issue