This commit is contained in:
topkecleon 2016-08-13 22:43:23 -04:00
parent 43a6b53c90
commit 6fbd718af0
2 changed files with 2 additions and 3 deletions

View File

@ -247,7 +247,7 @@ Additionally, antiflood can be configured to automatically ban a user after he h
| `remind.lua` | /remind <duration> <message> | Reminds a user of something after a duration of minutes. |
| `channel.lua` | /ch <channel> \n <message> | Sends a markdown-enabled message to a channel. |
| `isup.lua` | /isup <url> | Returns the status of a website. |
| `starwars-crawl.lua` | /sw <title | number> | 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. |

View File

@ -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..')')