mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2004
Posts: 4
G
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

Joined: Feb 2004
Posts: 714
Z
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
Joined: Aug 2003
Posts: 1,831
I
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

Joined: Feb 2004
Posts: 714
Z
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

Link Copied to Clipboard