rendered paste bodyon *:text:*:#:{
if ($1 == trigger) {
if ($ulevel == 5) {
if (!$2) {
.notice $nick 0,1• trigger • Incorrect Syntax. trigger <new trigger>
}
elseif ($len($2) != 1) {
.notice $nick 0,1• trigger • Trigger's can only contain 1 character.
}
else {
.set %trigger $2
.notice $nick 0,1• trigger • trigger set to: $2
}
}
else {
.notice $nick 0,1• trigger • You do not have enough access to perform this command.
halt
}
}
if ($1 == %trigger $+ bind) {
if ($ulevel >= 4) {
if ($2 == add) {
if (!$3) || (!$4) {
.notice $nick 0,1• bind • Incorrect Syntax. %trigger $+ bind <add/del/list>
halt
}
else {
.writeini s.ini Binds $3 $encode($4-,m)
.notice $nick 0,1• bind • Successfully bound $qt(%trigger $+ $3) to: $qt($4-)
}
halt
}
if ($2 == del) {
if (!$3) {
.notice $nick 0,1• bind • Incorrect Syntax. %trigger $+ bind del <name>
halt
}
elseif (!$readini(s.ini,Binds,$3)) {
.notice $nick 0,1• bind • $qt($3) doesn't exist in my database.
halt
}
else {
.remini s.ini Binds $3
.notice $nick 0,1• bind • Successfully unbound $qt(%trigger $+ $3)
}
halt
}
if ($2 == list) {
set %x 1
while (%x <= $ini(s.ini,Binds,0)) {
if ($readini(s.ini, Binds, $ini(s.ini,Binds,%x))) {
set %binds %binds %trigger $+ $ini(s.ini,Binds,%x)
}
inc %x
}
unset %x
.notice $nick 0,1• bind • $iif(%binds != $null,%binds,None.)
unset %binds
}
else {
.notice $nick 0,1• bind • Incorrect Syntax. %trigger $+ bind <add/del/list>
}
halt
}
else {
.notice $nick 0,1• bind • You do not have enough access to perform this command.
}