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 |