PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
alias F8 dialog -m is-away is-away
alias is-away dialog -m is-away is-away
on *:CONNECT:{ .timer 0 60 is.away.auto | if ($group(#is-away.reset).status == on) && (%is-away) { away %is-away.msg } }
dialog is-away {
title "Auto-Away"
size -1 -1 134 148
option dbu
box "Away Mesajı:", 1, 0 0 134 29
edit "", 2, 3 7 128 10, autohs
check "Rumuz:", 3, 4 17 22 10
edit "", 4, 27 17 30 10, autohs
check "Tekrar girdiginde away ol", 5, 60 17 70 10
box "", 6, 0 27 134 19
check "Auto-away zamanini ayarla", 7, 4 34 80 10
edit "", 8, 90 33 21 10, right
text "Dakikalar", 9, 112 35 40 8
box "Away Messajı Görünümü", 10, 0 48 134 87
check "Mesaj görüntüleme sıklığı", 11, 4 55 80 10
edit "", 12, 90 54 21 10, right
text "Dakikalar", 13, 112 56 40 8
radio "Tüm Kanallar:", 14, 4 64 50 10
radio "Sadece:", 15, 4 73 30 10
button "Ekle/Kaldır", 16, 40 73 25 10, flat
combo 17, 3 83 62 50, size sort
radio "Kabul ediliyor", 18, 70 73 32 10
button "Ekle/Kaldır", 19, 106 73 25 10, flat
combo 20, 69 83 62 50, size sort
button "", 21, 0 136 100 12
button "OK", 22, 101 136 33 12, ok default
}
on *:DIALOG:is-away:EDIT:*:{
if ($did == 2) { set %is-away.msg $did(2) }
if ($did == 4) { set %is-away.nick $puttok(%is-away.nick,$did(4),2,32) }
if ($did == 8) { set %is-away.auto $puttok(%is-away.auto,$did(8),2,32) }
if ($did == 12) { set %is-away.disp $puttok(%is-away.disp,$did(12),2,32) }
if ($did == 17) { did -t $dname 16 | return }
if ($did == 20) { did -t $dname 19 | return }
did -t $dname 22
}
on *:DIALOG:is-away:SCLICK:*:{
if ($did == 3) { set %is-away.nick $puttok(%is-away.nick,$iif($did(3).state == 1,on,off),1,32) | update }
if ($did == 5) { if ($did(5).state == 1) { .enable #is-away.reset } | else { .disable #is-away.reset } | update }
if ($did == 7) { set %is-away.auto $puttok(%is-away.auto,$iif($did(7).state == 1,on,off),1,32) | update }
if ($did == 11) { set %is-away.disp $puttok(%is-away.disp,$iif($did(11).state == 1,on,off),1,32) | update }
if ($did == 14) { unset %is-away.chan | update }
if ($did == 15) { set %is-away.chan only | update }
if ($did == 16) {
if ($did(17) isin %is-away.only) { set %is-away.only $remtok(%is-away.only,$did(17),1,32) }
elseif ($left($did(17),1) == $chr(35)) { set %is-away.only $addtok(%is-away.only,$did(17),32) }
update
}
if ($did == 18) { set %is-away.chan exclude | update }
if ($did == 19) {
if ($did(20) isin %is-away.exclude) { set %is-away.exclude $remtok(%is-away.exclude,$did(20),1,32) }
elseif ($left($did(20),1) == $chr(35)) { set %is-away.exclude $addtok(%is-away.exclude,$did(20),32) }
update
}
if ($did == 21) { away $iif(!$away,%is-away.msg) | update }
}
on *:DIALOG:is-away:INIT:0:{
.timeris-awaydtitle -o 0 1 is.away.dtitle
if (!%is-away.nick) { set %is-away.nick off awaynick }
if (!%is-away.auto) { set %is-away.auto off 30 }
if (!%is-away.disp) { set %is-away.disp off 30 }
update
}
alias is.away.dtitle { if ($dialog(is-away)) { dialog -t is-away Auto-Away $iif($away,$+($chr(40),$duration($awaytime),$chr(41))) } }
alias away {
if (!$1) {
away
.timerawaymsg off
if %is-away.oldnick { nick %is-away.oldnick | unset %is-away.oldnick }
unset %is-away
is.away.disp back
}
else {
away $1-
set %is-away on
if ($gettok(%is-away.nick,1,32) == on) { set %is-away.oldnick $me | nick $gettok(%is-away.nick,2-,32) }
if ($gettok(%is-away.disp,1,32) == on) { .timerawaymsg 0 $calc($gettok(%is-away.disp,2,32) * 60) is.away.disp away }
is.away.disp away
}
}
alias is.away.auto {
if ($gettok(%is-away.auto,1,32) !== on) || ($away) { return }
elseif ($idle > $calc($gettok(%is-away.auto,2,32) * 60)) { away %is-away.msg }
}
alias is.away.disp {
if (%is-away.chan == only) {
var %x = $numtok(%is-away.only,32)
while %x { if ($me ison $gettok(%is-away.only,%x,32)) { describe $gettok(%is-away.only,%x,32) is $1 $iif($awaymsg,$+($chr(40),$awaymsg,$chr(41))) } | dec %x }
}
elseif (%is-away.chan == exclude) {
var %x = $chan(0)
while %x { if ($chan(%x) !isin %is-away.exclude) { describe $chan(%x) is $1 $iif($awaymsg,$+($chr(40),$awaymsg,$chr(41))) } | dec %x }
}
else {
var %x = $chan(0)
while %x { describe $chan(%x) is $1 $iif($awaymsg,$+($chr(40),$awaymsg,$chr(41))) | dec %x }
}
}
alias -l update {
did -t $dname 22
did -o $dname 2 1 $iif($awaymsg,$awaymsg,%is-away.msg)
did -o $dname 4 1 $gettok(%is-away.nick,2-,32)
if ($gettok(%is-away.nick,1,32) == on) { did -c $dname 3 | did -e $dname 4 }
else { did -u $dname 3 | did -b $dname 4 }
did $iif($group(#is-away.reset).status == on,-c,-u) $dname 5
did -o $dname 8 1 $gettok(%is-away.auto,2,32)
if ($gettok(%is-away.auto,1,32) == on) { did -c $dname 7 | did -e $dname 8 }
else { did -u $dname 7 | did -b $dname 8 }
did -o $dname 12 1 $gettok(%is-away.disp,2,32)
if ($gettok(%is-away.disp,1,32) == on) { did -c $dname 11 | did -e $dname 12 }
else { did -u $dname 11 | did -b $dname 12 }
did -u $dname 14,15,18
did -c $dname $iif(%is-away.chan == only,15,$iif(%is-away.chan == exclude,18,14))
did -r $dname 17,20
var %x $numtok(%is-away.only,32) | while %x { did -a $dname 17 $gettok(%is-away.only,%x,32) | dec %x }
var %x $numtok(%is-away.exclude,32) | while %x { did -a $dname 20 $gettok(%is-away.exclude,%x,32) | dec %x }
did -a $dname 21 $iif($away,Set Back,Set Away)
}
#is-away.reset off
#is-away.reset end
Aha buuyr sana 0 kilometre auto-away kodu..