@Lpfix:

Instead of doing echo -a, which will echo to the active window, whichever one that may be (could be your status window for example), you should echo to the correct window.

On thing you can do is this:

echo $iif($chan,$chan,$nick) <text>

What does this mean? In the on text event with location part * it can trigger on both channels and queries. $chan will be filled if the on text triggered on a channel, so then the $iif returns $chan, and we echo to the channel. $nick will be filled if it's in a query, so $iif returns $nick and we echo the text to the nickname's window.

on ^*:text:*:*: haltdef | echo -mbflirt $iif($chan,$chan,$nick) $+(<<,$nick,>>) $1-

@Original requester:

Your on input event could be improved some.

Code:
on *:input:*:{ 
 if (!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) &amp;&amp; $&amp;
    ($istok(channel chat query,$window($active).type,32)) &amp;&amp; $&amp;
    (!$ctrlenter) &amp;&amp; (!$inpaste) { 
    haltdef 
    .msg $active $1- 
    echo -artc own $+(&lt;&lt;,$me,&gt;&gt;) $1- 
  } 
}

  1. This will check if the window you are typing to is either a channel, query, or chat window.
  2. It will check not only for the / command char, but for the custom command char that users can specify in the mIRC options.
  3. In the on input event, using echo -a is fine, since the active window is the one where you typed the text, it will always be the correct window.
  4. Note that instead of checking for ($ctrlenter) it makes more sense to check for (!$ctrlenter). ctrl+enter is generally a means to be able to override your script and msg something directly to the server bypassing your on input script. Example if it were an acronym replacer, and you typed lol, it would go to the on input event and change it to "Laughing out Loud", though with the ctrl+enter trick, you can make it so it just sends "lol", by checking for (!$ctrlenter).
  5. I included a check for (!$inpaste), which means right now when you paste something, it will not be formatted. If you do want your pastes to go through the on input event, remove the if check for (!$inpaste).


Gone.