Skip to content

Instantly share code, notes, and snippets.

@mlugg
Created November 13, 2016 18:37
Show Gist options
  • Save mlugg/3b42263ca0d2c3e24ab48968850f4875 to your computer and use it in GitHub Desktop.
Save mlugg/3b42263ca0d2c3e24ab48968850f4875 to your computer and use it in GitHub Desktop.
IRC Library Sample Code
import IRCClient
client = IRCClient()
client.connect("irc.vktec.co.uk", "Nick", "Username")
@client.eventHandler("chanMsg")
def onChanMsg(sender, message, action):
# Do something
@client.eventHandler("privMsg")
def onPrivMsg(channel, sender, message, action):
# Do something
@client.eventHandler("chanInvite")
def onChanInvite(receiver, channel):
# Do something
# You can also have multiple of each event handler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment