|
Joined: Apr 2007
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Apr 2007
Posts: 3 |
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.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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. 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-
}
}
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
It would be "safer" to change the if to... on *:text:*:*:{
if $window(%relay.window) {
.aline %relay.window $1-
}
}
Last edited by NaquadaServ; 18/04/07 09:34 PM.
|
|
|
|
Joined: Feb 2006
Posts: 546
Fjord artisan
|
Fjord artisan
Joined: Feb 2006
Posts: 546 |
even safer!
on *:text:*:*:{
if ($window(%relay.window).type isin listbox custom) {
aline %relay.window $1-
}
}
:S:S:S
"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
I don't see how, since all aline cares about is if $window(%relay.window) exists.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
%relay.window could be a channel, and you can't /aline to a channel. It gives an error.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
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.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Dec 2002
Posts: 580
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 580 |
I would personally never allow the global variable to every be set to an invalid value in the first place. 
Last edited by NaquadaServ; 18/04/07 10:53 PM.
|
|
|
|
Joined: Apr 2007
Posts: 3
Self-satisified door
|
OP
Self-satisified door
Joined: Apr 2007
Posts: 3 |
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.
Last edited by Bebop; 22/04/07 05:32 PM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
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.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
Yes, it can. In your on TEXT event, you just do something like: He was mentioning the code examples above. 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.
* cold edits his posts 24/7
|
|
|
|
|