fix crash
This commit is contained in:
parent
9a858e9a29
commit
d6e684ad10
|
@ -35,10 +35,9 @@ def think(line):
|
|||
chan = line.params.pop(0)
|
||||
words = line.params[0].split(" ")
|
||||
|
||||
if len(words) > 0 and line.hostmask.nickname != botnick:
|
||||
if len(words) > 0 and line.hostmask.nickname != config["botnick"]:
|
||||
if words[0] == "!toot":
|
||||
status = emoji.emojize(" ".join(words[1:]), use_aliases=True)
|
||||
print(f"{status} posted by {nick}")
|
||||
if chan == "#team":
|
||||
res = tildeteam.toot(status)
|
||||
else:
|
||||
|
@ -64,7 +63,6 @@ if os.path.isfile(os.path.join(path, "account.json")):
|
|||
with open(os.path.join(path, "account.json"), "r") as f:
|
||||
account = json.load(f)
|
||||
|
||||
botnick = config["botnick"]
|
||||
channels = config["channels"]
|
||||
if len(sys.argv) > 1:
|
||||
for c in sys.argv[1:]:
|
||||
|
@ -100,7 +98,7 @@ if __name__ == "__main__":
|
|||
_send(irctokens.format("PONG", line.params))
|
||||
|
||||
elif line.command == "001":
|
||||
_send(irctokens.format("MODE", [botnick, "+B"]))
|
||||
_send(irctokens.format("MODE", [config["botnick"], "+B"]))
|
||||
if account is not None:
|
||||
_send(
|
||||
irctokens.format(
|
||||
|
|
Loading…
Reference in New Issue