egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

umm whats wrong with this?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
honeybee
Halfop


Joined: 01 Jan 2006
Posts: 80

PostPosted: Tue Sep 26, 2006 8:54 am    Post subject: umm whats wrong with this? Reply with quote

Quote:
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
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Tue Sep 26, 2006 9:07 am    Post subject: Reply with quote

Code:
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
Back to top
View user's profile Send private message MSN Messenger
honeybee
Halfop


Joined: 01 Jan 2006
Posts: 80

PostPosted: Tue Sep 26, 2006 9:48 am    Post subject: Reply with quote

$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.
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Wed Sep 27, 2006 6:44 am    Post subject: Reply with quote

Post your proc instead of giving a single line that tells us nothing.
Back to top
View user's profile Send private message
honeybee
Halfop


Joined: 01 Jan 2006
Posts: 80

PostPosted: Wed Sep 27, 2006 6:25 pm    Post subject: Reply with quote

Code:
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.
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Thu Sep 28, 2006 3:02 pm    Post subject: Reply with quote

nick2hand should return the same as $hand, use $hand instead.
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu Sep 28, 2006 7:03 pm    Post subject: Reply with quote

From tcl-commands.doc:
Quote:
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
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Sep 29, 2006 5:24 pm    Post subject: Re: umm whats wrong with this? Reply with quote

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


if {[nick2hand $nick] == "honeybee"} {return}

is the same as

if {$hand == "honeybee"} {return}
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Sep 29, 2006 7:19 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber