rendered paste bodydialog ircbots {
title "IRC Bots (un)assigner"
size -1 -1 184 110
option dbu
button "Assign", 3, 132 44 37 12
button "Close", 4, 116 24 37 12, cancel
button "Unassign Current", 5, 31 24 85 12
text "Welcome to the IRC Bots (un)assigner", 6, 45 8 93 8
button "List Bots", 1, 73 56 37 12
edit "", 2, 45 45 82 10
text "Enter Bot name:", 7, 2 46 40 8
button "Set Channel", 8, 15 69 154 12
button "Unset Channel", 9, 15 82 154 12
edit "", 10, 54 96 114 10, read
text "Set Channel:", 11, 16 97 34 8
}
alias /ircbots { dialog -ma ircbots ircbots }
alias dialog {
dialog -m ircbots ircbots
}
on *:dialog:ircbots:sclick:1:{
/bs botlist
}
on *:dialog:ircbots:sclick:3:{
if ($did(2) == $null) /did -a ircbots 2 Please enter a valid bot name.
if ($did(2) == $null) { halt }
/bs assign %chan $did(2)
}
on *:dialog:ircbots:sclick:5:{
/bs unassign %chan
}
on *:dialog:ircbots:sclick:8:{
/set %chan $active
/did -a ircbots 8 Channel Set.
/did -a ircbots 10 $active
}
on *:dialog:ircbots:sclick:9:{
/unset %chan
/did -a ircbots 9 Channel Unset.
/did -a ircbots 8 No Channel Set. Click to set it to the active channel.
}