I’ve been working on this irc bot, just seeing if I could recreate some basic features that ChanServ or any other bot could give, I tried making this little thing but it’s only limited to one nick:
if '@wikia/Example JOIN #channel' in line:
print 'Giving op status to @wikia/Example'
self.s.send('MODE #channel Example +o\n')
It only works if @wikia/Example joins #channel with the nick Example at start, but say @wikia/Example joins #channel with the nick Example_rules, then it wouldn’t work since I get the error, the nick “Example” doesn’t exist. How would it be possible for @wikia/Example to be +o, no matter what the nick is?
Here is what a line looks like
:Nickname!~login@wikia/Example PRIVMSG #channel :This is a message.
You should give +o to the nick that joined and not to hardcoded nick.
Change:
Change “Example” with the variable that holds the joined nick and the problem will be solved.
also IRC is an old protocol, and it demands \r\n.