summaryrefslogtreecommitdiff
path: root/CoupServ.lua
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2024-06-17 18:40:14 -0400
committerTest_User <hax@andrewyu.org>2024-06-17 18:40:14 -0400
commit41dc6bfab38cabc2e2aa6ec5c78f878fafa0d108 (patch)
treec8d9533f1e5ddd0f8976924f64fa227cfc19b739 /CoupServ.lua
parentec8b1682e86535333c34966f6aafee349e609641 (diff)
downloadlua_coupserv-41dc6bfab38cabc2e2aa6ec5c78f878fafa0d108.tar.gz
lua_coupserv-41dc6bfab38cabc2e2aa6ec5c78f878fafa0d108.zip
Lua CoupServ improvements
Diffstat (limited to 'CoupServ.lua')
-rwxr-xr-xCoupServ.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/CoupServ.lua b/CoupServ.lua
index 20ee42e..71b3408 100755
--- a/CoupServ.lua
+++ b/CoupServ.lua
@@ -48,7 +48,7 @@ function has_permission(user, privs)
privs = privs or {}
for _, v in pairs(privs) do
if v == "Admin" then
- if user.opertype ~= "Admin" then
+ if user.opertype ~= config.opertypes.admin then
return false
end
elseif v == "Owner" then -- not dealing with this yet, so just always return false for now
@@ -79,7 +79,7 @@ while true do
::continue::
local s = socket.tcp4()
- s:connect("irc.andrewyu.org", 7005)
+ s:connect(config.address, config.port)
local con = ssl.wrap(s, {mode = "client", protocol = "tlsv1_3"})
if not con:dohandshake() then
@@ -90,13 +90,13 @@ while true do
local time = tostring(os.time())
- con:send("SERVER hax.irc.andrewyu.org "..config.send_password.." 0 1HC :HaxServ\n")
+ con:send("SERVER lua.hax.irc.andrewyu.org "..config.send_password.." 0 "..config.sid.." :HaxServ\n")
con:send("BURST "..time.."\n")
- con:send("UID 1HC000000 "..time.." "..config.nick.." "..config.hostmask.." "..config.hostmask.." HaxServ 192.168.1.1 "..time.." +k :HaxServ\n")
- con:send(":1HC000000 OPERTYPE Admin\n")
+ con:send("UID "..config.sid.."000000 "..time.." "..config.nick.." "..config.hostmask.." "..config.hostmask.." HaxServ 192.168.1.1 "..time.." +k :HaxServ\n")
+ con:send(":"..config.sid.."000000 OPERTYPE NetAdmin\n")
- userlist["1HC000000"] = {
- server = "1HC",
+ userlist[config.sid.."000000"] = {
+ server = config.sid,
nick_ts = time,
nick = config.nick,
hostname = config.hostmask,
@@ -113,8 +113,8 @@ while true do
}
for channel, _ in pairs(config.channels) do
- con:send("FJOIN "..channel.." "..time.." + :,1HC000000\n")
- con:send("MODE "..channel.." +o 1HC000000\n")
+ con:send("FJOIN "..channel.." "..time.." + :,"..config.sid.."000000\n")
+ con:send("MODE "..channel.." +o "..config.sid.."000000\n")
end
con:send("ENDBURST\n")