(comtch): Parameter god permitted execution of any command, even when
com->c_permit disagreed. Doesn't make sense and is inconsistent with output of list. Remove parameter. The only command affected is break.
This commit is contained in:
parent
0b037fc23c
commit
8329b8884a
4 changed files with 5 additions and 7 deletions
|
@ -46,8 +46,7 @@
|
|||
* Ignore commands that require more permissions than COMSTAT.
|
||||
*/
|
||||
int
|
||||
comtch(register s_char *command, struct cmndstr *coms, int comstat,
|
||||
int god)
|
||||
comtch(register s_char *command, struct cmndstr *coms, int comstat)
|
||||
{
|
||||
register struct cmndstr *com;
|
||||
register int status;
|
||||
|
@ -56,7 +55,7 @@ comtch(register s_char *command, struct cmndstr *coms, int comstat,
|
|||
return M_IGNORE;
|
||||
status = M_NOTFOUND;
|
||||
for (com = coms; com->c_form != 0; com++) {
|
||||
if ((com->c_permit & comstat) != com->c_permit && !god)
|
||||
if ((com->c_permit & comstat) != com->c_permit)
|
||||
continue;
|
||||
switch (mineq(command, com->c_form)) {
|
||||
case ME_MISMATCH:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue