mIRC Homepage
Posted By: Bebop @windows - 15/04/07 01:54 AM
Just something I've noticed, but maybe a feature for normal @windows that can relay all text sent to a private message/dcc chat/channel, etc., to the selected @window

Just a thought.
Posted By: RusselB Re: @windows - 15/04/07 02:38 AM
This is so easily scriptable, it actually seems a waste to have it as a feature, considering the fact that most people probably wouldn't use it.
Code:
menu * {
Relay Window : set %relay.window $$?="Window Name" | set %relay.window $iif($left(%relay.window,1) != $chr(64),@) $+   %relay.window | .window %relay.window
}
on *:text:*:*:{
  if %relay.window {
    .aline %relay.window $1-
  }
}

Posted By: NaquadaServ Re: @windows - 18/04/07 09:30 PM
It would be "safer" to change the if to...

Code:
on *:text:*:*:{
  if $window(%relay.window) {
    .aline %relay.window $1-
  }
}

Posted By: jaytea Re: @windows - 18/04/07 10:21 PM
even safer!

Code:
on *:text:*:*:{
  if ($window(%relay.window).type isin listbox custom) {
    aline %relay.window $1-
  }
}


:S:S:S
Posted By: NaquadaServ Re: @windows - 18/04/07 10:29 PM
I don't see how, since all aline cares about is if $window(%relay.window) exists.
Posted By: hixxy Re: @windows - 18/04/07 10:36 PM
%relay.window could be a channel, and you can't /aline to a channel. It gives an error.
Posted By: starbucks_mafia Re: @windows - 18/04/07 10:37 PM
aline can't write to non-custom windows.

Of course if %relay.window was solely intended to be a custom window and it wasn't it'd probably be preferable to create some kind of error or warning message rather than let the script go on with what would presumably be undesired effects.
Posted By: NaquadaServ Re: @windows - 18/04/07 10:49 PM
I would personally never allow the global variable to every be set to an invalid value in the first place. wink
Posted By: Bebop Re: @windows - 22/04/07 05:31 PM
Uh, guys.

I didn't mean solely text :\

I was saying joins, quits, parts, ctcp's, users, bans, kicks, modes, the whole lot.

I doubt that just on text would cover all of that.

:S

Instead of having to make a whole script do to that, you could just have a param for /window that makes a window that makes a version of that channel, except you may customize the actions, events and such in the window, as if you had scripted this entire script to relay EVERYTHING that happened in the original channel to this new custom window.

It was just thought o _o

Btw, the on TEXT thing would just show the text, lol, not who said it.
Posted By: Riamus2 Re: @windows - 22/04/07 10:35 PM
Originally Posted By: Bebop
Btw, the on TEXT thing would just show the text, lol, not who said it.


Yes, it can. In your on TEXT event, you just do something like:

/aline @window $nick $1-

Obviously, you can format it how you want, including adding timestamps.

As for your suggestion, all text and events in a channel can be relayed to a specific @window easily. You can use on MODE, on ACTION, on TEXT, on INPUT, CTCP, on NOTICE, on JOIN, on QUIT, etc. Then, just use /aline or even ECHO to put the events/text into your @window in whatever format you choose.
Posted By: cold Re: @windows - 27/04/07 04:08 AM
Originally Posted By: Riamus2
Yes, it can. In your on TEXT event, you just do something like:

He was mentioning the code examples above.

Originally Posted By: Riamus2
As for your suggestion, all text and events in a channel can be relayed to a specific @window easily. You can use on MODE, on ACTION, on TEXT, on INPUT, CTCP, on NOTICE, on JOIN, on QUIT, etc. Then, just use /aline or even ECHO to put the events/text into your @window in whatever format you choose.

To me, it looks clear that the whole point is to have a /window parameter instead of messing with a script through all sorts of events (and end up not exactly copying the source window, since events don't catch everything that shows up in a window - a timer+$line method would do that, although it'd be very ugly for the event catching thing).

I think it's a good suggestion.
© mIRC Discussion Forums