mIRC Home    About    Download    Register    News    Help

Print Thread
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.

Joined: Jul 2007
Posts: 1,129
T
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

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.
Joined: Jul 2007
Posts: 1,129
T
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

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

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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 }


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard