away scan
S.a
elimdeki /awayscan seklinde calisan bu code'yi bot'a ekleyip yarim saatte bir oto awayscan yapmasini ve neticesini benim belirledigim bir kanala msg atmasini saglayabilirmiyiz..
#awayscan on
alias awayscan {
var %chan
if ($hget(awayscan)) { hfree awayscan }
if ((!$1) && ($active !ischan)) { echo -a - | echo -a * /awayscan: you are not on a channel | echo -a - | halt }
if ($1) { %chan = $1 }
else { %chan = $active }
hmake awayscan $nick(%chan,0)
hadd awayscan chan %chan
hadd awayscan scan 1
hadd awayscan away 0
.who $hget(awayscan,chan)
echo -a Awayscan in %chan
}
raw 352:*:{
if (($hget(awayscan,scan) == 1) && ($hget(awayscan,chan) == $2)) {
if ($left($7,1) == G) {
hinc awayscan away 1
if (!$hget(awayscan,names)) { hadd awayscan names $6 }
else {
var %names = $hget(awayscan,names)
hadd awayscan names $+(%names,$chr(32),$6)
}
}
haltdef
}
}
raw 315:*:{
if (($hget(awayscan,scan) == 1) && ($hget(awayscan,chan) == $2)) {
var %away
echo -a Totally found $+(,$hget(awayscan,away),) away users
if ($hget(awayscan,away) > 0) {
%away = $hget(awayscan,names)
echo -a Away Users: %away
}
hfree awayscan
echo -a End of awayscan
haltdef
}
}
#awayscan end |