Merge pull request #2 from gholms/mlocktweak-allchr

mlocktweaker: consider all mode characters
This commit is contained in:
William Pitcock 2012-06-17 23:39:36 -07:00
commit 20a31ab093
1 changed files with 14 additions and 10 deletions

View File

@ -47,7 +47,9 @@ static void handle_channel_register(hook_channel_req_t *hdata)
target = &mc->mlock_on;
it = str;
switch(*it++ != '\0')
while (*it != '\0')
{
switch (*it)
{
case '+':
target = &mc->mlock_on;
@ -59,6 +61,8 @@ static void handle_channel_register(hook_channel_req_t *hdata)
*target |= mode_to_flag(*it);
break;
}
++it;
}
mc->mlock_off &= ~mc->mlock_on;
}