Use common code to delete non-applicable cmds.
parent
e21ae88b55
commit
ef1145c6b7
|
@ -35,17 +35,7 @@ module Rex
|
||||||
'listen' => [ 'audio_mic_start' ]
|
'listen' => [ 'audio_mic_start' ]
|
||||||
}
|
}
|
||||||
|
|
||||||
all.delete_if do |cmd, _desc|
|
filter_commands(all, reqs)
|
||||||
del = false
|
|
||||||
reqs[cmd].each do |req|
|
|
||||||
next if client.commands.include? req
|
|
||||||
del = true
|
|
||||||
break
|
|
||||||
end
|
|
||||||
del
|
|
||||||
end
|
|
||||||
|
|
||||||
all
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue