irclibs/Python/main.py
Your Name 66599bc6bd fix
2023-11-02 19:17:12 +03:00

29 lines
401 B
Python

#!/usr/bin/python3
import sys
import time
from irc import IRC
def main():
main = IRC("#mainchannel", "cp1251")
main.connect(("irc..ru", 6667), "tester")
while True:
data = main.recv(512)
if data is None:
continue
main.parser(data)
print(main.sender)
print(main.data)
if __name__ == "__main__":
while True:
try:
main()
except KeyboardInterrupt:
break
except:
pass