Skip to content

Instantly share code, notes, and snippets.

@csinchok
Created March 14, 2014 20:47
Show Gist options
  • Select an option

  • Save csinchok/9556506 to your computer and use it in GitHub Desktop.

Select an option

Save csinchok/9556506 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from geventirc import Client, handlers, message
NICK = "uwsgibaught"
HOST = "irc.onion.com"
PORT = 6667
CHANNELS = (u"#💩💨💨",)
PASSWORD = "th3on1on2013"
irc = Client(HOST, NICK, port=PORT)
irc.send_message(message.Pass(PASSWORD))
for channel in CHANNELS:
irc.add_handler(
handlers.JoinHandler(channel)
)
irc.start()
def application(e, sr):
sr('200 OK', [('Content-Type', 'text/html')])
yield "<html><body>Webhook!</body></html>"
irc.send_message(message.PrivMsg(CHANNELS[0], "WEBHOOK Hoooooooooooooooooooo"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment