diff options
author | kongr45gpen <electrovesta@gmail.com> | 2014-04-27 21:52:48 +0300 |
---|---|---|
committer | kongr45gpen <electrovesta@gmail.com> | 2014-04-27 21:55:52 +0300 |
commit | f77b81fb4b8da3e014959ef72cc20d3c64479a4e (patch) | |
tree | 0709ef6720252f44ae1f78fc0a7ff96da2e3ff12 /local | |
parent | b83a3d8f35937c128fa3c6076ca04721e313822e (diff) | |
download | supybot_github-f77b81fb4b8da3e014959ef72cc20d3c64479a4e.tar.gz supybot_github-f77b81fb4b8da3e014959ef72cc20d3c64479a4e.tar.bz2 supybot_github-f77b81fb4b8da3e014959ef72cc20d3c64479a4e.zip |
Minor refactoring
Diffstat (limited to 'local')
-rw-r--r-- | local/handler/GithubHandler.py | 5 | ||||
-rw-r--r-- | local/utility.py | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/local/handler/GithubHandler.py b/local/handler/GithubHandler.py index db0d3d5..c5510c8 100644 --- a/local/handler/GithubHandler.py +++ b/local/handler/GithubHandler.py @@ -9,6 +9,7 @@ import threading import BaseHTTPServer from time import strftime +import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world @@ -40,7 +41,6 @@ class GithubHandler(BaseHTTPServer.BaseHTTPRequestHandler): s.end_headers() s.wfile.write('<!DOCTYPE html><html><head><title>Hello</title></head>') s.wfile.write("<body><p>Thanks, you're awesome.</p>") - s.wfile.write('</body></html>\n') s.wfile.write(s.path.split('/')) @@ -106,3 +106,6 @@ class GithubHandler(BaseHTTPServer.BaseHTTPRequestHandler): #msgs.append( ircmsgs.privmsg("#main", "%s" % ()) ) for msg in msgs: irc.queueMsg(msg) + + def log_message(self, format, *args): + log.info(format % args) diff --git a/local/utility.py b/local/utility.py index 4fba906..7c66d9e 100644 --- a/local/utility.py +++ b/local/utility.py @@ -61,3 +61,7 @@ def getShortURL(longurl): response = urllib2.urlopen(req) url = response.info().getheader('Location') return ircutils.mircColor(url, "purple") + +# Possible colours: +# white, black, (light/dark) blue, (light) green, red, brown, purple, +# orange, yellow, teal, pink, light/dark gray/grey |