aboutsummaryrefslogtreecommitdiffstats
path: root/plugin.py
diff options
context:
space:
mode:
authorkongr45gpen <kongr45gpen@helit.org>2013-07-24 17:08:04 +0300
committerkongr45gpen <kongr45gpen@helit.org>2013-07-24 17:08:04 +0300
commit98866dade600f540b2d252446e549704c0c29993 (patch)
treec5c1433ffb1ac661cd5e21a6216eaf9d0dfb7a67 /plugin.py
parent5985e7d62910629ca8cf4528c555c97de56f78ae (diff)
downloadsupybot_github-98866dade600f540b2d252446e549704c0c29993.tar.gz
supybot_github-98866dade600f540b2d252446e549704c0c29993.tar.bz2
supybot_github-98866dade600f540b2d252446e549704c0c29993.zip
Perform a little clean-up
Diffstat (limited to 'plugin.py')
-rw-r--r--plugin.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugin.py b/plugin.py
index f8081ba..b3d0bda 100644
--- a/plugin.py
+++ b/plugin.py
@@ -32,6 +32,7 @@ import threading
import BaseHTTPServer
import supybot.utils as utils
+import supybot.world as world
from supybot.commands import *
import supybot.plugins as plugins
import supybot.ircmsgs as ircmsgs
@@ -56,8 +57,9 @@ class GithubHandler(BaseHTTPServer.BaseHTTPRequestHandler):
s.wfile.write('</body></html>')
s.wfile.write(vars(s))
# print json.dumps(data, sort_keys=True, indent=4, separators=(',', ': '))
- msg = ircmsgs.privmsg("#main", "Someone committed something, check it out")
- s.server.irc.queueMsg(msg)
+ for irc in world.ircs:
+ msg = ircmsgs.privmsg("#main", "Someone committed something, check it out")
+ irc.queueMsg(msg)
class Github(callbacks.Plugin):
@@ -81,8 +83,7 @@ class Github(callbacks.Plugin):
self.rng.seed() # automatically seeds with current time
server_class = BaseHTTPServer.HTTPServer
self.httpd = server_class(('', 8093), GithubHandler)
- self.httpd.irc = irc
- t = threading.Thread(target=self.ServerStart, args=(self.httpd, irc))
+ t = threading.Thread(target=self.ServerStart, args=(self.httpd))
t.daemon = False
t.start()
@@ -108,3 +109,4 @@ class Github(callbacks.Plugin):
Class = Github
+# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

© 2014-2024 Faster IT GmbH | imprint | privacy policy