From 4bc72ba10fa1b57ed0e7aedb64336f24a9283dae Mon Sep 17 00:00:00 2001 From: crabman77 Date: Tue, 21 Feb 2017 00:43:46 +0100 Subject: [PATCH] fix default command prefix is nil if no set, fix bad format --- irc/botcmds.lua | 2 +- irc/config.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/irc/botcmds.lua b/irc/botcmds.lua index ea13633..8ba4c6b 100644 --- a/irc/botcmds.lua +++ b/irc/botcmds.lua @@ -83,7 +83,7 @@ irc:register_bot_command("help", { return false, "Unknown command '"..args.."'." end - return true, ("Usage: %c%s %s -- %s"):format( + return true, ("Usage: %s%s %s -- %s"):format( irc.config.command_prefix, args, cmd.params or "", diff --git a/irc/config.lua b/irc/config.lua index d5806d5..83dc09a 100644 --- a/irc/config.lua +++ b/irc/config.lua @@ -40,7 +40,7 @@ setting("bool", "send_join_part", true) -- Whether to send player join and par setting("string", "password") -- Server password setting("bool", "secure", false) -- Enable a TLS connection, requires LuaSEC setting("number", "timeout", 60) -- Underlying socket timeout in seconds. -setting("string", "command_prefix") -- Prefix to use for bot commands +setting("string", "command_prefix", "/") -- Prefix to use for bot commands setting("bool", "debug", false) -- Enable debug output setting("bool", "enable_player_part", true) -- Whether to enable players joining and parting the channel setting("bool", "auto_join", true) -- Whether to automatically show players in the channel when they join