u have to check if your bot is an OP in channel so u can do it by adding "@" before level and better to use $strip bcz some user use bold or color text an this wont work with your code and make sure if $2 is on channel or not and u can add at end or ban -k the kick msg and remove the notice finaly if your bot is in 2 channel or more the last kicked have to be informed in the same channel not for any one so better to use %var $+ #
on @*:text:*:#:{
if ($strip($1) == !kb) && ($nick isop #) && ($2 ison #) {
set %info $+ # $2 $nick
ban -k # $2 5 $nick kickbanned you.
}
elseif $strip($1) == !lastban {
tokenize 32 %info [ $+ [ # ] ]
if ($0) msg # Last banned was $1 and got banned by: $2
}
}