883 @verb #8045:"raw_notify ansi" this none this rdo #8045 @program #8045:"raw_notify ansi" this none this "Copied from Cecil (#7407):ansi Jul 23 20:18:10 1997" "Copied from gamma (#9814):ansi Jun 30 08:14:43 1997" "Copied from Cecil (#7407):ansi Jun 29 14:42:44 1997" "Copied from Generic player (#6):raw_notify by manta (#7165) Aug 27 13:29:27 1996" "A portion of the code was then hacked into Cecil's ANSI System on Jun 8 22:21:20 1997" "Optional ANSI support verbs (recommended) are:" " #7407:linesplit => Wraps ansified text correctly (or, attempts to.)" " #7407:quietcolumns => Useful for columnizing ANSI" " #7407:@ansi-option => Allows you to set certain options" {text, perms} = args $command_utils:suspend_if_needed() set_task_perms(this) accentbin = 0 if (caller == this || caller_perms().wizard) text = strsub(args[1], "~", "~7E") text = connection_option(this, "binary") ? strsub(text, "~7E~7E", "~7E") | text if (this.beep_type == "all" || (this.beep_type == "me" && caller_perms() == this)) ot = text text = strsub(text, "&beep;", "~07") ot == text || (accentbin = 1) endif if (this.esc_type == "all" || (this.esc_type == "me" && caller_perms() == this)) ot = text text = strsub(text, "&esc;", "~1B") ot == text || (accentbin = 1) endif text == (text = $msg:process_notify(text, this.accent_mode)) || (accentbin = 1) "And here, begins the ANSI hack." {needbin, text} = $ansi_utils:substitute(this, text) if (accentbin || needbin) text = text + "~1B[0m~0D~0A" try if (!(bin = `connection_option(this, "binary") ! ANY => 0')) set_connection_option(this, "binary", 1) endif notify(this, text) finally bin || set_connection_option(this, "binary", 0) endtry else notify(this, strsub(text, "~7E", "~")) endif else raise(E_PERM) endif if (this != #7407 && `!index(verb_info(this, "linesplit")[2], "x") ! ANY => 0') notify(this, tostr("Activating ", this, ":linesplit...")) set_verb_info(this, "linesplit", {this, "rdxo", "linesplit"}) endif "Last modified by Dax (#789) on Sat May 16 14:20:42 1998 EDT." . 0