mIRC Home    About    Download    Register    News    Help

Print Thread
Unbanning myself in a script #209660 20/02/09 06:57 AM
Joined: Nov 2007
Posts: 20
D
Drai Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2007
Posts: 20
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.

Re: Unbanning myself in a script [Re: Drai] #209662 20/02/09 08:10 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on !*:ban:#:if ($banmask iswm $address($me,5)) mode $chan -b $v1

Re: Unbanning myself in a script [Re: Tomao] #209664 20/02/09 08:33 AM
Joined: Nov 2007
Posts: 20
D
Drai Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2007
Posts: 20
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?

Last edited by Drai; 20/02/09 08:34 AM.
Re: Unbanning myself in a script [Re: Drai] #209666 20/02/09 09:14 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
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

Re: Unbanning myself in a script [Re: Tomao] #209674 20/02/09 03:54 PM
Joined: Nov 2007
Posts: 20
D
Drai Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Nov 2007
Posts: 20
Right, my bad. It was late when I posted that.

Thanks smile

Re: Unbanning myself in a script [Re: Drai] #209675 20/02/09 04:21 PM
Joined: Jul 2006
Posts: 3,833
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,833
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 }


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net