diff options
Diffstat (limited to '')
-rw-r--r-- | commands.lua | 35 |
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, + }, } |