MOO-cows Mailing List Archive
Re: The best way for @beep
On Tue, 3 Sep 1996, Antonio Martos wrote:
> set_connection_option() is ok for making a @beep command?
> I dislike to do it this way, lot error checking.
> I preffer to use a wiz read only prop named .bell being a string with
> ascii value 7 > I know to ouput this char to a connection using binary conns...
> Is the only way to enter this value in de core, to hack it?
> I know that Lambdacode manual onky talks about binary conns and not
> about hack :) But I still think this is a more robust way to implement
> things like ANSI color and beeps than using a dangerous binary conn.
> Maybe binary conns are fine for other things like file exchange with
> other sites.
> I ve seen Dark Owl's ANSI system 2.1 and does it this way, but looks
> like a plugin to <1.8.0 server. Maybe with 1.8.0 it is done differnet
Both ways work fine in 1.8.0, but using set_connection_option is definately
the prefered way to do it (especially for portable code, I guess for a MOO
to use specifically for their own stuff, it doesn't matter as much). Version
2.2 of my ANSI system uses set_connection_option to output binary strings
like you suggested above, the only reason 2.1 didn't is because I released
it before 1.8.0 was in beta. Using set_connection_option isn't really
dangerous though, as long as you wrap the notify() call with a try-finally
(to unset the binary bit if it traces back) and don't call any verbs which
might output their own text between setting the binary flag and unsetting
BTW, to anyone out there waiting for 2.2 to be released, it's done (and has
been for almost a month) but I haven't gotten around to writing up an
installation script and releasing it yet because I've had a lot of other
projects to keep me busy. Hopefully I'll have it done in a week or two, but
I'm not making any promises.
Subject Index |