All pastes #525338 Raw Edit

Anonymous

public text v1 · immutable
#525338 ·published 2007-05-31 10:06 UTC
rendered paste body
on *:text:!pug*:%p:{
  .na
  if ($hget(pv.db,ingame) == 1) {
    /msg $chan $replace($skin,<c>,Pug,<i>,The pug is ingame (!score))
    /halt
  }
  if ($hget(pv.db,pugging) == 1) {
    /msg $chan $replace($skin,<c>,Pug,<i>,There is a pug running (!join))
    /halt
  }
  if ($hget(pv.db,disable) == 1) {
    /msg $chan $replace($skin,<c>,Pug,<i>,Is disabled! (!enable))
    /halt
  }
  if ($2 == $null) {
    /hadd -s pv.db map de_dust2
    /goto pug
  }
  if ($2 != $null) {
    if ($2 isin $hget(pv.db,maps)) {
      /hadd -s pv.db map $2
      /goto pug
    }
    else {
      /msg $chan $replace($skin,<c>,Pug,<i>,$2 is not in maps ( $+ $hget(pv.db,maps) $+ ))
      /halt
    }
  }
  else {
    :pug
    /mod
    /mode $chan +v $nick
    /timer1 1 1 /msg $chan $replace($skin,<c>,TimeOut,<i>,Auto-Timeout in 20 min)
    /timer2 1 600 /msg $chan $replace($skin,<c>,Pug,<i>,Auto-Timeout in 10 min)
    /timer3 1 1200 /msg $chan $replace($skin,<c>,Pug,<i>,Auto-Timeout in 0 min)
    /timer4 1 1200 /endpug
    /hadd -s pv.db pugadmin $nick
    /hadd -s pv.db puggersn 1
    /hadd -s pv.db inadmin 0
    /hadd -s pv.db pugging 1
    /hadd -s pv.db ingame 0
    /hadd -s pv.db ia coNNect
    /hadd -s pv.db serverp $rand(a,z) $+ $rand(1,9) $+ $rand(a,z) $+ $rand(1,9)
    /hadd -s pv.db adminp $rand(a,z) $+ $rand(1,9) $+ $rand(a,z) $+ $rand(1,9)
    /rcon sv_password $hget(pv.db,serverp)
    /rcon changelevel $hget(pv.db,map)
    /finish
    /msg %p $replace($skin,<c>,%p,<i>,A pug has been started on $hget(pv.db,map) at  $+ %p $+  by $nick - type !join to play!)
  } 
}