1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
import socket
import time
host= "ragount-city.org"
port= 6667
channel = "#brianna"
co = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
co.connect((host, port))
co.send('NICK micko\r\n')
co.send('USER jack_the_dought resident-evil.org resident-evil.org jack_the_dought\r\n')
time.sleep(10)
print("done")
co.send('JOIN ' + channel + '\r\n')
print("done join")
time.sleep(10)
co.send('NOTICE mickasa :salut')
time.sleep(15)
answer = co.recv(4096)
print("voici answer: " + answer)
time.sleep(15)
co.send("PRIVMSG mickasa : Hello")
time.sleep(15)
answer = co.recv(4096)
print("voici answer 2 0 : " + answer)
print("end")
time.sleep(5)
co.close() |
Partager