mIRC Home    About    Download    Register    News    Help

Print Thread
#134590 02/11/05 11:14 PM
S
sheley
sheley
S
Hi -

I am so inept at this, but I wondered if anyone might know of a script that will auto-voice visitors to an IRC channel based upon whether or not the first letter of their nick is capitalized.

I would like to auto-voice only those with capped nicks.

Any clues out there?

Thanks,

zsheleyz

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
Code:
on *:JOIN:#yourchannel:{
  if ($me !isop $chan) return
  if ($left($nick,1) isupper) mode $chan +v $nick
}


This code will voice any user who joins your channel and has a nick name with an uppercase first character. It will only work if you are an op on that channel. Change #yourchannel to match your channel name.

The opposite to isupper is islower. Use /help if then else for more operators.

-genius_at_work

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Or

Code:
On @*:Join:#yourchannel: {
  if ($left($nick,1) isupper) mode $chan +v $nick
}


-Andy

S
sheley
sheley
S
hi don't mean to seem dense, but is this something that I can cut & paste into remotes - as is?

Joined: Oct 2005
Posts: 1,671
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,671
Yes, you can copy either code into the remotes section.

-genius_at_work

S
sheley
sheley
S
Hi,

Thanks for your help.

I have tried it and for whatever reason it's not working for me at this point. The mirc-bot that i have it on is Op'd - but it is not voicing capped nicks that enter the channel. Not sure what I could be doing wrong.

Thanks again,

zsheleyz

Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
Be sure to change #yourchannel to the channel you are on. smile

-Andy

S
sheley
sheley
S
yes, did that but didn't change it on the $channel - just the "your channel"

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Make sure the channel starts with # and the : { at the end of the line is still there. Also put this snippet at the top of a script file or in a new script file. If there is another on *:JOIN event before this snippet, it will not work as mIRC stops searching a script after the first matching event.

S
sheley
sheley
S
Aww,

Y'all are just honey-buns! Thanks guys!

I finally got it to work. My problem was that I had another script with the same starting characters before this one! I removed it and now it works!


Thanks bunches!

zsheleyz


Link Copied to Clipboard