plugins/commands.lua

changeset 159
7ca948b157df
parent 102
b7c9a3707e68
equal deleted inserted replaced
158:57ee70718ecc 159:7ca948b157df
1 function riddim.plugins.commands(bot) 1 function riddim.plugins.commands(bot)
2 local command_pattern = "^%"..(bot.config.command_prefix or "@").."([%a%-%_%d]+)(%s?)(.*)$"; 2 local command_pattern = "^%"..bot.config.command_prefix.."([%a%-%_%d]+)(%s?)(.*)$";
3 3
4 local direct_address_pattern = false; 4 local direct_address_pattern = false;
5 if bot.config.nick then 5 if bot.config.nick then
6 direct_address_pattern = "^"..bot.config.nick.."[,: ]+([%a%-%_%d]+)(%s?)(.*)"; 6 direct_address_pattern = "^"..bot.config.nick.."[,: ]+([%a%-%_%d]+)(%s?)(.*)";
7 end 7 end

mercurial