All pastes #776910 Raw Edit

Someone

public text v1 · immutable
·published 2007-11-16 11:19 UTC
rendered paste body
on *:udpread:rconLOG:{ 
  :nextudp 
  sockread -f %rcon.dat 
  if ($sockbr == 0) { return } 
  set %rcon.dat $gettok(%rcon.dat,6-,32)
  if ((%rcon.dat != $null) && (*" say_team "* iswm %rcon.dat)) { GOTO SAY }
  if ((%rcon.dat != $null) && (*" say "* iswm %rcon.dat)) { 
    :SAY
    set %rcon.num $clr(%rcon.dat).votenum
    SET %Rcon.STEAM $clr(%rcon.dat).Steam
    Tokenize 32 $clr(%rcon.dat).said 
    echo -s (RCON) $clr(%rcon.dat).nick < $+ %Rcon.STEAM $+ > <  $+ %rcon.num $+ > : $1-
    if ($1 == !rr) && ($2) && (!$3-) && ($isadmin(%Rcon.STEAM)) rconcmd sv_restart $2
    if ($1- == !rr) && ($isadmin(%Rcon.STEAM)) rconmd sv_restart 1
    if (($1- == !knife)) && ($isadmin(%Rcon.STEAM)) KNIFE
    if (($1- == !mr15)) && ($isadmin(%Rcon.STEAM)) MR15
    if (($1- == !live)) && ($isadmin(%Rcon.STEAM)) LIVEIT
    if ($1- == !prac) && ($isadmin(%Rcon.STEAM)) Prac
    if ($1- == !swap) && ($isadmin(%Rcon.STEAM)) SWAPIT
    SET %Rcon.said $clr(%rcon.dat).said 
  }
  goto nextudp
}
alias isadmin { 
  if ($readini(Admins.ini,STEAM-IDS,$1) != $null) return $true 
  else return $false
}