mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I currently have this line of code for a custom notice event:
Code:
$iif(#,#,$iif($query($nick),$nick,$target))
This works if the query window whom you send a query to is open, but when it's not open, the notice gets sent to the status instead of the active channel. I tried everything (perhaps I've missed something along the way) I can think of but to no avail. Any assistance is obliged.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can change where notices appear from mIRC's options. Alt-O > IRC > Show in Active. By the sounds of it, that's all you need.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Thanks, Riamus2. But that didn't help. I've managed to find a solution to it and it seems to be working now.

Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
Share the solution?

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
if ($chan) { ; echo in channel... }
elseif ($query($nick)) { ; echo in query window... }
else {
  var %i = 1
  while ($comchan($nick,%i)) {
    ; echo in $comchan($nick,%i)
    inc %i
  }
}

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
So what you are saying is when it comes time to point to a channel, because you know its not a query, $chan is $null?

Have you echo'd the event to find out where the channel is stored? Maybe try $rawmsg,

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
What I suggested is fine.

The scenario he was running into is that he was receiving a private (not channel) notice from a nickname that he didn't have a query window open with.

In this case, you can use $comchan() in a loop to echo the notice in every channel you share with the nickname, you could also echo it to the active/status window if you prefer.

Joined: Jul 2007
Posts: 1,129
T
Tomao Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Thanks very much every one for your valuable input. What I have done is this:
Code:
$iif(#,#,$iif($query($nick),$nick,$iif($active ischan,$v1,$target)))
It's working this way.


Link Copied to Clipboard