4b4 @verb #51:"insert_line" this none this rxdo #60 @program #51:"insert_line" this none this ":insert_line([who,] line or list of lines [,quiet])" " inserts the given text at the insertion point." " returns E_NONE if the session has no text loaded yet." if (typeof(who = args[1]) != $INT) args = {player in this.active, @args} endif if (!(corrupt = this:ok(who = args[1]))) return corrupt elseif (typeof(text = this.texts[who]) != $LIST) return E_NONE else if (typeof(lines = args[2]) != $LIST) lines = {lines} endif p = this.active[who] quiet = length(args) >= 3 ? args[3] | p:edit_option("quiet_insert") insert = this.inserting[who] this.texts[who] = {@text[1..insert - 1], @lines, @text[insert..length(text)]} this.inserting[who] = insert + length(lines) if (lines) this.changes[who] = text this.times[who] = time() if (!quiet) if (length(lines) != 1) p:tell("Lines ", insert, "-", insert + length(lines) - 1, " added.") else p:tell("Line ", insert, " added.") endif endif else p:tell("No lines added.") endif endif "Last modified by Dax (#789) on Wed May 4 06:46:00 2005 MDT." . 0