Created
July 9, 2020 09:14
-
-
Save sshnaidm/a65c9085ffa214dcef931fe2db9a59ca to your computer and use it in GitHub Desktop.
irc_message
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
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