Whats wrong with this code?

Cliff Crawford cjc26 at nospam.cornell.edu
Sun Aug 26 13:51:54 EDT 2001


* Adonis Vargas <deltapigz at telocity.com> menulis:
| it will connect; and send the data; but i am not receiving anything? it
| did work prior to me tinkering with it; but it is now back to how it
| was; and no cigar?
| 
| [snip]
| pirc.send('NICK %s\r'%pirc_nick)
| pirc.send('USER %s %s %s :%s\r'%(pirc_user, socket.gethostname(),
| pirc_serv, pirc_name))

You're connecting to an IRC server, right?  I think the lines need to be
terminated with \r\n, not just \r.  Try changing the above two lines to:

pirc.send('NICK %s\r\n' % pirc_nick)
pirc.send('USER %s %s %s :%s\r\n' % (pirc_user, socket.gethostname(),
pirc_serv, pirc_name))


-- 
Cliff Crawford    ::    http://www.sowrong.org/
"Sheila can keep the balloons away."  -- Thomas



More information about the Python-list mailing list