Forum yada web siteleriniz de ki RSS verilerini sunucuya gönderebilirsiniz..
Kod: Kodu kopyalamak için üzerine çift tıklayın!
;-
alias _bot return IRCForumlari
alias _pass return 123321
alias _ident return IF
alias _username return 4
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
alias _oper return Bot botcuk
alias _sunucu return irc.sohbet.net
alias _port return 6667
alias _kanal return #IRCForumlari
;- Forum adresi
alias _site return
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
on *:start:sockopen bot $_sunucu $_port
alias bagla sockopen bot $_sunucu $_port
alias _nick return $remove($gettok($1,1,33),:)
alias swbot $iif($sock(bot).status == active,sockwrite -nt bot $1-)
on *:sockclose:bot:$+(.timer,bot) 1 2 sockopen bot $_sunucu $_port
on *:sockopen:bot:{
if ($sockerr) { sockclose bot | $+(.timer,bot) 1 2 sockopen bot $_sunucu $_port | returnex }
swbot NICK $+($_bot,$r(100,999999))
swbot USER $_ident "" " $+ $iif($host,$host,$ip) $_username
sockmark $sockname $_bot
}
on *:sockread:bot:{
if ($sockerr) { sockclose bot | $+(.timer,bot) 1 2 sockopen bot $_sunucu $_port | returnex }
var %;bot | sockread %;bot | tokenize 32 %;bot
if ($1 = ping) { swbot pong $remove($2,:) }
elseif $regex($2,/(001|433)/) { swbot oper $_oper | swbot ns ghost $_bot $_pass | swbot ns release $_bot $_pass | $+(.timer,_bot-nick) 1 3 swbot nick $_bot }
elseif $1 == error && $2 == :closing { sockclose bot | $+(.timer,bot) 1 2 sockopen bot $_sunucu $_port }
elseif $regex($2,/(473|475|471|474)/) { swbot sajoin $_bot $4 }
elseif $regex($2,/(481|411)/) { swbot oper $_oper | swbot nick $_bot | swbot nickserv identify $_pass | $iif($_supass,swbot os su $_supass) }
elseif ($2 == NICK) {
if $_nick($1) == $_bot { swbot ns ghost $_bot $_pass | swbot ns release $_bot $_pass | $+(.timer,_bot-nick) 1 3 swbot nick $_bot }
elseif $right($3,-1) == $_bot {
swbot nickserv identify $_pass
swbot oper $_oper
swbot mode $right($3,-1) +qHp-h
$+(.timer,_botgir) 1 5 swbot join $_kanal
$+(.timer,_mode) 1 10 swbot mode $_bot +SsQq
_çek
}
}
elseif $regex($2,/^PRIVMSG$/Si) && !$regex($3,/^#/) { if $4 == :VERSION { swbot NOTICE $_nick($1) VERSION $_username } }
elseif $regex($2,/^PART$/i) && $istok($_kanal,$3,32) {
if $regex($_nick($1),/ $+ $+(^,$_bot,$) $+ /Si) { swbot sajoin $_nick($1) $3 }
}
elseif $regex($2,/^KICK$/i) && $istok($_kanal,$3,32) {
if $regex($4,/ $+ $+(^,$_bot,$) $+ /Si) { swbot sajoin $4 $3 }
}
elseif $regex($2,/^JOIN$/i) {
if $regex($_nick($1),/ $+ $+(^,$_bot,$) $+ /Si) {
swbot mode $right($3,-1) -qao+h $str($+($_nick($1),$chr(32)),5)
swbot mode $_nick($1) +qHp-h
_çek
}
}
}
alias _tr return $replace($1-,Ö,ö,Ç,ç,Ä°,i,ö,ö,ç,ç,ü,ü,ÅŸ,ş,ı,ı,Å?,ş,ÄŸ,ğ,Ãœ,ü,Ä?,ğ,$chr(39),-)
alias _çek $+(.timer,rss) 0 20 _rss
alias _rss {
sockclose rss
sockopen -e rss $_site 443
}
alias _veri {
var %:veri = 1 | while %:veri <= $lines(konu.txt) {
swbot privmsg $_kanal $+(:,$read(konu.txt,%:veri))
inc %:veri
}
.remove konu.txt
}
on *:sockopen:rss:{
if ($sockerr) { .sockclose $sockname | return }
sockwrite -nt $sockname GET /external.php?type=RSS2 HTTP/1.1
sockwrite -nt $sockname Host: $sock($sockname).addr
sockwrite -nt $sockname Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, */*
sockwrite -nt $sockname Accept-Language: tr-TR
sockwrite -nt $sockname User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
sockwrite -nt $sockname Connection: Keep-Alive
sockwrite -nt $sockname $crlf
}
on *:sockread:rss:{
if ($sockerr) { .sockclose $sockname | return }
var %:rss | sockread -f %:rss | tokenize 32 %:rss
if $regex($1-,/<title>(.+)<\/title>/Si) { .hadd -ms Forum Title $_tr($remove($regml(1),<![CDATA[,]]>)) }
elseif $regex($1-,/<link>(.+)<\/link>/Si) { .hadd -ms Forum Link $regml(1) }
elseif $regex($1-,/<pubDate>(.+)<\/pubDate>/Si) { .hadd -ms Forum Tarih $remove($regml(1),GMT) }
elseif $regex($1-,/<category domain=".+">(.+)<\/category>/Si) { .hadd -ms Forum Kategori $_tr($remove($regml(1),<![CDATA[,]]>)) }
elseif $regex($1-,/<dc:creator>(.+)<\/dc:creator>/Si) {
if !$read(link.txt,w,$hget(Forum,Link)) {
.write link.txt $hget(Forum,Link)
.write konu.txt
.write konu.txt 4Title: $hget(Forum,Title)
.write konu.txt 4Link: $hget(Forum,Link)
.write konu.txt 4Kategori: $hget(Forum,Kategori) 2/ 4Tarih: $hget(Forum,Tarih) 2/ 4Yazar: $_tr($regml(1))
.write konu.txt
sockclose $sockname | _veri
}
}
}