| View previous topic :: View next topic |
| Author |
Message |
darkmare Voice

Joined: 12 Apr 2004 Posts: 12 Location: Beaverton, OR
|
Posted: Fri May 26, 2006 2:03 pm Post subject: Getting $hand based on $nick given |
|
|
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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Fri May 26, 2006 2:40 pm Post subject: |
|
|
| 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 |
|
 |
darkmare Voice

Joined: 12 Apr 2004 Posts: 12 Location: Beaverton, OR
|
Posted: Fri May 26, 2006 2:45 pm Post subject: |
|
|
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 |
|
 |
|