Points How to turn it off and on - 03/07/14 09:48 PM
Pretty Simple of a setup. I just would like to know how to turn it off and on when I don't want it to run for people just don't afk in my IRC chat racking up points
Code:
;--------------------------------- ;Punktesystem test ;--------------------------------- alias -l addPoints { if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt } var %topic $+($chan,.,$nick) var %points $calc($readini(Points.ini,%topic,Points) + $1) writeini -n Points.ini %topic Points %points return %points } alias -l lookUpPoints { var %topic $+($chan,.,$nick) var %points $readini(Points.ini,%topic,Points) return %points } alias doaddpoints { if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt } var %topic $+($1,.,$2) var %points $calc($readini(Points.ini,%topic,Points) + $3) writeini -n Points.ini %topic Points %points echo -a Added points for %topic } alias dorempoints { var %topic $+($1,.,$2) remini -n Points.ini %topic Points echo -a Removed points for %topic } on *:text:!Pebbles:#:{ if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return } set -u10 %floodpoints On set -u30 %floodpoints. $+ $nick On msg # $nick You have total of $readini(Points.ini,$+(#,.,$nick),Points) Pebbles. } on $*:text:/!Pebbles (add|remove)/Si:#:{ if ($nick == Firestonetv #) { if ($0 < 3) { msg # Insufficient parameters: Use !Pebbles <add|remove> <user> [number] | return } writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1)) { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. } } else { msg $chan Only FirestoneTV can use this command. } } on !*:join:#:{ $+(.timerpoints.,#,.,$nick) 0 300 add.pts $+(#,.,$nick) add.pts $+(#,.,$nick) set %nachrichten. $+ $nick = 0 } on !*:part:#:$+(.timerpoints.,#,.,$nick) off alias -l add.pts { writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 1) } on *:TEXT:*:*: { if (%nachrichten. [ $+ [ $nick ] ] == 4) { set %nachrichten. $+ $nick 0 add.pts $+(#,.,$nick)} } else { inc %nachrichten. $+ $nick } .timer $+ $nick 1 300 unset %nachrichten. [ $+ [ $nick ] ] }