ok. The point is, the final event
Code:
on *:sockclose:market: {
  msg #channel 04Market: %market
   unset %market
}

does not provide a $chan, it is not related to the initial on text-event. You have to store the place where "!market" had been typed manually.
e.g.
change:
Code:
on *:text:!market:#channel: {
  sockopen market www.lunarwars.net 80
}

to:
Code:
on *:text:!market:#channel: {
set -e %marketprices.chan $chan
  sockopen market www.lunarwars.net 80
}


and change:
Code:
on *:sockclose:market: {
  msg #channel 04Market: %market
   unset %market
}

to:
Code:
on *:sockclose:market: {
 if ($me ison %marketprices.chan) { msg $v2 04Market: %market }
 unset %market | unset %marketprices.chan
}


I am well aware that "/set" is not the neatest way to store temporary data like this, but you have to modify the given code least smile

Last edited by Horstl; 26/04/07 12:36 AM.