Hmm well that solves the announce problem. But if I run the alias myself, I don't want it to msg the channel, instead I would like it to echo. Meaning I don't want to announce the result in the sockread event. Rather I would like sockread to set a variable for my remote scripts to read.

I tried doing just that (ie %tvresult = %show_name) and then announce those variables in the script above and unset them afterwards. The problem with that is of course that the variables get set after the remote script has resolved them (and I can't re-evaluate variables, or can I? Just identifiers).

Since return won't work I'm guessing I need some work around to delay the resolving of variables set by the tvrage-alias? This is how I'd like it (somehow)

Code:
alias tvrage {
  unset %tvrage
  if (!$1) {
  
.... SNIP ....

on *:sockclose:tvrage:{
  %tvresults = %show_name %show_country %show_next
  unset %tvrage.*
  unset %show_*
}

alias tv {
  tvrage $1-
  echo -a Show: $gettok(%tvresults,1,32) Country: $gettok(%tvresults,2,32)
  unset %tvresults
}

on *:TEXT:!tv*:#chan:{
  tvrage $1-
  msg $chan Show: $gettok(%tvresults,1,32) Country: $gettok(%tvresults,2,32)
  unset %tvresults
}


Meaning I can decide whether to keep the results for myself or spit them out in achan depending on how the tvrage lookup alias is called.

Still not sure I make myself clear though. smile