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: Select all
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: Select all
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?