alright, so i patched it up a bit better now i think, except i got a 8 hour twitch ban atm, forgot to add something, and instead of checking for a number or off on the !repeat, i accidently made it so that it would spam the word / number i typed, sooo, imma have to wait.

just wondering now or that is any better.


the only section im missing atm is this section, that added commands can be used by common users.

Click to reveal..
on *:text:!*:#: {
var %get $+(#,.,$1)
var %name $1
var %text $readini(cmds.ini,n,%get,text)
if (!%text) {
/msg # No such command available.
}
else {
if (%flood3) { return }
set -u30 %flood3 On
/msg # %text
}
}

^ so thats the part i still want to get squished in, so ppl can actualy use the commands, the mods / me make using !addcom.

But this is what i got so far

Click to reveal..

;#########################
;Command and Repeat System
;#########################


on *:text:!*:#: {
if ($nick isop #) {
if ($1 == !add) {
if ($0 < 3) { msg # Insufficient parameters: Use #add !<command name> <text> | return }
writeini -n cmds.ini $+(#,.,$2) text $3-
/msg # $2 command added as $3-
}
elseif ($1 == !edit) {
if ($0 < 3) { msg # Insufficient parameters: Use #edit !<command name> <text> | return }
writeini -n cmds.ini $+(#,.,$2) text $3-
/msg # Edited $2 to $3-
}
elseif ($1 == !delete) {
if ($0 < 2) { msg # Insufficient parameters: Use !delete !<command name> | return }
/remini cmds.ini $+(#,.,$2}
/msg # Command $2 has been removed.
}
elseif ($1 == !repeat) {
if ($0 < 3) { msg # Insufficient parameters: Use !repeat !<command name> <time in minutes / off> | return }
if ($3 !isnum || $3 < 1) && $3 != off { msg # <time> must be number greater than 0 or off | return }
var %get $+(#,.,$2)
var %name $1
var %text $readini(cmds.ini,n,%get,text)
if !%text { msg # $2 does not exists. | return }
if $timer($+(repeat.,%t)) {
if $3 == off {
$+(.timerrepeat.,%t) off
msg # $2 turns off.
}
else { msg # $2 was already repeating. }
}
else {
if $3 == off { msg # $2 was never started yet. }
else {
$+(.timerrepeat.,%t) 0 $calc($3 * 60) msg # $replace(%text,|,-,$,-,%,-)
msg # $2 turns on. Auto repeat in $3 min $+ $iif($3 > 1,s) $+ .
}
}
}
}
}

else {
{msg # $nick $+ , you do not have permission to use mod commands.
}





Last edited by ChannelGank; 19/06/14 07:45 PM.