mIRC Homepage
Posted By: Drai Unbanning myself in a script - 20/02/09 06:57 AM
Alright, well I'm beginning to get the hang of these scripts.

So far I have this
Code:
on !*:ban:#: kick $chan $nick

That will kick the person that banned me. I will specify the channel I plan to use it in later, I know that will be important. However, I was wondering how to specify the script so it only activates when I'm banned (my nick is Drai). I would also like to unban myself afterwards as well.

Thanks a bunch, I'm halfway there but can't quite figure out the rest.
Posted By: Tomao Re: Unbanning myself in a script - 20/02/09 08:10 AM
Code:
on !*:ban:#:if ($banmask iswm $address($me,5)) mode $chan -b $v1
Posted By: Drai Re: Unbanning myself in a script - 20/02/09 08:33 AM
So I'm assuming I'm going to have to have two separate scripts. One to kick the person on their banning of me, and one to unban myself.
Code:
on !*:ban:#:if ($banmask iswm $address($me,5)) kick $chan $nick

on !*:ban:#:if ($banmask iswm $address($me,5)) mode $chan -b $v1

Would this work to specify that the kick and the unban will only occur if the ban is on me?
Posted By: Tomao Re: Unbanning myself in a script - 20/02/09 09:14 AM
You only need one to combine the two instances:
Code:
on !*:ban:#:if ($banmask iswm $address($me,5)) mode $chan -b $v1 | kick $chan $nick
Posted By: Drai Re: Unbanning myself in a script - 20/02/09 03:54 PM
Right, my bad. It was late when I posted that.

Thanks smile
Posted By: Wims Re: Unbanning myself in a script - 20/02/09 04:21 PM
Actually i think the code you have isn't what you want :
Code:
on !*:ban:#:if ($banmask iswm $address($me,5)) mode $chan -b $v1 | kick $chan $nick
This is interpreted as :
Code:
on !*:ban:#:if ($banmask iswm $address($me,5)) { mode $chan -b $v1 } | kick $chan $nick
In others word, you will kick any user that is banning someone else than you.
Also, you should check if you're opped when this occur, use :

Code:
on !@*:ban:#:if ($banmask iswm $address($me,5)) { mode $chan -b $v1  | kick $chan $nick }
© mIRC Discussion Forums