Skip to content

Instantly share code, notes, and snippets.

@sshnaidm
Created July 9, 2020 09:14
Show Gist options
  • Save sshnaidm/a65c9085ffa214dcef931fe2db9a59ca to your computer and use it in GitHub Desktop.
Save sshnaidm/a65c9085ffa214dcef931fe2db9a59ca to your computer and use it in GitHub Desktop.
irc_message
class IrcClient(SimpleIRCClient):
def __init__(self, nick):
self.nick = nick
self.loading = False
SimpleIRCClient.__init__(self)
def on_welcome(self, c, e):
c.join("#nicetests")
def on_join(self, c, e):
while True:
c.privmsg('#nicetests', 'test from me, dude!')
time.sleep(2)
c.disconnect()
client = IrcClient("somenick")
client.connect("chat.freenode.org", 6667, "somenick", "somepassword")
client.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment