Simple (v)Host retriever in dialog form. i made the dialog, PunkTuReD coded everything else, cuz im kinda newbish still at that part.
put in remotes.
enjoi
menu * {
Host Getter: dialog -dm vhost vhost
}
dialog vhost {
title "Host Getter :)"
size -1 -1 175 132
option dbu
list 1, 1 12 60 45, sort size vsbar
text "Channels List:", 2, 3 5 48 7
list 3, 114 12 60 45, sort size vsbar
text "Nicks in selected channel:", 4, 108 5 64 7
edit "", 5, 34 95 102 29, read multi
text "Host of selected nick:", 6, 35 88 59 8
button "Get Host", 7, 115 58 50 12
button "Get Nicks ", 8, 2 58 50 12
button "Done", 9, 140 116 31 12, flat multi ok cancel
}
on *:dialog:vhost:*:*: {
var %a = $dname, %b = $devent, %c = $did
if (%b == INIT) { fill.chans }
if (%b == SCLICK) {
if (%c == 8) {
if ($did(1).seltext) { fill.nicks $did(1).seltext }
else { echo -a ***** Please select a channel. }
}
if (%c == 7) {
if ($did(3).seltext) { fill.host $did(3).seltext }
else { echo -a ***** Please select a nick. }
}
if (%c == 9) { dialog -x vhost vhost }
}
}
alias fill.chans {
did -r vhost 1
var %a = $chan(0)
while (%a) { did -a vhost 1 $chan(%a) | dec %a }
}
alias fill.nicks {
var %a = 1
var %b = $nick($$1,0)
did -r vhost 3
while (%a <= %b) { did -a vhost 3 $nick($$1,%a) | inc %a }
}
alias fill.host { did -ra vhost 5 $address($$1,2) }
the only 3 identifiers it uses are
$nick $chan and $address
most servers support them, so there is no need to say where it works because we would have to list almost every server out there.
we never said what server it was made on, so how do you know you tried it on "another" server? what server did you try it on?
ill look into it.
hi
better dont use "menu *" une "menu nicklist,menubar,channel,status" because if any one use this code and he have a game picwin he will get "Host Getter" and that is not in place
menu nicklist,menubar,channel,status {
Host Getter: dialog $iif($dialog(vhost),-v,-dm vhost) vhost
}
what is that ?
button "Done", 9, 140 116 31 12, flat multi ok cancel
u need only that
button Done, 9, 140 116 31 12, ok
and remove if (%b == 9) { dialog -x vhost vhost }
and u can do this if u want remove the alias fill.chans and do this
if (%b == init) didtok %a 1 32 $regsubex($str(.,$chan(0)),/./g,$chan(\n) $+ $chr(32))
but you dont need for all that u can only dou this
alias hostnick if ($1 ison #) echo -a $address($v1,2)
type /hostnick
for them 2 alias you can do this as well
alias -l fill.nicks { did -r vhost 3 | didtok vhost 3 32 $regsubex($str(-,$nick($1,0)),/(.)/g,$+($nick($1,\n),$chr(32))) }
and
alias -l fill.chans { did -r vhost 1 | didtok vhost 1 32 $regsubex($str(-,$chan(0)),/(.)/g,$+($chan(\n),$chr(32))) }
just a diff way to do them.
i know this can be alot neater with $iif's etc etc etc but so Kirbeh_Pr0nz could get a look at it, ive kept it simple.
menu * {
Host Getter: dialog -dm vhost vhost
}
dialog vhost {
title "Host Getter :)"
size -1 -1 175 132
option dbu
list 1, 1 12 60 45, sort size vsbar
text "Channels List:", 2, 3 5 48 7
list 3, 114 12 60 45, sort size vsbar
text "Nicks in selected channel:", 4, 108 5 64 7
edit "", 5, 34 95 102 29, read multi
text "Host of selected nick:", 6, 35 88 59 8
button "Get Host", 7, 115 58 50 12
button "Get Nicks ", 8, 2 58 50 12
button "Done", 9, 140 116 31 12, flat multi ok cancel
}
on *:dialog:vhost:*:*: {
var %a = $devent, %b = $did
if (%a == INIT) { fill.chans }
if (%a == SCLICK) {
if (%b == 8) { $iif(($did(1).seltext),fill.nicks $did(1).seltext,echo -a ***** Please select a channel.) }
if (%b == 7) { $iif(($did(3).seltext),did -ra vhost 5 $address($did(3).seltext,2),echo -a ***** Please select a nick.) }
if (%b == 9) { dialog -x vhost vhost }
}
}
alias fill.chans {
did -r vhost 1
var %a = $chan(0)
while (%a) { did -a vhost 1 $chan(%a) | dec %a }
}
alias fill.nicks {
did -r vhost 3
var %a = 1, %b = $nick($$1,0)
while (%a <= %b) { did -a vhost 3 $nick($$1,%a) | inc %a }
}