mIRC Homepage
Posted By: glassdog dialog - 12/09/04 06:45 PM
I have a small clone detector i display the results from into a listbox in a dialog. I would like to add buttons to kick warn ban ect but cant seem to figure out how. this is the line that displays them to the listbox
/did -a cs- 2 $chr(160) $+ %no.of.c $+ $str($chr(160),6) $+ %ad $+ $str($chr(160),$calc(38 - $len(%ad))) $+ $gettok($hget(clonescan,%ad),1- $+ %no.of.c,44)
This is what the output in the list box looks like
2 *!*@someident.com nick1,nick2
2 *!*@someotherisp.net Nick1,nick2
3 *!*@moreclones.com nick1,nick2,nick3

i would like to be able to click on any given line of clones and perform ban/warn/kick/ect
any example of how this might be done would be great
thank you
Posted By: whatsthedillio Re: dialog - 12/09/04 09:18 PM
maybe something along the lines of this might help:
on *:DIALOG:dialogname:SCLICK:id:{
if ($did(id).sel != null) {
if ($input(No Text Selected,ok) = $true) || ($input(No Text Selected,ok) != $true) {
goto end
}
else {
tokenize 32 $did(id).seltext
;Now $1 = 2 $2 = *!*@someident.com $3 = nick1,nick2
;If you want to ban the nick you need to find the charecter
;number of comma (,)and use: tokenize number
var %banmask = $2
mode #channel +b %banmask
}
:end
}

you would have to change:
#channel to channel
and
id in $did(id) to the id number

hope that helped a little
wink

Posted By: glassdog Re: dialog - 12/09/04 10:45 PM
seems like that is on the right track but i get No Text Selected no matter if i click on text in the listbox or not
© mIRC Discussion Forums