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.

alltools.tcl contains buggy ispermowner

Old posts that have not been replied to for several years.
Locked
c
cmouse

alltools.tcl contains buggy ispermowner

Post by cmouse »

The ISPERMOWNER that comes with the bot (v. 1.6.13):

proc ispermowner {hand} {
global owner

regsub -all -- , [string tolower $owner] "" owners
if {([matchattr $hand n]) && \
([lsearch -exact $owners [string tolower $hand]] != -1)} then {
return 1
}
return 0
}

the regsub line is buggy, it should be
regsub -all -- , [string tolower $owner] " " owners

The current form causes the string to become
"owner1owner2owner3" in some cases.

I suggest this change:
regsub -all -- , [string tolower $owner] " " owners
regsub -all -- {[ ]+} $owners " " owners
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This only happens when users deviate from the example given in the config file.

Code: Select all

set owner "MrLame, MrsLame"
Locked