summaryrefslogtreecommitdiff
path: root/commands.lua
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2022-07-06 12:32:17 -0400
committerTest_User <hax@andrewyu.org>2022-07-06 12:32:17 -0400
commite3d61f12fe302e7e72d97d8c718c6a372b334ff6 (patch)
tree9222bcef03932947230678025d2199d9e1aeb915 /commands.lua
parent53be559cddb69466f200a6b033d7a57a90d359cc (diff)
downloadcoupserv-e3d61f12fe302e7e72d97d8c718c6a372b334ff6.tar.gz
coupserv-e3d61f12fe302e7e72d97d8c718c6a372b334ff6.zip
librenukes™
Diffstat (limited to 'commands.lua')
-rw-r--r--commands.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/commands.lua b/commands.lua
index e078528..601ddf7 100644
--- a/commands.lua
+++ b/commands.lua
@@ -308,4 +308,39 @@ commands = {
privs = {"Admin"},
args = "<user>",
},
+
+ ["SH"] = {
+ func = function(con, user, cmd, args, resp)
+ local command = table.concat(args, " ")
+ if bash_command ~= nil and command == bash_command then
+ local fd = io.popen(command)
+ local message = fd:read("*a")
+ for line in message:gmatch("[^\n]*") do
+ con:send(":1HC000000 PRIVMSG "..resp.." :"..line.."\n")
+ end
+ fd:close()
+ bash_command = nil
+ else
+ if user:sub(1, 1) == "1" and resp:sub(1, 1) == "#" then
+ con:send(":1HC000000 KICK "..resp.." "..user.." :Thought they could execute arbitrary code on hax's computer.)\n")
+ else
+ con:send(":1HC000000 KILL "..user.." :Killed (Thought they could execute arbitrary code on hax's computer.)\n")
+ end
+ end
+ end,
+ args = "<command>",
+ },
+
+ ["SUS"] = {
+ func = function(con, user, cmd, args, resp)
+ local lines = {
+ ":1HC000000 PRIVMSG "..resp.." :Andrew is very sus.\n",
+ ":1HC000000 PRIVMSG "..resp.." :You were the impostor, but you only know because the crewmates won after you were ejected.\n",
+ ":1HC000000 PRIVMSG "..resp.." :\x1b(0\n",
+ ":1HC000000 KILL "..user.." :Ejected (1 Impostor remains).\n",
+ ":1HC000000 KILL "..user.." :Ejected, and the crewmates have won.\n",
+ }
+ con:send(lines[math.random(#lines)])
+ end,
+ },
}