BetaDevil Posted August 24, 2006 Share Posted August 24, 2006 I have a problem with my script: alias gus.warnings !return $iif($readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),$readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),0) and elseif (!givewarning* iswm $3) { if ($gus.level($1,$2) >= 10) { if (%a == -1) { mta.pm $1 $2 Error - Absent ID } else { !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) $gus.add($gus.warnings($1,$2),1) mta.text $1 $mta.nick($1,%a) has got a warning! } } The script is just like like the stats-system. But now I need a code if you have 3 warnings you will get an auto-ban, can somebody help me with that code? Link to comment
lil Toady Posted August 24, 2006 Share Posted August 24, 2006 elseif (!givewarning* iswm $3) { if ($gus.level($1,$2) >= 10) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else { !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) $calc($gus.warnings($1,%a)+1) if ($gus.warnings($1,%a) >= 3) { mta.text $1 $mta.nick($1,%a) has reached the warnings limit and will be banned! mta.ban $1 %a } else mta.text $1 $mta.nick($1,%a) has got a warning! $calc(3-$gus.warnings($1,%a)) more warnings and he will be banned. } } } alias gus.warnings !return $iif($readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),$v1,0) Link to comment
Recommended Posts