Mirc Socket bot yapmak





Mirc Socket bot yapmak Ve Sunucuya Bağlantısını saglamak.

kodu @sdebug penceresine gelen bilgiye göre swalias’ı içine ekleyiniz
Önce mIRC’de yazı yazdığımız yerde yani command line’dan /sockopen bot komutunu yazarak botumuzu istediğimiz servera bağlıyoruz.
ßotu Otomatik Sokmak İcin

on 1:start: { bağlan }
alias bağlan {
if !$sock(bot) {
sockopen bot serveripadresi port
} }

yazaßilirsiniz

on *:sockopen:bot:{
if ($sockerr) { echo $color(info) -st Socket botun bağlantısı kesildi. | return }
swbot NICK BOTUN-NICKI
swbot USER IDENTD * * :USERNAME BURAYA
sockmark $sockname BOTUN-NICKI
}
on *:sockread:bot:{
if ($sockerr) { echo $color(info) -st Socket botun bağlantısı kesildi. | return }
var %; | sockread %; | tokenize 32 %;
if !$window(@sdebug) { window -k0 @sdebug } | aline -p @sdebug $timestamp < $1-
swalias $1-
}
alias swbot { if $sock(bot) { sockwrite -n bot $1- } }
alias swalias {
if $sock(bot) {
var %: = echo $color(info) -st > Socket bot:
if :VERSION iswm $4- { swbot NOTICE $gettok($gettok($1,1,33),1,58) : $+ $chr(1) $+ VERSION mIRC v6.17 Khaled Mardam-Bey $+ $chr(1) }
if :FINGER iswm $4- { swbot NOTICE $gettok($gettok($1,1,33),1,58) : $+ $chr(1) $+ FINGER guARdiANof[THE]Light $+ $chr(1) }
if $1 == PING { swbot PONG $2- }
if $2 == 474 { %: $4 kanalında banlı. }
if $2 == 366 { %: $4 kanalına girdi. }
if $2 == KICK && $4 == $sock(bot).mark { %: $3 kanalından %n tarafından kicklendi. $+($chr(40),$right($5-,-1),$chr(41)) | swbot JOIN $3 }
if $2 == PRIVMSG {
var %n = $gettok($gettok($1,1,33),1,58), %m = $right($4-,-1), %k = $3
if $istok(ahmet ahmet,%n,32) {
if .hop == $gettok(%m,1,32) { var %< = $iif($gettok(%m,2,32),$v1,%k) | swbot PART %< | swbot JOIN %< }
if .part == $gettok(%m,1,32) { var %< = $iif($gettok(%m,2,32),$v1,%k) | swbot PART %< }
if .join #* iswm %m { swbot JOIN $gettok(%m,2-,32) }
}
}
}
}
Not: Khaled Mardam-Bey YApms Oldugu Mirc Programından alıntıdır:)

Etiketler: , , ,

Yorum yapın