Okay so I am making a MP3 player for my mIRC. I am in the final testing stages and I've come across a bug that I can't seem to squash. Everything works fine so far except for this one little bug. :\

Code:
alias mp3echo {
  %title = $iif($sound($2-).title == $null,N/A,$sound($2-).title)
  %artist = $iif($sound($2-).artist == $null,N/A,$sound($2-).artist)
  if ($1 == -a) { msg $active Now Playing: %title By: %artist }
  elseif ($1 == -b) { echo -a Now Playing: %title By: %artist }
}


Syntax: /mp3echo -ab <mp3filename>

-a Displays song info to active channel/query window.
-b Echos song info to active channel/query window.

When the MP3 player plays a song, at the beginning of it (depending on the settings) it will display the song information to the active window. Now it has three settings 1) Display to active channel 2) Echo to active window 3) No display. Options 2 and 3 work fine, its option 1 I am having the problem with.

So lets say I have two server connections. One on irc.server1.com and one on irc.server2.com and I initiate the MP3 player on irc.server2.com but then switch over to irc.server1.com and click play on active channel #channel. I will get a message saying "#channel no such nick/channel."

EDIT: Also! If I click the play button on the server that the MP3 player was initiated on, it will display the text to the active channel/query window without error. Its only when I try to use the Display to active channel/query setting on the other server.

Now if I use this:
Code:
alias mp3echo {
  %title = $iif($sound($2-).title == $null,N/A,$sound($2-).title)
  %artist = $iif($sound($2-).artist == $null,N/A,$sound($2-).artist)
  if ($1 == -a) { scid -a msg $active Now Playing: %title By: %artist }
  elseif ($1 == -b) { echo -a Now Playing: %title By: %artist }
}


It will show in the active channel/query on either of the servers but on the server that isn't active I -still- get the "#channel no such nick/channel" message.

What my question is: How do I get /mp3echo -a <mp3filename> to display in the active channel/query regardless of the server connection without getting the "no such nick/channel" message?

Last edited by N3M3S1S; 15/08/10 09:56 AM.

"There is no theory of evolution, only a list of creatures Chuck Norris allows to live."