All pastes #609954 Raw Edit

Something

public text v1 · immutable
·published 2007-07-09 04:54 UTC
rendered paste body
on ^*:text:*:#: {
  if (%cq) {
    if ($chr(47) isin $left($1,1)) {
      return
    }
    var %msg = $1-
    inc %idn
    writeini copyq.ini id %idn $+(<,$nick,>) %msg
    echo $chan $+([,%idn,]) $+(<,$nick,>) %msg 
    haltdef
  }
}
alias copyq {
  if (!$1) {
    if (%cq) {
      unset %cq
      halt
    }
    set %cq on
  }
  if ($1 isalpha) {
    if ($1 == clear) {
      unset %fnid*
      echo -a 4Cleared all saved message ids.
      halt
    }
    if ($1 == log) && ($isfile(copyq.ini)) {
      run copyq.ini
      halt
    }
  }
  if ($1 isnum) {
    if (!$readini(copyq.ini,id,$1)) {
      echo -a 4Invalid message ID.
      halt
    }
    clipboard -n $readini(copyq.ini,id,$1)
    echo -a Message was copied to clipboard.
  }
}