Skip to content

Commit

Permalink
[v26.1] Administration improvements and other minor changes
Browse files Browse the repository at this point in the history
• 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
wrxck committed Sep 9, 2017
1 parent e118ef0 commit 5c5be4b
Show file tree
Hide file tree
Showing 39 changed files with 1,262 additions and 402 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
configuration.lua
50 changes: 50 additions & 0 deletions Dockerfile
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 modified LICENSE
100644 → 100755
Empty file.
Empty file modified OAuth.lua
100644 → 100755
Empty file.
Empty file modified OAuth/coreLuaNode.lua
100644 → 100755
Empty file.
Empty file modified OAuth/coreLuaSocket.lua
100644 → 100755
Empty file.
Empty file modified OAuth/helpers.lua
100644 → 100755
Empty file.
Empty file modified OAuth2.lua
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified assets/contribute.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/plugins.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/setup.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion configuration.example.lua
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -191,6 +191,7 @@ return { -- Rename this file to configuration.lua for the bot to work!
'rules',
'runescape',
'save',
'scramble',
'sed',
'setdescription',
'setgrouplang',
Expand Down
Empty file modified credits.txt
100644 → 100755
Empty file.
10 changes: 10 additions & 0 deletions docker-compose.yml
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 modified godwords.txt
100644 → 100755
Empty file.
66 changes: 28 additions & 38 deletions install/install-debian.sh
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"
4 changes: 2 additions & 2 deletions install/install-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ then
fi
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
sudo -k
printf "[Info] Installation complete.\n"
printf "[Info] Installation complete.\n"
66 changes: 28 additions & 38 deletions install/install-ubuntu.sh
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 modified languages/de_at.lua
100644 → 100755
Empty file.
Empty file modified languages/de_de.lua
100644 → 100755
Empty file.
Empty file modified languages/en_gb.lua
100644 → 100755
Empty file.
Empty file modified languages/en_us.lua
100644 → 100755
Empty file.
Empty file modified languages/pl_pl.lua
100644 → 100755
Empty file.
Loading

0 comments on commit 5c5be4b

Please sign in to comment.