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 

Getting $hand based on $nick given

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


Joined: 12 Apr 2004
Posts: 12
Location: Beaverton, OR

PostPosted: Fri May 26, 2006 2:03 pm    Post subject: Getting $hand based on $nick given Reply with quote

I'm doing and XTRA field called "tagline", which will be a users tagline. I've got the part that gives you yours if you request it (Such as "Mike, who am I?") (Mike is the bot's name) with this:
Code:

proc give_tagline {nick mask hand chan arg} {

   putserv   "PRIVMSG $chan :$nick is [getuser $hand XTRA tagline]"
}


Now, I also want it to respond to "Mike, who is <nick>?". I have the matching for nicks in channel already written (and if they are there), what I would like to do now is how can I take $requested_nick and get their handle to pull up their tagline? Would something along the lines of:
Code:

proc give_tagline {nick mask hand chan arg} {

   putserv   "PRIVMSG $chan :$requested_nick is [getuser $requested_nick XTRA tagline]"
}

work? Or do I need something to return the $hand of the $requested_nick, then use that first example? Or can I just do something where after matching the $requested_nick to someone in channel, get $requestd_nick's $hand?
_________________

Brendan K Callahan Undernet: MaryFinn & PixelCat on #Mary'sPlace | http://3whack.org/brendan/ Theft by Deception DnB music (Released under the CreativeCommons License)
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri May 26, 2006 2:40 pm    Post subject: Reply with quote

Quote:

nick2hand <nickname> [channel]
returns: handle of <nickname> on <channel>
| if <channel> is not specified, bot will check all of its channels
| if <nickname> not found, returns ""
| if <nickname> found but unknown, returns "*"

_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
darkmare
Voice


Joined: 12 Apr 2004
Posts: 12
Location: Beaverton, OR

PostPosted: Fri May 26, 2006 2:45 pm    Post subject: Reply with quote

Thanks!
_________________

Brendan K Callahan Undernet: MaryFinn & PixelCat on #Mary'sPlace | http://3whack.org/brendan/ Theft by Deception DnB music (Released under the CreativeCommons License)
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