All pastes #358249 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-02-16 03:48 UTC
rendered paste body
alias c1 { return $+(10,$1-) }
alias c2 { return $+(14,$1-) }

on *:text:*:#: {
  set %output.stats 10[&&]14[xBot` Results-Stats]:10
  tokenize 32 $strip($1-)
  if ($left($1,1) !isin @!.) halt
  if ($right($1,-1) == stats) var %style = astats
  elseif ($regex($1,/co?mb(at)?/Si)) var %style = combat
  elseif ($setskill($remove($1,@,!,.))) var %style = istat, %skill = $setskill($remove($1,@,!,.))
  elseif ($right($1,-1) == setrsn) && ($2) {
    if ($2 == -h) {
      writeini DefRSN.ini RSNs $mask($fulladdress,3) $replace($3-,$chr(32),-)
      .notice $nick %output.defrsn You're default RSN for the host $mask($fulladdress,3) has been set to $3-
    }
    else {
      writeini DefRSN.ini RSNs $nick $replace($2-,$chr(32),-)
      .notice $nick %output.defrsn You're default RSN for the nick $nick has been set to $2-
    }
    halt
  }
  else halt

  inc %ID
  if ($len($2-) > 12) {
    $($+(%,stats.display.,%ID),2) $c1(The nick) $c2($2-) $c1(is too long)
    cleanup %ID
    halt
  }
  elseif ($2) set $+(%,stats.rsn.,%ID) $replace($2-,$chr(32),-)
  elseif ($readini(DefRSN.ini,n,RSNs,$mask($fulladdress,3))) set $+(%,stats.rsn.,%ID) $ifmatch
  elseif ($readini(DefRSN.ini,n,RSNs,$nick)) set $+(%,stats.rsn.,%ID) $ifmatch
  else set $+(%,stats.rsn.,%ID) $nick

  set $+(%,stats.style.,%ID) %style
  set $+(%,stats.skill.,%ID) %skill
  set $+(%,stats.display.,%ID) $iif($left($1,1) == @,msg $chan,notice $nick)
  sockopen $+(stats.,%ID) hiscore.runescape.com 80
}