rendered paste bodyon *:INPUT:?: {
if ($1 == @bind) {
if (!$2 || !$3) {
notice $nick Invalid syntax. Please use @bind <commandname> <text>.
}
else {
writeini binds.ini binds $2 $encode($3-,m)
notice $nick $2 has been binded.
}
}
if ($1 == @unbind) {
if (!$2) {
notice $nick Invalid syntax. Please use: @unbind <commandname>.
}
else {
remini binds.ini binds $2
notice $nick $2 unbinded.
}
}
}
on *:OPEN:?: {
msg $nick 9,1[ 0Hello! 9][ 0Thank you for messaging me. 9]
msg $nick 9,1[ 0Please wait for this query to be 9accepted 0or 9denied0 9]
set %msg $1-
set %nick $nick
dialog -m test test
}
dialog test {
title "Query Accepter/Denier"
size -1 -1 100 65
option dbu
text "Message:" 4, 1 0 100 75
button "Accept", 1, 0 50 25 15
button "Deny", 2, 37 50 25 15
button "Cancel", 3, 75 50 25 15
}
on *:dialog:test:sclick:1:{
msg %nick 9,1[ 0Accepted 9]
dialog -c test
}
on *:dialog:test:sclick:2:{
msg %nick 9,1[ 0Denied 9]
close -m %nick
dialog -c test
}
on *:dialog:test:sclick:3:{
dialog -c test
}
on *:dialog:test:init:*:{
did -ca test 4 Message: %msg
}
on *:TEXT:*:?: {
if ($readini(binds.ini,binds,$remove($1,@))) {
msg $nick $decode($v1,m)
}
if ($1 == @commands) {
var %lines 1
while ($ini(binds.ini,binds,%lines)) {
set %bindlist %bindlist @ $+ $v1
inc %lines
}
msg $nick %bindlist
unset %bindlist
}
}