Avoid spamming #firemc #6
2 changed files with 2 additions and 7 deletions
2
bot.py
2
bot.py
|
@ -270,7 +270,7 @@ class bot(bare.bot):
|
||||||
tdict = {}
|
tdict = {}
|
||||||
for thread in self.threads:
|
for thread in self.threads:
|
||||||
tdict[thread] = timers.data[thread]
|
tdict[thread] = timers.data[thread]
|
||||||
if thread in ["radio"]:
|
if tdict[thread]["passInstance"]:
|
||||||
Firepup650 marked this conversation as resolved
Outdated
9pfs marked this conversation as resolved
Outdated
Firepup650
commented
This needs to be indented another layer This needs to be indented another layer
9pfs marked this conversation as resolved
Outdated
Firepup650
commented
We CANNOT use a tab here, this will crash the bot. It absolutely must be 4 spaces. We CANNOT use a tab here, this will crash the bot. It absolutely must be 4 spaces.
9pfs
commented
Uh, what? I thought that WAS 4 spaces! Uh, what? I thought that WAS 4 spaces!
|
|||||||
tdict[thread]["args"] = [self]
|
tdict[thread]["args"] = [self]
|
||||||
tMgr = Thread(target=timers.threadManager, args=(tdict,))
|
tMgr = Thread(target=timers.threadManager, args=(tdict,))
|
||||||
tMgr.daemon = True
|
tMgr.daemon = True
|
||||||
|
|
|
@ -112,11 +112,6 @@ def radio(instance: bare.bot) -> NoReturn:
|
||||||
instance.log("Thread while loop broken", "FATAL")
|
instance.log("Thread while loop broken", "FATAL")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
def mcDown(instance: bare.bot) -> None:
|
|
||||||
instance.sendraw("TOPIC #firemc :FireMC Relay channel (offline)")
|
|
||||||
|
|
||||||
|
|
||||||
data: dict[str, dict[str, Any]] = {
|
data: dict[str, dict[str, Any]] = {
|
||||||
"radio": {"noWrap": True, "func": radio, "args": []},
|
"radio": {"noWrap": True, "func": radio, "args": []}
|
||||||
Firepup650 marked this conversation as resolved
Outdated
Firepup650
commented
`radio` needs to use `"passInstance": True`, not `"args": []`
|
|||||||
"mc-down": {"noWrap": False, "func": mcDown, "args": [], "interval": 60, "ignoreErrors": True}
|
|
||||||
Firepup650 marked this conversation as resolved
Outdated
Firepup650
commented
related to my other commit, this needs to use the new related to my other commit, this needs to use the new `passInstance` param.
|
|||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue
Critical change, needs to be un-reverted