Kullanım : /cs [-nih] mask #kanal
-n parametresi ile belirtilen nicklere göre listeleme yaparsınız.
-i parametresi ile ident listelemesi yaparsınız.
-h parametresi ile host listelemesi yaparsınız.
* Mask içinde wildcards karakterlerini kullanabilirsiniz.
Örnek : /cs -n s* #nsohbet
search for (nick: s*!*@*) on #nsohbet
————————————————————————————————
Num Nick Address
————————————————————————————————
1. sdsd web@6EBDAD51.85CF735E.750395D6.IP
————————————————————————————————-
found 1 matches for s*!*@* - [0.156ms]
Şeklinde arama yapıp sonrasında listeme yapmış olacaktır.
alias -l a aline @cs $1-
alias -l stp { return $remove($1-,*,!,@) }
alias cs {
var %s = $ticks
if (!$1) { echo 2 -a * /cs: missing parameters | halt }
if (-* iswm $1) {
if ($1 = -n) { var %cs.search = $1, %cs.item = $+($2,!*@*), %cs.channel = $iif($3,$3,$chan), %cs.items = nick | goto search }
elseif ($1 = -h) { var %cs.search = $1, %cs.item = $+(*!*@,$2), %cs.channel = $iif($3,$3,$chan), %cs.items = host | goto search }
elseif ($1 = -i) { var %cs.search = $1, %cs.item = $+(*!,$2,@*), %cs.channel = $iif($3,$3,$chan), %cs.items ident | goto search }
}
elseif (-* !iswm $1) { var %cs.item = $1, %cs.channel = $iif($3,$3,$chan), %cs.items = everything | goto search }
:search
$iif(!$chan(%cs.channel).ial,who %cs.channel)
window -e @cs
a search for ( $+ %cs.items $+ : $replace(%cs.item,$stp(%cs.item),$+(4,$stp(%cs.item),)) $+ ) on %cs.channel
a 4 $str(-,100)
a Num $chr(9) Nick $chr(9) Address
a 4 $str(-,100)
var %c = 1
while ($ialchan(%cs.item,%cs.channel,%c)) {
a $+(,%c,.,) $chr(9) $replace($ialchan(%cs.item,%cs.channel,%c).nick,$stp(%cs.item),$+(4,$stp(%cs.item),)) $chr(9) $replace($ialchan(%cs.item,%cs.channel,%c).addr,$stp(%cs.item),$+(4,$stp(%cs.item),))
inc %c
}
a 4 $str(-,100)
a found $ialchan(%cs.item,%cs.channel,0) matches for $replace(%cs.item,$stp(%cs.item),$+(4,$stp(%cs.item),)) - $+([,$calc(($ticks - %s) /1000),ms,])
if ($ialchan(%cs.item,%cs.channel,0) = 0) {
clear @cs
a no matches for $replace(%cs.item,$stp(%cs.item),$+(4,$stp(%cs.item),)) were found on %cs.channel
}
}
on *:input:@cs:{ cs $1- }
raw 352:*:halt
raw 315:*:halt