Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on $*:text:/^!repeat !?(\S+) (off|\d+)/iS:#:{
- if ($read(sreglist.txt,nw,$nick)) {
- var %command = $regml(1), %interval = $regml(2)
- if ($timer(command. $+ %command)) {
- if (%interval == off) .timercommand. $+ %command off
- if (%interval == off) msg $chan $$2 is no longer repeating
- else msg # ! $+ %command is already repeating
- }
- elseif ($readini(allcommands.ini,n,commands,%command)) {
- var %response = $v1
- .timercommand. $+ %command 0 $iif(%interval < 5,5,%interval) msg # $safe(%response)
- msg # %response
- }
- }
- }
- alias safe return $!decode( $encode($1,m) ,m)
- on $*:text:/^!addcom !?(\S+)/iS:#:{
- if ($read(sreglist.txt,nw,$nick)) && ($3 != $null) {
- msg $chan added $2 to commands!
- writeini allcommands.ini commands $regml(1) $3-
- var %text $read(commandsresonse.txt,1)
- if %text == $null {
- var %line the current commands and their info for the bot http://bit.ly/PBBcommands $+ , ! $+ $regml(1)
- }
- else {
- var %line %text ! $+ $regml(1)
- }
- write -l1 commandsresonse.txt %line
- }
- }
- on $*:text:/^!delcom !?(\S+)/iS:#:{
- if ($read(sreglist.txt,nw,$nick)) && ($2 != $null) {
- msg $chan removed $2 from commands!
- remini allcommands.ini commands $regml(1)
- var %text $read(commandsresonse.txt,1)
- if %text != $null {
- var %line $remove(%text,! $+ $regml(1))
- }
- write -l1 commandsresonse.txt %line
- }
- }
- on $*:text:/^!(\S+)/:#:{
- if ((%floodcom) || ($($+(%,floodcom. $+ $regml(1) $+,$2),3))) { return }
- set -u4 %floodcom $+ $regml(1) On
- if ($readini(allcommands.ini,n,commands,$regml(1))) msg # $v1
- }
Advertisement
Add Comment
Please, Sign In to add comment