Last active
August 29, 2015 14:06
-
-
Save tobiasvl/9d516c94c90c4a74aa19 to your computer and use it in GitHub Desktop.
Twitch IRC bot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on *:text:!*:#: { | |
var %get $+(#,.,$1) | |
var %name $1 | |
var %text $readini(cmds.ini,%get,text) | |
if (!%text) { | |
/msg # | |
} | |
else { | |
if (%flood3) { return } | |
set -u0 %flood3 off | |
/msg # %text | |
} | |
} | |
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) { | |
/remini cmds.ini $+(#,.,$2) | |
/msg # Command $2 has been removed. | |
} | |
} | |
else { | |
/msg # $nick $+ , you do not have permission to use mod commands. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment