This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

validuser case sensitive

Help for those learning Tcl or writing their own scripts.
Post Reply
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

validuser case sensitive

Post by juanamores »

I wish that when someone adds a nick as DJ, compare whether the addition nick is a valid user on the bot.
But compare that to be case sensitive.
Example for valid user freud
!djadd freud
OK
For invalid user FrEuD
NOT VALID

This code is NOT case sensitive:
if {![validuser $djnickname]} { putmsg $chan NOT VALID }

How I can do to make the validuser command case sensitive?
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
User avatar
Get_A_Fix
Master
Posts: 206
Joined: Sat May 07, 2005 6:11 pm
Location: New Zealand

Post by Get_A_Fix »

it doesn't have to be case sensitive, as long as it can match the users host.

I would try something like

Code: Select all

if {![validuser [nick2hand $djnickname]]} { putmsg $chan "NOT VALID" }
if that doesn't work, then you may have to use lsearch and -nocase switch.
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
j
juanamores
Master
Posts: 317
Joined: Sun Mar 15, 2015 9:59 am

Post by juanamores »

I'll try, thanks.
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks :)
Post Reply