$inpaste

From Scriptwiki
Revision as of 10:59, 12 April 2008 by Albie (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Returns true inside the on INPUT event if text is being pasted.

$inpaste

Example

on *:input:#: {
  ;If we're pasting some text.
  if ($inpaste) {
    ;Write the text to paste.txt
    .write paste.txt $1-
    ;In one second, use /play to delay the paste by 2000 miliseconds
    .timer 1 1 play $chan paste.txt 2000
    ;Make sure we delete the paste.txt for next time.
    .timer 1 30 .remove paste.txt
  }
}

See Also