mIRC Home    About    Download    Register    News    Help

Print Thread
#125864 22/07/05 08:10 PM
Joined: Jul 2005
Posts: 7
E
EnygmaX Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
E
Joined: Jul 2005
Posts: 7
When someone kicks me from my own channel I want it to go back and op me then ban them.

on *:KICK:#tbmonly: {
if ($nick == $me) { halt }
if ($opnick == $me) {
cs opme
cs deop $chan $nick
cs ban $chan $nick Goodbye
}
}

Why doesn't this work ?

#125865 22/07/05 08:35 PM
Joined: Mar 2005
Posts: 18
A
Pikka bird
Offline
Pikka bird
A
Joined: Mar 2005
Posts: 18
Not the best, but it should do. Since it's your own channel, I'm assuming CS auto-ops you on join, so the opme command shouldn't be needed.

on *:kick:#tbmonly:{
if ($nick == $me && $knick == $me ) { halt }
if ($nick != $me && $knick == $me) {
join #tbmonly
/timer1 2 1 /mode #tbmonly -o+b $nick $address($nick,2)
/timer2 2 1 /kick #tbmonly $nick Goodbye!
}
}

Oops, yeah i was not thinking. I kept the if ($nick == $me ) { halt } so that if you kick yourself, you don't rejoin and ban yourself :tongue:

Last edited by adazh; 22/07/05 09:05 PM.
#125866 22/07/05 08:53 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
You probably want to check if ($knick == $me), instead of ($opnick == $me). Adazh's unspoken suggestions (/join #tbmonly, and the /timers on the commands) are probably good too.


If I knew now what I will know then... maybe things will have been different...

Link Copied to Clipboard