rendered paste body if ($hget(binds) == $null) { hmake binds }
if ($exists(binds.db) == $true) { hload binds binds.db }
if ($mid($1-,1,$len(%trigger)) == %trigger) {
tokenize 32 $mid($1-,$calc($len(%trigger) + 1) $+ -)
}
else { halt }
if ($hget(binds,$1) != $null) {
.msg $chan $v1
}
if ($ulevel >= 4) {
if ($1 == bind) {
if ($3 == $null) { .notice $nick %beg Bind %mid Specify [command] [text] %end }
else {
hadd binds $2 %beg $2 %mid $3- %end
.notice $nick %beg Bind %mid bound $2 to $3- $+ %end
hsave binds binds.db
}
}
}
if ($ulevel >= 4) {
if ($1 == unbind) {
if ($2 == $null) { .notice $nick %beg Unbind %mid Specify [command] %end
}
else {
if ($hget(binds,$2) == $null) { .notice $nick %beg Unbind %mid Command doesnt exist. %end }
else {
hdel binds $2
.notice $nick %beg Unbind %mid Successfully unbound $2 $+ %end
hsave binds binds.db
}
}
}
}