more bugfixes, yay
This commit is contained in:
parent
6fc5320198
commit
c6f6fe96b8
@ -66,7 +66,7 @@ function administration:init(config)
|
|||||||
|
|
||||||
drua.PORT = config.cli_port or 4567
|
drua.PORT = config.cli_port or 4567
|
||||||
|
|
||||||
administration.init_flags(config.cmd_pat)
|
administration.flags = administration.init_flags(config.cmd_pat)
|
||||||
administration.init_command(self, config)
|
administration.init_command(self, config)
|
||||||
|
|
||||||
administration.doc = '`Returns a list of administrated groups.\nUse '..config.cmd_pat..'ahelp for more administrative commands.`'
|
administration.doc = '`Returns a list of administrated groups.\nUse '..config.cmd_pat..'ahelp for more administrative commands.`'
|
||||||
@ -240,7 +240,7 @@ function administration:get_desc(chat_id, config)
|
|||||||
if modstring ~= '' then
|
if modstring ~= '' then
|
||||||
table.insert(t, '*Moderators:*\n' .. utilities.trim(modstring))
|
table.insert(t, '*Moderators:*\n' .. utilities.trim(modstring))
|
||||||
end
|
end
|
||||||
table.insert(t, 'Run '..config..'ahelp@' .. self.info.username .. ' for a list of commands.')
|
table.insert(t, 'Run '..config.cmd_pat..'ahelp@' .. self.info.username .. ' for a list of commands.')
|
||||||
return table.concat(t, '\n\n')
|
return table.concat(t, '\n\n')
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -282,7 +282,6 @@ function administration.init_command(self_, config)
|
|||||||
|
|
||||||
action = function(self, msg, group, config)
|
action = function(self, msg, group, config)
|
||||||
|
|
||||||
local rank = administration.get_rank(self, msg.from.id, msg.chat.id)
|
|
||||||
local rank = administration.get_rank(self, msg.from.id, msg.chat.id, config)
|
local rank = administration.get_rank(self, msg.from.id, msg.chat.id, config)
|
||||||
local user = {}
|
local user = {}
|
||||||
|
|
||||||
|
@ -19,13 +19,13 @@ Aliases: /g, /google
|
|||||||
|
|
||||||
bing.search_url = 'https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\'%s\'&$format=json'
|
bing.search_url = 'https://api.datamarket.azure.com/Data.ashx/Bing/Search/Web?Query=\'%s\'&$format=json'
|
||||||
|
|
||||||
function bing:init()
|
function bing:init(config)
|
||||||
if not self.config.bing_api_key then
|
if not config.bing_api_key then
|
||||||
print('Missing config value: bing_api_key.')
|
print('Missing config value: bing_api_key.')
|
||||||
print('bing.lua will not be enabled.')
|
print('bing.lua will not be enabled.')
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
bing.triggers = utilities.triggers(self.info.username):t('bing', true):t('g', true):t('google', true).table
|
bing.triggers = utilities.triggers(self.info.username, config.cmd_pat):t('bing', true):t('g', true):t('google', true).table
|
||||||
end
|
end
|
||||||
|
|
||||||
function bing:action(msg)
|
function bing:action(msg)
|
||||||
|
@ -20,8 +20,8 @@ The following markdown syntax is supported:
|
|||||||
Due to the frequent dysfunction and incompletion of the API method used to determine the administrators of a channel, this command may not work for the owners of some channels.
|
Due to the frequent dysfunction and incompletion of the API method used to determine the administrators of a channel, this command may not work for the owners of some channels.
|
||||||
```]]
|
```]]
|
||||||
|
|
||||||
function channel:init()
|
function channel:init(config)
|
||||||
channel.triggers = utilities.triggers(self.info.username):t('ch', true).table
|
channel.triggers = utilities.triggers(self.info.username, config.cmd_pat):t('ch', true).table
|
||||||
end
|
end
|
||||||
|
|
||||||
function channel:action(msg)
|
function channel:action(msg)
|
||||||
|
Reference in New Issue
Block a user