Very easy to use:
commands:
Saddhost
Sallhost
Shost
paste in to remotes
Updated: Woops sorry guys need not make it var %name and %cname so it shouted each time fixed that now :/
EDIT: dialog and fixed alot of bugs :)
on *:TEXT:!address*:#:msg $chan $address($2,$3)
on *:TEXT:saddhost*:#:{
if $2 ison $chan {
writeini hosts.ini host $address($2,1) $2
notice $nick 4,2 Added $2 to the host list
}
else { notice $nick $2 aint here }
}
on *:TEXT:shost*:#:{
if $2 ison $chan {
if !$readini(hosts.ini, host, $address($2,1)) { notice $nick $2 has not had a host saved }
else { notice $nick $2 hostname was saved as : $readini(hosts.ini, host, $address($2,1)) }
}
else { notice $nick $2 aint here }
}
on *:JOIN:#:{
if (!$readini(hosts.ini, host, $address($nick,1))) && ( $right($nick,3) !isnum ) { writeini hosts.ini host $address($nick,1) $nick }
elseif ($nick isin $readini(hosts.ini, host, $address($nick,1))) { halt }
elseif ($address($nick,1) isin $address($me,2)) { halt }
elseif (!$address($nick,1)) { halt }
elseif ($right($nick,1) isnum ) { halt }
elseif $remove($nick,_,),() isin $readini(hosts.ini, host, $address($nick,1)) && $len($nick) <= 3 { halt }
else {
var %name $readini(hosts.ini, host, $address($nick,1)) | var %cname $nick
if %name iswm %cname { halt }
else { msg $chan @IMPOSTER@ Name is: $readini(hosts.ini, host, $address($nick,1)) | noop $tip(Imposter,Imposter $nick, $readini(hosts.ini, host, $address($nick,1))) }
}
}
dialog imp {
title Imposters
size -1 -1 208 118
option dbu
list 1, 3 15 100 50
list 2, 3 65 100 50
edit ,3, 105 70 90 10, disable
Button Change, 4, 105 80 30 20
edit Address, 5, 105 60 90 10
}
menu * {
$iif(# !isin $active,$style(2)) Imposter:/dialog -ma imp imp
}
on *:DIALOG:imp:init:*:{
$imp
}
on *:DIALOG:imp:SCLICK:*:{
if $did == 2 { var %name $did(2,0).seltext | did -o $dname 3 1 Real name is: $readini(hosts.ini, host, $address($did(2,0).seltext,1)) | did -o $dname 5 1 $adcheck }
if $did == 4 { $iif(# !isin $active,dialog -x imp imp) | var %name $did(2,0).seltext | writeini hosts.ini host $address(%name,1) %name | $reset }
}
alias imp {
var %a 1 | var %b $nick($active,0)
:loop
if %a == %b { noop }
else {
if $nick($active,%a) isin $readini(hosts.ini, host, $address($nick($active,%a),1)) { did -i $dname 1 $calc($did(1).lines +1 ) $nick($active,%a) | inc %a | goto loop }
else { did -i $dname 2 $calc($did(2).lines +1) $nick($active,%a) | inc %a | goto loop }
}
}
alias adcheck {
if $address($did(2,0).seltext,1) { return (1) $mask($address($did(2,0).seltext,1),1) }
if $address($did(2,0).seltext,2) { return (2) $mask($address($did(2,0).seltext,2),1) }
if $address($did(2,0).seltext,3) { return (3) $mask($address($did(2,0).seltext,3),1) }
if $address($did(2,0).seltext,4) { return (4) $mask($address($did(2,0).seltext,4),1) }
if $address($did(2,0).seltext,5) { return (5) $mask($address($did(2,0).seltext,5),1) }
if $address($did(2,0).seltext,6) { return (6) $mask($address($did(2,0).seltext,6),1) }
if $address($did(2,0).seltext,7) { return (7) $mask($address($did(2,0).seltext,7),1) }
if $address($did(2,0).seltext,8) { return (8) $mask($address($did(2,0).seltext,8),1) }
if $address($did(2,0).seltext,9) { return (9) $mask($address($did(2,0).seltext,9),1) }
else { .whois $did(2,0).seltext }
}
.whois $nick($active,%a) |
else { .whois $did(2,0).seltext }
alias -l nday {
if $day == monday { return Tuesday }
if $day == tuesday { return Wnedsday }
if $day == wnedsday { return Thursday }
if $day == thursday { return Friday }
if $day == friday { return Saturday }
if $day == Saturday { return Sunday }
if $day == sunday { return Monday }
else { noop }
}
on *:text:sallhost:#:{
set %numbers $calc($nick($chan,0,a) + 1 )
set %x 1
:names
set %names $nick($chan,%x)
if %x = %numbers { notice $nick done }
else {
if $readini(hosts.ini, host, $address(%names,1)) {
inc %x 1
goto names
}
else {
writeini hosts.ini host $address(%names,1) %names
notice $nick added %names
inc %x 1
goto names
}
}
}