forked from Firepup650/FireBot
Fix issue with #main on join
This commit is contained in:
parent
fcbce622bf
commit
b243fb63ab
1 changed files with 2 additions and 3 deletions
|
@ -61,8 +61,7 @@ server = ""
|
||||||
|
|
||||||
def log(message: str, origin: str = "serv", time: dt = dt.now(), level: str = "LOG") -> None:
|
def log(message: str, origin: str = "serv", time: dt = dt.now(), level: str = "LOG") -> None:
|
||||||
if origin == "serv":
|
if origin == "serv":
|
||||||
global server
|
origin = args[1]
|
||||||
origin = server
|
|
||||||
print(f"[{level}][{origin}][{time}] {message}")
|
print(f"[{level}][{origin}][{time}] {message}")
|
||||||
|
|
||||||
def exit(message: object) -> None:
|
def exit(message: object) -> None:
|
||||||
|
@ -234,7 +233,7 @@ def joinchan(chan: str, origin: str, chanList: dict, lock: bool = True):
|
||||||
for subchan in chans:
|
for subchan in chans:
|
||||||
chanList = joinchan(subchan, origin, chanList)
|
chanList = joinchan(subchan, origin, chanList)
|
||||||
return chanList
|
return chanList
|
||||||
if chan.startswith("0") or chan == "#main":
|
if chan.startswith("0") or (chan == "#main" and lock):
|
||||||
if origin != "null":
|
if origin != "null":
|
||||||
sendmsg("Refusing to join channel 0", origin)
|
sendmsg("Refusing to join channel 0", origin)
|
||||||
return chanList
|
return chanList
|
||||||
|
|
Loading…
Reference in a new issue