mIRC Home    About    Download    Register    News    Help

Print Thread
#116636 07/04/05 07:32 AM
Joined: Apr 2005
Posts: 26
H
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...

Joined: Dec 2002
Posts: 3,547
S
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,.)
}

Joined: Apr 2005
Posts: 26
H
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 ?

Joined: Jun 2003
Posts: 5,024
M
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
Joined: Dec 2002
Posts: 3,547
S
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) { .. }

Joined: Apr 2005
Posts: 26
H
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?

Joined: Dec 2002
Posts: 3,547
S
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,.)
}

Joined: Apr 2005
Posts: 26
H
Ameglian cow
OP Offline
Ameglian cow
H
Joined: Apr 2005
Posts: 26
u rule thnx a lot!

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You're welcome. smile


Link Copied to Clipboard