All pastes #551221 Raw Edit

paste

public text v1 · immutable
·published 2007-06-08 18:23 UTC
rendered paste body
on *:input:?:{ process.input $1- }
alias process.input {
  var %ul = $minirc.actchan
  if (!$halted) {
    if ($inpaste) {
      .timerpaste -io 1 0 dopaste
      haltdef
    }
    elseif (!$cmdchar($1)) || ($ctrlenter) {
      inc %stat.writtenchars $len($1-)
      inc %stat.writtenwords $0
      inc %stat.writtenlines
      if ($right($1-,1) == ?) { inc %stat.writtenqu }
      if ($chan) && (!$ctrlenter) && (%nick.comp) && ($right($1,1) isin %nick.comp.chr) && ($len($1) > 3) {
        var %r = $n.comp($left($1,-1),0)
        if (%r > 1) {
          set %nickcomp.text $1-
          set %nickcomp.chan %ul
          if (!$dialog(nickcomp)) {
            nndlg $iif($active == @MinIRC,-mdo,-m) nickcomp
            while (%r) {
              did -a nickcomp 3 $n.comp($left($1,-1),%r)
              dec %r
            }
            did -c nickcomp 3 1
          }
          haltdef
          return
        }
        elseif ($n.comp($left($1,-1),0)) {
          var %x = $replace(%nickcomp.format,<nick>,$n.comp($left($1,-1),1))
          msg %ul $iif($cchan(%ul),$strip(%x),%x) $2-
          haltdef
          return
        }
      }
      if (%away.ipback) && (%away.status) { back }
      msg %ul $1-
      haltdef
    }
  }
}