forked from wrxck/mattata
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v26.1] Administration improvements and other minor changes
• Bumped version to 26.1 and made minor configuration changes • Added pagination to the administration keyboard • Added more administrative settings • Fixed a bug in the ban and kick plugins which threw an error when performing an action via reply with a reason given as a command parameter • Fixed the Instagram plugin • Added a new “scramble” plugin, which scrambles a sentence • Updated setlang and setgrouplang for the new pt_br translation • Finalised the docker files etc (thanks to those who committed that!)
- Loading branch information
Showing
39 changed files
with
1,262 additions
and
402 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
configuration.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
FROM debian:stretch-slim | ||
|
||
ENV USR user | ||
ENV HOME /home/$USR | ||
|
||
RUN groupadd -g 1000 -r $USR && \ | ||
useradd -u 1000 -d $HOME -m -r -g $USR $USR | ||
|
||
RUN apt update -y &&\ | ||
apt install -y \ | ||
cowsay\ | ||
coreutils\ | ||
openssl\ | ||
git\ | ||
gcc\ | ||
libreadline-dev\ | ||
libssh-dev\ | ||
fortune\ | ||
fortunes\ | ||
fortune-mod\ | ||
make\ | ||
liblua5.3-dev\ | ||
lua5.3\ | ||
libexpat1-dev\ | ||
libcurl3\ | ||
libcurl3-gnutls\ | ||
libcurl4-openssl-dev\ | ||
luarocks | ||
|
||
RUN luarocks install telegram-bot-lua \ | ||
&& luarocks install dkjson\ | ||
&& luarocks install feedparser\ | ||
&& luarocks install html-entities\ | ||
&& luarocks install lbase64\ | ||
&& luarocks install lpeg\ | ||
&& luarocks install luacrypto\ | ||
&& luarocks install luafilesystem\ | ||
&& luarocks install luaossl\ | ||
&& luarocks install luasec\ | ||
&& luarocks install luasocket\ | ||
&& luarocks install multipart-post\ | ||
&& luarocks install redis-lua\ | ||
&& luarocks install serpent\ | ||
&& luarocks install uuid | ||
|
||
COPY . $HOME | ||
WORKDIR $HOME | ||
|
||
RUN chown -R $USR:$USR . | ||
USER $USR |
Empty file.
Empty file.
Empty file.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
| | | | | | (_| | |_| || (_| | || (_| | | ||
|_| |_| |_|\__,_|\__|\__\__,_|\__\__,_| | ||
Configuration file for mattata v26.0 | ||
Configuration file for mattata v26.1 | ||
Copyright 2017 Matthew Hesketh <[email protected]> | ||
This code is licensed under the MIT. See LICENSE for details. | ||
|
@@ -191,6 +191,7 @@ return { -- Rename this file to configuration.lua for the bot to work! | |
'rules', | ||
'runescape', | ||
'save', | ||
'scramble', | ||
'sed', | ||
'setdescription', | ||
'setgrouplang', | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.2' | ||
|
||
services: | ||
bot: | ||
build: . | ||
command: ["lua5.3", "-e", "require('mattata').run({}, require('configuration'))"] | ||
volumes: | ||
- ./configuration.lua:/home/user/configuration.lua | ||
broker: | ||
image: redis:alpine |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,40 @@ | ||
set -e | ||
printf "This script is intended to work with Debian GNU/Linux 8, other versions may also\n" | ||
printf "work. Root access is required to complete the installation. Press enter to continue,\n" | ||
printf "or press CTRL + C to abort.\n" | ||
read | ||
sudo apt-get update | ||
aptlist="git wget openssl coreutils make gcc libreadline-dev libssl-dev redis-server libssl-dev fortune-mod fortunes cowsay fortune unzip libexpat1-dev libcurl3 libcurl3-gnutls libcurl4-openssl-dev ruby ruby-dev" | ||
for package in $aptlist | ||
do | ||
printf "[Info] Installing $package...\n" | ||
sudo apt-get install $package | ||
done | ||
if [ ! -f "`which lua5.3`" ] | ||
then | ||
printf "[Info] Downloading Lua 5.3.4...\n" | ||
sudo wget -N http://www.lua.org/ftp/lua-5.3.4.tar.gz | ||
printf "[Info] Extracting Lua 5.3.4...\n" | ||
tar zxf lua-5.3.4.tar.gz | ||
cd lua-5.3.4/ | ||
printf "[Info] Building Lua 5.3.4...\n" | ||
sudo make linux test | ||
printf "[Info] Installing Lua 5.3.4...\n" | ||
sudo make install | ||
sudo mv -f /usr/bin/lua /usr/bin/lua5.3 | ||
sudo cp /usr/bin/lua5.3 /usr/local/bin/lua5.3 | ||
sudo mv -f /usr/bin/luac /usr/bin/luac5.3 | ||
sudo cp /usr/bin/luac5.3 /usr/local/bin/luac5.3 | ||
cd ../ | ||
fi | ||
if [ ! -f "`which luarocks-5.3`" ] | ||
then | ||
printf "[Info] Downloading LuaRocks...\n" | ||
sudo git clone https://github.com/keplerproject/luarocks | ||
cd luarocks/ | ||
printf "[Info] Building LuaRocks...\n" | ||
sudo ./configure --lua-version=5.3 --versioned-rocks-dir --lua-suffix=5.3 | ||
sudo make build | ||
printf "[Info] Installing LuaRocks...\n" | ||
sudo make install | ||
cd ../ | ||
fi | ||
sudo apt-get install -y\ | ||
git \ | ||
wget \ | ||
openssl \ | ||
coreutils \ | ||
make \ | ||
gcc \ | ||
libreadline-dev \ | ||
libssl-dev \ | ||
redis-server \ | ||
libssl-dev \ | ||
fortune-mod \ | ||
fortunes \ | ||
cowsay \ | ||
fortune \ | ||
unzip \ | ||
libexpat1-dev \ | ||
libcurl3 \ | ||
libcurl3-gnutls \ | ||
libcurl4-openssl-dev \ | ||
ruby \ | ||
ruby-dev \ | ||
lua5.3 \ | ||
luarocks | ||
printf "[Info] Installing openssl...\n" | ||
sudo luarocks-5.3 install --server=http://luarocks.org/dev openssl | ||
rocklist="luasocket luasec multipart-post lpeg dkjson serpent redis-lua luafilesystem uuid html-entities luaossl feedparser telegram-bot-lua" | ||
rocklist="luasocket luasec multipart-post lpeg dkjson serpent redis-lua luafilesystem uuid html-entities luaossl feedparser telegram-bot-lua lbase64 luacrypto lua-openssl" | ||
for rock in $rocklist | ||
do | ||
printf "[Info] Installing $rock...\n" | ||
sudo luarocks-5.3 install $rock | ||
done | ||
sudo -k | ||
printf "[Info] Installation complete.\n" | ||
sudo -K | ||
printf "[Info] Installation complete.\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,42 @@ | ||
set -e | ||
printf "This script is intended to work with Ubuntu 16.04.2 LTS, other versions may also\n" | ||
printf "work. Root access is required to complete the installation. Press enter to continue,\n" | ||
printf "or press CTRL + C to abort.\n" | ||
read | ||
sudo apt-get update | ||
aptlist="git wget openssl coreutils make gcc libreadline-dev libssl-dev redis-server libssl-dev fortune-mod fortunes cowsay fortune unzip libexpat1-dev libcurl3 libcurl3-gnutls libcurl4-openssl-dev ruby ruby-dev" | ||
for package in $aptlist | ||
do | ||
printf "[Info] Installing $package...\n" | ||
sudo apt-get install $package | ||
done | ||
if [ ! -f "`which lua5.3`" ] | ||
then | ||
printf "[Info] Downloading Lua 5.3.4...\n" | ||
sudo wget -N http://www.lua.org/ftp/lua-5.3.4.tar.gz | ||
printf "[Info] Extracting Lua 5.3.4...\n" | ||
tar zxf lua-5.3.4.tar.gz | ||
cd lua-5.3.4/ | ||
printf "[Info] Building Lua 5.3.4...\n" | ||
sudo make linux test | ||
printf "[Info] Installing Lua 5.3.4...\n" | ||
sudo make install | ||
sudo mv -f /usr/local/bin/lua /usr/bin/lua5.3 | ||
sudo cp /usr/bin/lua5.3 /usr/local/bin/lua5.3 | ||
sudo mv -f /usr/local/bin/luac /usr/bin/luac5.3 | ||
sudo cp /usr/bin/luac5.3 /usr/local/bin/luac5.3 | ||
cd ../ | ||
fi | ||
if [ ! -f "`which luarocks-5.3`" ] | ||
then | ||
printf "[Info] Downloading LuaRocks...\n" | ||
sudo git clone https://github.com/keplerproject/luarocks | ||
cd luarocks/ | ||
printf "[Info] Building LuaRocks...\n" | ||
sudo ./configure --lua-version=5.3 --versioned-rocks-dir --lua-suffix=5.3 | ||
sudo make build | ||
printf "[Info] Installing LuaRocks...\n" | ||
sudo make install | ||
cd ../ | ||
fi | ||
sudo apt-get install -y \ | ||
git \ | ||
wget \ | ||
openssl \ | ||
coreutils \ | ||
make \ | ||
gcc \ | ||
libreadline-dev \ | ||
libssl-dev \ | ||
redis-server \ | ||
libssl-dev \ | ||
fortune-mod \ | ||
fortunes \ | ||
cowsay \ | ||
fortune \ | ||
unzip \ | ||
libexpat1-dev \ | ||
libcurl3 \ | ||
libcurl3-gnutls \ | ||
libcurl4-openssl-dev \ | ||
ruby \ | ||
ruby-dev \ | ||
lua5.3 \ | ||
luarocks | ||
printf "[Info] Installing openssl...\n" | ||
sudo luarocks-5.3 install --server=http://luarocks.org/dev openssl | ||
rocklist="luasocket luasec multipart-post lpeg dkjson serpent redis-lua luafilesystem uuid html-entities luaossl feedparser telegram-bot-lua" | ||
rocklist="luasocket luasec multipart-post lpeg dkjson serpent redis-lua luafilesystem uuid html-entities luaossl feedparser telegram-bot-lua lbase64 luacrypto" | ||
for rock in $rocklist | ||
do | ||
printf "[Info] Installing $rock...\n" | ||
sudo luarocks-5.3 install $rock | ||
done | ||
printf "[Info] Installing redis-dump...\n" | ||
sudo gem install redis-dump | ||
sudo -k | ||
printf "[Info] Installation complete.\n" | ||
sudo -K | ||
printf "[Info] Installation complete.\n" |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.