Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- """
- Docstring + License Here
- """
- import irc
- import threading
- def ircRth(x):
- for line in x.read_lines():
- if line.nick is None:
- line.nick = ""
- if line.trail is None:
- line.trail = ""
- print(line.nick + ": " + line.trail)
- def main():
- CHANNEL = "#OREServerChat"
- NICK = "t569-qtest"
- x = irc.client()
- x.printing = False
- x.connect("irc.freenode.net", "tyler", "nightingale.vms.pw", "Tyler")
- x.nick(NICK)
- x.join(CHANNEL)
- t = threading.Thread(target=ircRth, args=(x,))
- t.start()
- while True:
- inp = input()
- x.privmsg(CHANNEL, inp)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement