Konflikte gelöst

This commit is contained in:
Akamaru 2016-09-05 16:35:04 +02:00
parent ebd806a1b8
commit 02633e91cb
5 changed files with 9 additions and 85 deletions

View File

@ -1,8 +1,8 @@
#!/bin/sh
# Launch Brawlbot
# Restart Brawlbot five seconds after halted.
# Launch Mikubot
# Restart Mikubot five seconds after halted.
while true; do
lua main.lua
echo 'Miku wurde gestoppt. ^C zum beenden.'
echo 'Mikubot wurde gestoppt. ^C zum beenden.'
sleep 5s
done

View File

@ -23,14 +23,9 @@ local bot = {}
bot.version = '160824'
function bot:init(config) -- The function run when the bot is started or reloaded.
<<<<<<< HEAD:miku/bot.lua
assert(config.bot_api_key, 'Dein Bot-Token ist nicht in der Config gesetzt!')
bindings = require('miku.bindings').init(config.bot_api_key)
utilities = require('miku.utilities')
=======
assert(config.bot_api_key, 'Dein Bot-Token ist nicht in der Config gesetzt!')
bindings = require('otouto.bindings').init(config.bot_api_key)
utilities = require('otouto.utilities')
>>>>>>> upstream/master:otouto/bot.lua
cred_data = load_cred()
-- Fetch bot information. Try until it succeeds.

View File

@ -155,14 +155,10 @@ function banhammer:pre_process(msg, config)
end
else
if not has_been_warned then
<<<<<<< HEAD:miku/plugins/banhammer.lua
utilities.send_reply(msg, "Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann.\nThis is a private bot, which can only be used after an approval.")
=======
utilities.send_reply(msg, config.banhammer_text or [[
Dies ist ein privater Bot, der erst nach einer Freischaltung benutzt werden kann.
This is a private bot, which can only be used after an approval.
]])
>>>>>>> upstream/master:otouto/plugins/banhammer.lua
redis:hset('user:'..user_id, 'has_been_warned', true)
else
print('User has already been warned!')

View File

@ -2,15 +2,9 @@ local cleverbot = {}
function cleverbot:init(config)
cleverbot.triggers = {
<<<<<<< HEAD:miku/plugins/cleverbot.lua
"^/[Cc][Bb][Oo][Tt] (.*)$",
"^[Mm][Ii][Kk][Uu][Bb][Oo][Tt], (.+)$",
"^[Mm][Ii][Kk][Uu], (.+)$"
=======
"^/cbot (.+)$",
"^[Bb]rawlbot, (.+)$",
"^[Bb]ot, (.+)$"
>>>>>>> upstream/master:otouto/plugins/cleverbot.lua
}
cleverbot.url = config.chatter.cleverbot_api
end

View File

@ -1,66 +1,6 @@
<<<<<<< HEAD:miku/plugins/luarun.lua
local luarun = {}
function luarun:init(config)
luarun.triggers = utilities.triggers(self.info.username, config.cmd_pat):t('lua', true):t('return', true).table
if config.luarun_serpent then
serpent = require('serpent')
luarun.serialize = function(t)
return serpent.block(t, {comment=false})
end
else
JSON = require('dkjson')
luarun.serialize = function(t)
return JSON.encode(t, {indent=true})
end
end
end
function luarun:action(msg, config)
if not is_sudo(msg, config) then
return true
end
local input = utilities.input(msg.text)
if not input then
utilities.send_reply(msg, 'Bitte gebe einen Befehl ein.')
return
end
if msg.text_lower:match('^'..config.cmd_pat..'return') then
input = 'return ' .. input
end
local output = loadstring( [[
local bot = require('miku.bot')
local bindings = require('miku.bindings')
local utilities = require('miku.utilities')
local json = require('dkjson')
local URL = require('socket.url')
local http = require('socket.http')
local https = require('ssl.https')
return function (msg, config) ]] .. input .. [[ end
]] )()(msg, config)
if output == nil then
output = 'Ausgeführt!'
else
if type(output) == 'table' then
local s = luarun.serialize(output)
if URL.escape(s):len() < 4000 then
output = s
end
end
output = '```\n' .. tostring(output) .. '\n```'
end
utilities.send_message(msg.chat.id, output, true, msg.message_id, true)
end
=======
local luarun = {}
local luarun = {}
local utilities = require('otouto.utilities')
local utilities = require('miku.utilities')
local URL = require('socket.url')
local JSON, serpent
@ -96,9 +36,9 @@ function luarun:action(msg, config)
end
local output, success =
load("local bot = require('otouto.bot')\n\z
local bindings = require('otouto.bindings')\n\z
local utilities = require('otouto.utilities')\n\z
load("local bot = require('miku.bot')\n\z
local bindings = require('miku.bindings')\n\z
local utilities = require('miku.utilities')\n\z
local json = require('dkjson')\n\z
local URL = require('socket.url')\n\z
local http = require('socket.http')\n\z
@ -130,5 +70,4 @@ function luarun:action(msg, config)
end
>>>>>>> upstream/master:otouto/plugins/luarun.lua
return luarun