# HG changeset patch # User Kim Alvefur # Date 1452380488 -3600 # Node ID 4c0ec9bd5168725b83bea02c1950d3ca8d8b9b04 # Parent 7d5a1fb9bf9ee418a15d4d8d65e92161d28c086f mod_admin_telnet: Remove compat warning about 'console_banner' as a function diff -r 7d5a1fb9bf9e -r 4c0ec9bd5168 plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Sat Jan 09 23:54:19 2016 +0100 +++ b/plugins/mod_admin_telnet.lua Sun Jan 10 00:01:28 2016 +0100 @@ -1125,8 +1125,8 @@ ------------- function printbanner(session) - local option = module:get_option("console_banner"); - if option == nil or option == "full" or option == "graphic" then + local option = module:get_option_string("console_banner", "full"); + if option == "full" or option == "graphic" then session.print [[ ____ \ / _ | _ \ _ __ ___ ___ _-_ __| |_ _ @@ -1137,17 +1137,13 @@ ]] end - if option == nil or option == "short" or option == "full" then + if option == "short" or option == "full" then session.print("Welcome to the Prosody administration console. For a list of commands, type: help"); session.print("You may find more help on using this console in our online documentation at "); session.print("http://prosody.im/doc/console\n"); end - if option and option ~= "short" and option ~= "full" and option ~= "graphic" then - if type(option) == "string" then - session.print(option) - elseif type(option) == "function" then - module:log("warn", "Using functions as value for the console_banner option is no longer supported"); - end + if option ~= "short" and option ~= "full" and option ~= "graphic" then + session.print(option); end end