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" diff --git a/plugins/utility.py b/plugins/utility.py index 7069e2e..ae0e4d1 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 say %s, I say %s" % (inp, inp[::-1]) + # hashing @hook.command @@ -134,7 +141,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