Python IRC Client
<pre><code>import socket
from time import strftime

time = strftime("%H:%M:%S")

irc = 'irc.tormented-box.net'
port = 6667
channel = '#test'
sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sck.connect((irc, port))
print sck.recv(4096)
sck.send('NICK supaBOT\r\n')
sck.send('USER supaBOT supaBOT supaBOT :supaBOT Script\r\n')
sck.send('JOIN ' + channel + '\r\n')
while True:
    data = sck.recv(4096)
    if data.find('PING') != -1:
       sck.send('PONG ' + data.split() [1] + '\r\n')
    elif data.find ( 'PRIVMSG' ) != -1:
       nick = data.split ( '!' ) [ 0 ].replace ( ':', '')
       if data.find('!op') != -1:
       sck.send('MODE #test +o ' + nick + '\r\n')
</code></pre>

<p>When I'm trying to !op nick in IRC I end up op'ing myself Instead of giving +o to the other user, I'm not sure what I have to change in the "nick" variable.. I'll appreciate it if someone can help me.. thanks.</p>
