From 41dc6bfab38cabc2e2aa6ec5c78f878fafa0d108 Mon Sep 17 00:00:00 2001 From: Test_User Date: Mon, 17 Jun 2024 18:40:14 -0400 Subject: Lua CoupServ improvements --- network.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'network.lua') diff --git a/network.lua b/network.lua index 84cb712..bd988eb 100644 --- a/network.lua +++ b/network.lua @@ -157,6 +157,12 @@ message_handler = { end end, + ["SQUIT"] = function(con, sourge, args, original) + if juped_list and juped_list[args[1]] then + con:send(":"..config.sid.." SERVER "..servlist[args[1]].address.." * 0 "..args[1].." :Juped.\n") + end + end, + ["METADATA"] = function(con, source, args, original) if args[1] == "*" then if servlist[source] then @@ -239,10 +245,10 @@ message_handler = { print(("%q"):format(userlist[source].nick.." executed command: "..cmd)) return commands[cmd].func(con, source, cmd, cmd_args, resp) else - con:send(":1HC000000 NOTICE "..resp.." :You are not authorized to execute that command.\n") + con:send(":"..config.sid.."000000 NOTICE "..resp.." :You are not authorized to execute that command.\n") end else - con:send(":1HC000000 NOTICE "..resp.." :Unknown command: "..cmd.."\n") + con:send(":"..config.sid.."000000 NOTICE "..resp.." :Unknown command: "..cmd.."\n") end end, @@ -271,7 +277,7 @@ message_handler = { end, ["KILL"] = function(con, source, args, original) - if args[1]:sub(1,3) ~= "1HC" then + if args[1]:sub(1,3) ~= config.sid then print("Kill remote", original) userlist[source] = nil for name, chan in pairs(chanlist) do @@ -296,7 +302,7 @@ message_handler = { end, ["KICK"] = function(con, soure, args, original) - if args[2]:sub(1,3) == "1HC" then + if args[2]:sub(1,3) == config.sid then con:send(":"..args[2].." JOIN "..args[1].."\n") con:send("MODE "..args[1].." +o "..args[2].."\n") else -- cgit v1.2.3