Denemedim ama bu şekilde çalışır diye düşünüyorum.
Kod: Kodu kopyalamak için üzerine çift tıklayın!
/*
Addon: nbseen
Versiyon: v0.1
Yazan: Alience
Tarih: 14-09-2010
mIRC version: 7.1
*/
alias nbdll {
var %check = $dll($qt($+($scriptdir,db.dll)),Open,nblist $shortfn($+($scriptdir,nblist.db))))
if !$regex(%check,(S_OK|E_LABEL_IN_USE)) { echo $color(info text) *** nblist error: %check | halt }
%check = $dll($qt($+($scriptdir,db.dll)),Query,nblist $1-)
if $isid { return %check }
elseif $show && !$isid { echo $color(info text) *** nblist: %check }
}
alias nbsave {
.nbdll DELETE FROM list WHERE (strftime('%J','now') - strftime('%J',ctime) > 100)
if $regex($nbdll(select * FROM list WHERE nick = $+(',$1,') and network = $+(',$2,') and ip LIKE $+(',$regsubex($3,^.*@,$+($chr(37),@)),')),S_OK [^0]) {
.nbdll UPDATE list SET ctime = julianday('now') where nick = $+(',$1,') and network = $+(',$2,') and ip = $+(',$3,')
}
else {
.nbdll insert into list values( $+(',$1,') , $+(',$2,') , $+(',$3,') ,julianday('now'))
}
}
alias nbsrc {
return $gettok($nbdll(SELECT * FROM list WHERE network = $+(',$1,') AND ip LIKE $+(',$replace($2,*,%),') AND $+(nick!=,',$3,')),2,32)
}
alias nbget {
var %x = $remove($dll($qt($+($scriptdir,db.dll)),fetchrow,nblist $1),S_OK)
return $gettok(%x,$2,9)
}
on *:connect: { if !$ial { .ial on } }
on *:join:#: {
if $nick != $me {
userip $nick | .enable #adres
var %outstr = $null
if $nbsrc($iif($network,$network,$server),%adres2,$nick) {
var %i = $v1
echo -t $chan $+($str($chr(160),3),->) Daha önceki nickleri $+($chr(40),%i,$chr(41),:)
while %i > 0 {
if $len(%outstr $nbget(%i,1)) <= 750 {
%outstr = $+(%outstr,$iif(%outstr,$+($chr(44),$chr(32)),$null),$nbget(%i,1))
}
else { echo -t $chan $+($str($chr(160),3),->) %outstr | %outstr = $null }
dec %i 1
}
if %outstr { echo -t $chan $+($str($chr(160),3),->) %outstr }
echo $chan $chr(160)
}
nbsave $nick $iif($network,$network,$server) %adresfull
}
}
on *:open:?:*: {
var %outstr = $null
userip $nick | .enable #adres
if $nbsrc($iif($network,$network,$server),%adres2,$nick) {
var %i = $v1
echo -t $nick Daha önceki nickleri $+($chr(40),%i,$chr(41),:)
while %i > 0 {
if $len(%outstr $nbget(%i,1)) <= 750 {
%outstr = $+(%outstr,$iif(%outstr,$+($chr(44),$chr(32)),$null),$nbget(%i,1))
}
else { echo -t $nick $+($chr(160),->) %outstr | %outstr = $null }
dec %i 1
}
if %outstr { echo -t $nick $+($chr(160),->) %outstr }
echo $nick $chr(160)
}
nbsave $nick $iif($network,$network,$server) %adresfull
}
on *:quit: { if $nick != $me { nbsave $nick $iif($network,$network,$server) $fulladdress } }
alias query {
var %outstr = $null
!query $1
userip $nick | .enable #adres
if $nbsrc($iif($network,$network,$server),%adres2,$1) {
var %i = $v1
echo -t $1 Daha önceki nickleri $+($chr(40),%i,$chr(41),:)
while %i > 0 {
if $len(%outstr $nbget(%i,1)) <= 750 {
%outstr = $+(%outstr,$iif(%outstr,$+($chr(44),$chr(32)),$null),$nbget(%i,1))
}
else { echo -t $1 $+($chr(160),->) %outstr | %outstr = $null }
dec %i 1
}
if %outstr { echo -t $1 $+($chr(160),->) %outstr }
echo $1 $chr(160)
}
nbsave $1 $iif($network,$network,$server) %adresfull
}
#adres off
raw 340:*: {
set -e %adresfull $+($token($2,1,61),!,$right($token($2,2,61),-1))
set -e %adres2 $+(*!*@,$token($2,2,64))
.disable #adres | halt
}
#adres end