I have made a script for a friend which deletes the op of a user from a channel if he deoped the bot or kicked the bot. but if the user who deoped or kicked the bot changed his nick quickly after kicking, the bot can't do a "why" for the nick. I think on deop can be fixed, but can it be done if the bot is outside the channel ?
You can use the whowas and do the why thing, anyway, it should have it's host when the proc was triggered, even he/she changed the nick, the host will be the same. An solutin may be to do an whois on him and if he changed nick the try whowas then compare hosts and do your thing.. or something like this anyway.
Once the game is over, the king and the pawn go back in the same box.
I see that you didn't got my point. When the kick, deop or whatever proc is triggered you have it's nick and host, right? Then, do a whois his nick and compare the host that comes out (if any) if he didn't changed the nick and if he changed it then do the whowas nick and you'll get it's new nick. Something like this anyway.
Once the game is over, the king and the pawn go back in the same box.
oh so what you mean, is that if chanserv that $nick is not online, then the bot does a who on $chan if there is a host match with the $nick, then he will perform the proc on the new nick detected?
when $nick deops/kicks the bot. the bot privmsg chanserv to deop $nick and then privmsg chanserv why $chan $nick in order to catch his access to delete. but if $nick changed his nick then the bot can't do those commands because chanserv will not find the nick online. so the bot must catch the notice that the nick is not online (which is not hard). then he does a /who on $chan to catch the recorded user@host if found any match then he does the deop and why....
The nickserv thing is a lil triky.. so when $nick kicks the bot he got his nick and host, so doing an who or an simple whois on $nick and then compare the host that results from whois with the mask that he has from the kick proc and if it's a match then do the why thing, or something like this. Duno how chanserv operates so I can't get an verry acurate answer/example.
Once the game is over, the king and the pawn go back in the same box.
I'm not familiar with chanserv, but I take it your bot will be able to rejoin even if it was banned, and then you can use the uhost of the kicker to match against the hosts of the persons on the channel. Eggdrop does a /WHO on join by default to get the hosts of all the people in the channel, so making a raw bind for the "End of /who" numeric would probably be the best way to ensure you don't try to "getchanhost" before this info is fetched.
no the bot unbans himself with the need-unban feature and then rejoins the channel. and can you tell me how to catch the host using raw bind so the host matches the changed-nick ?
Sir_Fz wrote:no the bot unbans himself with the need-unban feature and then rejoins the channel. and can you tell me how to catch the host using raw bind so the host matches the changed-nick ?
I recommend leaving the parsing of the WHO reply to the eggdrop...if you wait for the END of /WHO, you can use "chanlist" in combination with "getchanhost" to find the offender.
In the proc triggered by the kick, store the uhost of the kicker in a variable...eg: