diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-10 00:01:28 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-10 00:01:28 +0100 |
commit | 6876deedcd6fb44398ae198f1dc2d8c456fc275c (patch) | |
tree | 937e6b27ec4275b26600eb0a3746b3dd52f4225f | |
parent | de6d620539e9c011ed344c5847da161d52ec5622 (diff) | |
download | prosody-6876deedcd6fb44398ae198f1dc2d8c456fc275c.tar.gz prosody-6876deedcd6fb44398ae198f1dc2d8c456fc275c.zip |
mod_admin_telnet: Remove compat warning about 'console_banner' as a function
-rw-r--r-- | plugins/mod_admin_telnet.lua | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index b77a1f56..e4dcf080 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -1125,8 +1125,8 @@ end ------------- 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 @@ function printbanner(session) ]] 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 |