mIRC Home    About    Download    Register    News    Help

Print Thread
#101399 23/10/04 02:39 PM
Joined: Mar 2003
Posts: 160
Marantz Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2003
Posts: 160
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?

#101400 23/10/04 03:46 PM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
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

#101401 23/10/04 05:57 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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.


New username: hixxy

Link Copied to Clipboard