Created
November 13, 2016 18:37
-
-
Save mlugg/3b42263ca0d2c3e24ab48968850f4875 to your computer and use it in GitHub Desktop.
IRC Library Sample Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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