mIRC Homepage
Posted By: Marantz notice event - 23/10/04 02:39 PM
me and a friend are trying to work out a problem with the notice event, when we join a channel, it has chanserv say 'welcome to #blah' or whatever, but if we have an autojoin on and join 3 channels with it, and chanserv welcomes you to all 3, it echos all 3 in the active window and not from the channel it came from, is there a way to make the notice echo in the channel i came from?
Posted By: Sigh Re: notice event - 23/10/04 03:46 PM
Does the notice contain the channel name that it came from? If so then picking it apart and echoing to that channel should be simple. Otherwise you'd have to keep a temporary list of channels you've recently joined and consider the order of the notices received to determine which it came from
Posted By: tidy_trax Re: notice event - 23/10/04 05:57 PM
It depends if it's a private notice (on *:notice:*:?:{ }) or channel notice (on *:notice:*:#:{ }).

For private notices you could do something like this:

Code:
on me:*:join:#:{ set -u1 %oj $cid $chan }
on ^*:notice:*:?:{
  if ($nick == chanserv) && ($gettok(%oj,1,32) == $cid) { 
    echo $gettok(%oj,2,32) <output text> 
    unset %oj
  }
  else { ;normal notice }
  haltdef
}


Although that would probably break if you, chanserv, or the server are lagged.
© mIRC Discussion Forums