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.

umm whats wrong with this?

Help for those learning Tcl or writing their own scripts.
Post Reply
h
honeybee
Halfop
Posts: 80
Joined: Sun Jan 01, 2006 12:42 pm

umm whats wrong with this?

Post by honeybee »

if { [string equal -nocase [nick2hand $nick] "honeybee"] } { return }
I'm trying to get the hand by nick2han and then trying to match it with my handle anf if it matches my hanlde then return, but its not working
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

if {[string tolower [nick2hand $nick]] == "honeybee"} { return }
But then i dont see why you are using nick2hand when the proc header will include hand(le)
r0t3n @ #r0t3n @ Quakenet
h
honeybee
Halfop
Posts: 80
Joined: Sun Jan 01, 2006 12:42 pm

Post by honeybee »

$hand will probably match only if the joined nick matches my handle i'm adding my host like *!*honeybee@66.25.* to my handle and trying to match the nick2hand with my handle.
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Post your proc instead of giving a single line that tells us nothing.
h
honeybee
Halfop
Posts: 80
Joined: Sun Jan 01, 2006 12:42 pm

Post by honeybee »

Code: Select all

bind join - * proc:check
proc proc:check {nick uhost hand chan} {
if { [string equal -nocase [nick2hand $nick] "honeybee"] } { return }
...........................
}
rest is working fine except this, i m trying to exempt them if they match my handle. thats all.
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

nick2hand should return the same as $hand, use $hand instead.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

From tcl-commands.doc:
nick2hand <nickname> [channel]
Returns: the handle of a nickname on a channel. If a channel is not
specified, the bot will check all of its channels. If the nick is
not found, "" is returned. If the nick is found but does not have
a handle, "*" is returned.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Re: umm whats wrong with this?

Post by rosc2112 »

honeybee wrote:
if { [string equal -nocase [nick2hand $nick] "honeybee"] } { return }
if {[nick2hand $nick] == "honeybee"} {return}

is the same as

if {$hand == "honeybee"} {return}
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

metroid wrote:nick2hand should return the same as $hand, use $hand instead.
Take metroid's advice honeybee.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply