diff --git a/tracer.py b/tracer.py index 7e1372a..4462005 100755 --- a/tracer.py +++ b/tracer.py @@ -71,9 +71,7 @@ def shuffle(col): if "origin" in [a, b]: print("origin discard") return col - temp = col[a] - col[a] = col[b] - col[b] = temp + col[a], col[b] = col[b], col[a] return col @@ -130,7 +128,7 @@ def think(chan, nick, msg): send(chan, res[0:475]) elif words[0] == "!!source": send(chan, "https://tildegit.org/ben/tracer") - elif words[0] == "!botlist": + elif words[0] == "!botlist" or words[0] == "!!help": send( chan, "helo i'm a tracery bot that makes cool things from tracery grammars in your ~/.tracery. see http://tracery.io for more info", @@ -165,6 +163,7 @@ if __name__ == "__main__": if "001" in ircmsg: for c in channels: rawsend(f"JOIN {c}") + rawsend(f"MODE {botnick} +B") m = re.match( ":(?P[^ ]+)!.*PRIVMSG #(?P\w+) :(?P.*)", ircmsg