Skip to content

Instantly share code, notes, and snippets.

@tobiasvl
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobiasvl/9d516c94c90c4a74aa19 to your computer and use it in GitHub Desktop.
Save tobiasvl/9d516c94c90c4a74aa19 to your computer and use it in GitHub Desktop.
Twitch IRC bot
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