diff options
author | Ben Harris <ben@tilde.team> | 2020-03-13 10:07:31 -0400 |
---|---|---|
committer | Ben Harris <ben@tilde.team> | 2020-03-13 10:07:31 -0400 |
commit | d6e684ad10348e5e16ce4850a20711d14e3cd739 (patch) | |
tree | fa0030e89636b45a61e9712ff9beb998aaebec80 /tooter.py | |
parent | 9a858e9a296e4ce94d7a797488ad6579f4eeca69 (diff) |
fix crash
Diffstat (limited to 'tooter.py')
-rw-r--r-- | tooter.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tooter.py b/tooter.py index 6dbe28b..2910435 100644 --- a/tooter.py +++ b/tooter.py @@ -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( |