mIRC Home    About    Download    Register    News    Help

Print Thread
#140893 31/01/06 09:07 AM
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
Ok I have tried to write it myself FAILED very badly, and have searched the internet for one.. cant find it..

what I want to do is have the bot only voice those people that join the channel that have lower case nicks. no CAPITAL nicks..

I know it can be done I ve seen it.. I jsut cant find it or figure it out please someone let me know...

Thanks

Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
in the case of an automatic voice-on-join:

Code:
on @*:JOIN:#channel: {
  ; check if the nick is not the same as the CAPS equivalent of the nick (!== caps sensitive inverted comparison)
  if ($upper($nick) !== $nick) mode $chan +v $nick
}


If it ain't broken, don't fix it!
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You can use the islower operator or $islower identifier.


Gone.
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
this is not working it is still voicing Nicks that have Capital letters I can only have it voice lowercase nicks.

frown

that and now I somehow killed my drive by (revolving door banner... aarrrrggghhhhhh

gotta luv it...

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
on @*:join:#channel: if ($nick islower) mode # +v $nick

- Change #channel to the channel where you want this to trigger on.
- This script should be put in a script file with no other on join event codes. If there are already on join events, put that line of code in a new empty script file.


Gone.
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
OK Hi Again.....

have tried both of these with variations on the #isupper and isupper, plus looking up other commands strings that may work. the first one will work but it voices anyone. the second one doesnt work at all.

one good thing I got my revolvign door thing to work again.
but am still lost as to this auto voice lower case nicks only.

Thanks

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Try this on for size
Code:
 on @*:join:#:{ 
 if ($lower($nick) === $nick) { .mode # +v $nick }
 } 

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
You have already received the necessary code in my post.

If something still isn't going the way you like it, then it means you have done something wrong, or you didn't explain yourself thorougly enough.

You say you want to voice anyone who has a lower case nick (no upper case letters).

//if (<string> islower) will only match when the string is lower case.

Therefore if ($nick islower) will only match when the nickname is in lower case.

All you got to do is put the code that I have given you in the remotes, change the #channel to whatever, and don't forget to get rid of the other code you have received earlier, because you cannot have two of these on join events in the same remote file. Also beware that you don't have any other similar code in another remote file. The fact that it always voices any nickname, is not related to the code that I gave you, you must have some other code interfering.


Gone.
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
There's no need for that. The islower operator or $islower identifier work fine.

It's obvious that he's doing something wrong, trying to give workarounds to see if the $nick is lowercase is futile. My guess is that he kept putting the new on join code after the code he already had, which naturally didn't help at all. I would not be surprised at all if it turned out he had some other auto-voice script/list loaded somewhere.


Gone.
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
This is the only auto voice I have now. I had yours in and it wasnt working so I retried mine.. am lookign thru my scripts again to make sure there is no other auto voice loaded.

ok this is what I wrote... before........

on @*:JOIN:#:{
;+v lower
if (%autovoice == 2) && ($asc($remove($nick,$chr(123),$chr(125),`,',[,_,^,|)) > 96) { /mode # +v $nick }
;+v caps
if (%autovoice == 1) && ($asc($remove($nick,$chr(123),$chr(125),`,',[,_,^,|)) < 96) { /mode # +v $nick }
}

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Uhhmm, what on earth?

Do you know what that $asc($remove(..)) thing does? It removes some characters from the nickname, and then it checks to see if the first letter of the remains is a character with ascii value above/beneath 96. That doesn't make sense at all since it doesn't say anything about other characters in the remains, and it doesn't say anything about that first letter either, it could still be any character, as long as its ascii value is above/beneath 96, not necessarily an alpha character.

There's really no point in us helping you, if you're not going to use the code that you've received.

Like we have already stated:

Use: //if (<string> islower) to see if <string> is entirely lower case.

Use: //if (<string> isupper) to see if <string> is upper case

Non-alpha characters are always seen as both lower and upper case, so there's no need to remove them, as they don't affect the overall result.

Additionally, why do we only get to see this code at this point? This code should have been pasted in your initial post, so that the people here have as much information to be able to help you better. Instead what we have now is some people posting the strangest and unnecessary workarounds, just to check if a string is lower case.

Note that you have not mentioned anything so far about what should happen if the nickname contains no alpha characters at all. Should it be treated as upper case or as lower case or as what then?


Gone.
Joined: Jan 2006
Posts: 22
L
Ameglian cow
OP Offline
Ameglian cow
L
Joined: Jan 2006
Posts: 22
FiberOPtic adn to all who replied...

I am sorry, I owe you all an apology,
in looking thru my ini files I have found another auto-voice which I have now deleted and have put FiberOPtics in its on autovoice.ini file all byitself....

and it work great.....
I am truley sorry I made this more complicated or harder on everyone than it needed to be....

thank you all for your help......


Link Copied to Clipboard