summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2024-08-17 21:05:45 -0400
committerTest_User <hax@andrewyu.org>2024-08-17 21:05:45 -0400
commita1b3a4b3d042c30ce5fd4a973d3b3b58959c328a (patch)
tree6fb31d8c65132acfc8362c24ce626b6bc2907db4
parent400b00e1cd8a1c58175acc0183675508b83d9774 (diff)
downloadpy_coupserv-a1b3a4b3d042c30ce5fd4a973d3b3b58959c328a.tar.gz
py_coupserv-a1b3a4b3d042c30ce5fd4a973d3b3b58959c328a.zip
Old command prefix change, plus a fix because python byte indexingHEADmaster
-rwxr-xr-xCoupServ.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/CoupServ.py b/CoupServ.py
index ac5f71d..9634f06 100755
--- a/CoupServ.py
+++ b/CoupServ.py
@@ -239,11 +239,11 @@ try:
elif command == b"PRIVMSG":
try:
if userlist[source]["opertype"] == b"NetAdmin":
- if (args[0] == config["sid"].encode("UTF-8")+b"000000") or (args[0][0:1] == b"#" and args[1][0:1] == b"-"):
+ if (args[0] == config["sid"].encode("UTF-8")+b"000000") or (args[0][0:1] == b"#" and args[1][0:3] == b"\x0302"):
if args[0][0:1] == b"#":
chan = args[0]
resp = chan
- args[1] = args[1][1:]
+ args[1] = args[1][3:]
else:
resp = source
chan = False
@@ -255,7 +255,7 @@ try:
if len(cmd) == 0:
continue
- elif cmd[0] == b":":
+ elif cmd[0:1] == b":":
send(args[1])
elif cmd == b"get":
if argv[0] == b"uid":