kick
menu * {
$iif($me isop $chan, kick):dialog -m kik kik
}
dialog kik {
title "Kick
size -1 -1 300 185
option pixels
list 1, 0 90 300 100, hsbar, vsbar
edit "" 2, 45 10 100 20
text "nick" 3, 15 12 30 20
text "Reason" 4, 5 37 35 20
text "Used reasons" 7, 5 65 100 20
edit "" 5, 45 35 250 20
button "go!" 6, 250 62 50 20
text "chan" 8, 155 12 30 20
edit "" 9, 190 10 100 20
}
alias f1 { if ($me isop $chan) dialog -m kik kik
}
on *:DIALOG:kik:init:0:{
did -a kik 9 $active
var %dd = $numtok(%reasons,44), %yy = 1
while ( %yy <= %dd ) {
did -a $dname 1 $gettok(%reasons,%yy,44)
inc %yy }
}
on *:DIALOG:kik:sclick:*:{
if ($did = 1) { did -ra kik 5 $did($dname,1).seltext }
if ($did = 6) { kick $did(9) $did(2) $did(5) | set %reasons $addtok(%reasons,$did(5),44) | did -a kik 1 $did(5) }
}
1) The vsbar is unnecessary as mIRC will put in the bar automatically if the list is longer than the space allocated. Also, (if you\'re going to leave it in) remove the comma between hsbar and vsbar
2) Rather than filling the list using the loop, use the /didtok command.
3) Use the same format for the dialog command that you have in your f1 alias in your menu access, or call the f1 alias from the menu
4) There is no check to ensure that the person kicking with this code has the ability to kick the person named in the code.