mIRC Home    About    Download    Register    News    Help

Print Thread
REQ: chan notice ban script #116636 07/04/05 07:32 AM
Joined: Apr 2005
Posts: 26
H
Hooligan Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
Hey i'm not a scripter so i would like to ask ppl who are scripting n' using mirc to paste me a code which i would like to add to my irc client.
it shoud ban a person on chan notice, thats it.

thnx in advance...

Re: REQ: chan notice ban script #116637 07/04/05 07:42 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On @*:Notice:*:[color:red]#channel[/color]: {
  ban -k $chan $nick 2 No notices please $+($nick,.)
}

Re: REQ: chan notice ban script #116638 08/04/05 11:09 AM
Joined: Apr 2005
Posts: 26
H
Hooligan Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
Thnx man, and what if i want this lil script to work on all channels i'm in ?

Re: REQ: chan notice ban script #116639 08/04/05 11:22 AM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Replace #channel with # on its own.

It will still only work in channels you're opped in though, you shouldn't change that behaviour.

Regards,


Mentality/Chris
Re: REQ: chan notice ban script #116640 08/04/05 11:51 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Hehe Chris beat me to it.

# - Will work on all channels.
#Channel - Will only work in the channel #Channel.
#Channel,#mIRC,#Andy - Will only work in the following 3 channels you can specify more than 3 channels by seperating them by a comma.

As Chris said, you want it to only trigger when you're an operator otherwise you'll get an error like:


* Hooligan: you're not channel operator


So it is important to leave the @ sign there which checks if you're an operator on the channel before performing any commands.

@ is the equivalent of if ($me isop $chan) { .. }

Re: REQ: chan notice ban script #116641 08/04/05 02:10 PM
Joined: Apr 2005
Posts: 26
H
Hooligan Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
ok! and what about @ and +v users, how to exclude them from beying banned?

Re: REQ: chan notice ban script #116642 08/04/05 02:14 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On @*:Notice:*:#: {  
  if ($nick isreg $chan) ban -k $chan $nick 2 No notices please $+($nick,.)
}

Re: REQ: chan notice ban script #116643 08/04/05 02:20 PM
Joined: Apr 2005
Posts: 26
H
Hooligan Offline OP
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
u rule thnx a lot!

Re: REQ: chan notice ban script #116644 08/04/05 02:23 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You're welcome. smile