mIRC Home    About    Download    Register    News    Help

Print Thread
Making a script to ban a nick #99946 07/10/04 10:58 PM
Joined: Sep 2004
Posts: 4
G
glenfield722 Offline OP
Self-satisified door
OP Offline
Self-satisified door
G
Joined: Sep 2004
Posts: 4
Please could you tell me if there is some method in which a nick can be banned on entrance to a chat room. I do not know anything about scripting but would apprreciate any help you could give me on this matter

Thank you

Re: Making a script to ban a nick #99947 08/10/04 01:14 AM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
You can use the ON Join event for that matter.

ON [color:red]!*:Join:#channel: if (Nick_banned == $nick) { ban -k $chan $nick Banned nick }[/color]

This will check if the nickname that just joined matches the banned nick. If it does, it will kick and ban it. Change the orange part for the nick you wish to ban. The red ! means that the script will *not* respond if YOU are the one joining. You must change the #channel for the channel name(s) you want the script to act upon (if it's more than 1, separate them with a comma [,]).

If you would like to ban the person for a period of time, change ban -k $chan $nick Banned nick for ban -kuN $chan $nick Banned nick - where N is the time you want the ban to last in seconds. Note that "Banned nick" is the kick message and you can chage that for the message you wish.

I hope this can help smile
Zyzzyx.

Edit: for more info about it, type /help on join while in mIRC.

Edit2: the -k part means that the script will also kick the person. If you don't want that, remove the k. Note that, if you are using the timed ban (-uN), you still need the - sign.

Last edited by Zyzzyx26; 08/10/04 01:18 AM.

"All we are saying is give peace a chance" -- John Lennon
Re: Making a script to ban a nick #99948 08/10/04 04:07 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
  • ON @*:Join: #channel : if ( Nick_banned[ == $nick) { ban -k $chan $nick Banned nick }

Better to use @ than ! as it will only trigger if you are opped on that channel. This way also precludes your own joins and won't cause errors by trying to kick when you're not opped. laugh

Re: Making a script to ban a nick #99949 08/10/04 02:44 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Agreed smile Forgot about the @ :P


"All we are saying is give peace a chance" -- John Lennon