Avoid double-printing with setup and init_ui

unstable
Tod Beardsley 2014-06-10 13:56:19 -05:00
parent 5218ca4d89
commit b379dc014a
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
1 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ module Msf::Module::Deprecated
def init_ui(input = nil, output = nil) def init_ui(input = nil, output = nil)
super(input, output) super(input, output)
print_deprecation_warning print_deprecation_warning
@you_have_been_warned = true
end end
def generate def generate
@ -81,7 +82,7 @@ module Msf::Module::Deprecated
end end
def setup def setup
print_deprecation_warning print_deprecation_warning unless @you_have_been_warned
super super
end end