From c308b7dcb58d778ca2e7dcda5a7fbfaf1b312456 Mon Sep 17 00:00:00 2001 From: Fletcher Boyd Date: Fri, 4 Oct 2013 17:49:02 +0800 Subject: [PATCH 1/4] Rainbow fix --- plugins/utility.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/utility.py b/plugins/utility.py index 7069e2e..ca2c32d 100644 --- a/plugins/utility.py +++ b/plugins/utility.py @@ -134,7 +134,10 @@ def rainbow(inp): out = "" l = len(colors) for i, t in enumerate(inp): - out += col[i % l][1] + t + if t == " ": + out += t + else: + out += col[i % l][1] + t return out @hook.command From d83d82978efa59f7300baa54916b5486215af3fe Mon Sep 17 00:00:00 2001 From: Nathan Blaney Date: Sat, 5 Oct 2013 22:49:52 +1000 Subject: [PATCH 2/4] Added reverse to utility.py --- plugins/utility.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/utility.py b/plugins/utility.py index ca2c32d..8a262bf 100644 --- a/plugins/utility.py +++ b/plugins/utility.py @@ -109,6 +109,13 @@ def length(inp): """length -- gets the length of """ return "The length of that string is {} characters.".format(len(inp)) +# reverse + +@hook.command +def reverse(inp): + """Enter a string and the bot will reverse it and print it out.""" + return "You message %s, I message %s" % (inp, inp[::-1]) + # hashing @hook.command From a42b8513c660c68e52f69f6e8a91350032eea7ff Mon Sep 17 00:00:00 2001 From: Nathan Blaney Date: Sat, 5 Oct 2013 22:59:07 +1000 Subject: [PATCH 3/4] Better English in reverse --- plugins/utility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utility.py b/plugins/utility.py index 8a262bf..ae0e4d1 100644 --- a/plugins/utility.py +++ b/plugins/utility.py @@ -114,7 +114,7 @@ def length(inp): @hook.command def reverse(inp): """Enter a string and the bot will reverse it and print it out.""" - return "You message %s, I message %s" % (inp, inp[::-1]) + return "You say %s, I say %s" % (inp, inp[::-1]) # hashing From 436dfc356c1018ecae71c08f1b2e51a2a869e5d5 Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Sat, 5 Oct 2013 21:11:52 +0800 Subject: [PATCH 4/4] Dammit noodle --- plugins/github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/github.py b/plugins/github.py index 00ee88d..07b8357 100644 --- a/plugins/github.py +++ b/plugins/github.py @@ -50,8 +50,8 @@ def ghissues(inp): return "Repo has no open issues" except ValueError: return "Invalid data returned. Check arguments (.github issues username/repo [number]" - fmt = "Issue: #{} ({}) by {}: {} | {} {}".format(number, state, user.login, title, truncate(body), gitio.gitio(data.url)) - fmt1 = "Issue: #{} ({}) by {}: {} {}".format(number, state, user.login, title, gitio.gitio(data.url)) + fmt = "Issue: #{} ({}) by {}: {} | {} {}" # (number, state, user.login, title, truncate(body), gitio.gitio(data.url)) + fmt1 = "Issue: #{} ({}) by {}: {} {}" # (number, state, user.login, title, gitio.gitio(data.url)) number = data["number"] if data["state"] == "open": state = u"\x033\x02OPEN\x02\x0f"