I'm in the middle of writing an IRC bot in python. One of my requirements is that it uses the IRC Notice command to send a message to another bot. This is what is in my code where I'm having trouble.
s.send("PONG %s\r\n" % line[1])
#Reply with Pong to Ping
#Set essential features
s.send("PRIVMSG %s\r\n" % "NickServ, IDENTIFY mypassword")
s.send("PRIVMSG %s\r\n" % "NickServ, set autoop on")
s.send("NOTICE %s\r\n" % "bot,!hi")
Everything is indented because it is part of a while loop that checks for a Ping request, replies with pong, and then continues doing what it needs to. Everything works up the notice part. Is my syntax wrong? Should I be doing this another way? Any suggestions? I want to do this without any IRC modules, so please don't suggest that.

New Topic/Question
Reply



MultiQuote




|