Can anyone tell me if there is anything wrong with this code?
Code:
# Quick Flood
import time
import string
import socket
import array
import struct
from datetime import date
import sys
username = "Yegg"
password = "********"
port = 6112
server = "useast.battle.net"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((server, port))
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.