Few small tweaks and fixes

This commit is contained in:
Luke Rogers 2014-02-26 22:22:10 +13:00
parent 8b1de13c8e
commit 2028075d2f
2 changed files with 7 additions and 7 deletions

View File

@ -200,11 +200,11 @@ def say(inp, conn=None, chan=None):
the command was used in."""
inp = inp.split(" ")
if inp[0][0] == "#":
message = " ".join(inp[1:])
out = "PRIVMSG {} :{}".format(inp[0], message)
message = u" ".join(inp[1:])
out = u"PRIVMSG {} :{}".format(inp[0], message)
else:
message = " ".join(inp[0:])
out = "PRIVMSG {} :{}".format(chan, message)
message = u" ".join(inp[0:])
out = u"PRIVMSG {} :{}".format(chan, message)
conn.send(out)
@ -220,11 +220,11 @@ def me(inp, conn=None, chan=None):
for x in inp[1:]:
message = message + x + " "
message = message[:-1]
out = "PRIVMSG {} :\x01ACTION {}\x01".format(inp[0], message)
out = u"PRIVMSG {} :\x01ACTION {}\x01".format(inp[0], message)
else:
message = ""
for x in inp[0:]:
message = message + x + " "
message = message[:-1]
out = "PRIVMSG {} :\x01ACTION {}\x01".format(chan, message)
out = u"PRIVMSG {} :\x01ACTION {}\x01".format(chan, message)
conn.send(out)

View File

@ -34,7 +34,7 @@ def version(inp, bot=None):
in_sync = False
# output
return "Local {} is at commit {}, remote {} is at commit {}." \
return "Local \x02{}\x02 is at commit \x02{}\x02, remote \x02{}\x02 is at commit \x02{}\x02." \
" You {} running the latest version.".format(head, current_commit.name_rev[:7],
origin_head, remote_commit.name_rev[:7],
"are" if in_sync else "are not")