This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

detecting the bot has been banned

Old posts that have not been replied to for several years.
Locked
m
matt2kjones
Voice
Posts: 24
Joined: Fri Feb 07, 2003 11:16 am

detecting the bot has been banned

Post by matt2kjones »

how do you detect the bot has been banned with tcl

yesterday i wrote a script which prevents a channel take over by an untrusty op

the bot authenticates with the irc server when it connects and becomes an oper, it then op's itself

anyone who sets any modes it doesn't like will get banned and kicked, and the modes removed.

the bot can remove modes and ban people from outside of the room, and when gets back into the room, and gets op, will then kick the users.

now there is one flaw, if the bot is banned and immediantly kicked, it can remove all the modes that the users set, BUT, it cant get back into the channel, to op itself, and kick the users

now i would just bind to a +b mode change, but what if the user only bans the bots host, or part of it, there is not really anyway from that to tell if it is infact the bot that has been banned.

any ideas?
http://www.thedigitaldream.co.uk
irc.thedigitaldream.co.uk #thedigitaldream
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind mode - "* +b" bot:banned

proc bot:banned {nick uhost hand chan mc ban} {
global botname
 if {![string match -nocase $ban $botname]} {return 0}
#your code here
}
if the ban doesn't match the bot's host, then the code won't be applied.
Locked