January 9th, 2005, 06:09 PM
Check This Code
Can anyone tell me if there is anything wrong with this code?
# Quick Flood
from datetime import date
username = "Yegg"
password = "********"
port = 6112
server = "useast.battle.net"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.send(chr(3) + chr(4) + username + '\r\n' + password + '\r\n')
s.send('test' + '\r\n')
This code connects to battle.net as a chat client, it connects fine. My problem is that s.send('test' + '\r\n') isn't sending text to battle.net. I KNOW that this is the correct code to send messages because it's worked before. Is there something else that I'm missing?
UPDATE: I figured out what the problem was.