irclibs/Python/main.py

29 lines
401 B
Python
Raw Normal View History

2023-11-02 16:17:12 +00:00
#!/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