Jump to content

!warn script


JB_frozen

Recommended Posts

here is a simple warn script Designed For GUS

alias warnings.add  !writeini -n " $+ $scriptdir $+ warns.ini" warnings $1 $calc($readini($scriptdir $+ warns.ini,warnings,$mta.nick($1,%a)) + 1) 
on *:SIGNAL:mta.command:{ 
  var %a = $iif((!$4),$2,$iif(($warn.getid($1,$4) == $null),$2,$v1)),%race = $replace($mta.race($1),$chr(32),$chr(45)) 
  if ($3 == !warn) { 
    if ($gus.level($1,$2) >= 10) { 
      if ($4 == $null) { 
        /mta.pm $1 $2 error. you have to fill in a reason and/or a name 
      } 
      /mta.text $1 $mta.nick($1,$2) has given $mta.nick($1,%a) A warning (Reason: $5- $+ ) 
      !writeini -n " $+ $scriptdir $+ warns.ini" warned $mta.nick($1,%a) 1 
      !writeini -n " $+ $scriptdir $+ warns.ini" Reason $mta.nick($1,%a) $5- 
      warnings.add $mta.nick($1,%a)  
    } 
    else /mta.pm $1 $2 sorry you are not admin lvl 10 
  } 
  elseif ($3 == !playerinfo) { 
    if ($gus.level($1,$2) >= 7) { 
      if ($4 == $null) { 
        /mta.pm $1 $2 sorry you havent state the name please retry 
      } 
      /mta.pm $1 $2 $mta.nick($1,%a) has been warned $readini($scriptdir $+ warns.ini,warnings,$mta.nick($1,%a) Times Reason: $readini($scriptdir $+ warns.ini,reason,$mta.nick($1,%a) 
    } 
    else /mta.pm $1 $2 sorry you are not admin lvl 7 
  } 
} 
on *:SiGnal:Mta.join:{  
  if ($readini($scriptdir $+ warns.ini,warnings,$mta.nick($1,%a)) >= 3) { 
    /msg #unifi5h Warning $mta.nick($1,$2) has more than 3 Warnings! Last reason whas: $readini($scriptdir $+ warns.ini,reason,mta.nick($1,$2)) 
  } 
} 
alias warn.getid { 
  var %a = 0 
  while (%a < %loop) { 
    if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a 
    !inc %a 
  } 
} 
on *:TEXT:*:#:{ 
  if ($1 == !playerinfo) { 
    if ($nick Isop $chan) { 
      if ($2 == $null) { 
        .notice $nick sorry you havent state the name, please retry 
      } 
      .notice $nick $$2- has been warned $readini($scriptdir $+ warns.ini,warnings,$$2-) Times Reason: $readini($scriptdir $+ warns.ini,reason,$$2-) 
    } 
    else .notice $nick sorry you are not admin  
  } 
} 

Commands:

!warn

!unwarn

!playerinfo (ingame)

!playerinfo (IRC)

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...