diff --git a/README.md b/README.md index f21c149..c759bb6 100644 --- a/README.md +++ b/README.md @@ -247,7 +247,7 @@ Additionally, antiflood can be configured to automatically ban a user after he h | `remind.lua` | /remind | Reminds a user of something after a duration of minutes. | | `channel.lua` | /ch \n | Sends a markdown-enabled message to a channel. | | `isup.lua` | /isup | Returns the status of a website. | -| `starwars-crawl.lua` | /sw | Returns the opening crawl from the specified Star Wars film. | /sw | +| `starwars-crawl.lua` | /sw <title ¦ number> | Returns the opening crawl from the specified Star Wars film. | /sw | | `chuckfact.lua` | /chuck | Returns a fact about Chuck Norris. | /cn | | `catfact.lua` | /catfact | Returns a fact about cats. | diff --git a/otouto/bot.lua b/otouto/bot.lua index 5ea5241..1f851e6 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -55,14 +55,13 @@ function bot:init(config) -- and messages from blacklisted users also go into self.panoptic_plugins. self.plugins = {} self.panoptic_plugins = {} - local t = {} -- Petty pseudo-optimization. for _, pname in ipairs(config.plugins) do local plugin = require('otouto.plugins.'..pname) table.insert(self.plugins, plugin) if plugin.init then plugin.init(self, config) end if plugin.panoptic then table.insert(self.panoptic_plugins, plugin) end if plugin.doc then plugin.doc = '```\n'..plugin.doc..'\n```' end - if not plugin.triggers then plugin.triggers = t end + if not plugin.triggers then plugin.triggers = {} end end print('@' .. self.info.username .. ', AKA ' .. self.info.first_name ..' ('..self.info.id..')')