Giriş

Orijinalini görmek için tıklayınız : Mirc Botar İçin Greet/Takım Sistemi


SuLh
06 Eylül 2015, 14:32
Daha önce kendi mirc botumda kullandığım bi sistem.

on *:text:*:?: {
if $regex($1,^(!|.)greet$) {
if ($2 == $null) { msg $nick Kullanimi !greet ekle MESAJ seklindedir. }
if ($3 == $null) { msg $nick Lutfen bir greet mesaji giriniz. }
if ($2 == ekle) {
if $read(greet.txt,w,$nick $+ *) {
.msg $nick $+(",$nick,") greet mesajiniz degistirildi: $3-
.write -dl $+ $readn greet.txt
}
else { msg $nick Greet mesajiniz degistirildi: $3- }
set %greetmesaj $3-
who $nick
set %kayitli $nick

}
if ($2 == sil) {
if $read(greet.txt,w,$nick $+ *) {
.write -dl $+ $readn greet.txt
msg $nick Greet mesajiniz silindi.
}
}

}
if $regex($1,^(!|.)takim$) {
if ($2 == BJK) { set %takim 3[1,0 Beşik0,1taş 3] }
if ($2 == FB) { set %takim 3[8,2 Fener2,8bahce 3] }
if ($2 == GS) { set %takim 3[4,8 Galata8,4saray 3] }
if ($2 == TS) { set %takim 3[5,10 Trab10,5zon 3] }
if $read(takim.txt,w,$nick $+ *) {
.msg $nick $+(",$nick,") takiminiz degistirildi. : %takim
.write -dl $+ $readn takim.txt
}
else { msg $nick Takiminiz degistirildi: %takim }
who $nick
set %takimnick $nick
}

}

raw 352:*: {
if $6 == %kayitli {
haltdef
if r isin $7 { .write greet.txt %kayitli $+ $chr(11) $+ %greetmesaj }
else { msg %kayitli Nickiniz kayitsiz. }
unset %kayitli
unset %greetmesaj
}
if $6 == %takimnick {
haltdef
if r isin $7 { .write takim.txt %takimnick $+ $chr(11) $+ %takim }
else { msg %takimnick Nickiniz kayitsiz. }
unset %takimnick
unset %takim
}
}

on *:rawmode:#: {
if ($2 == $me) { return }
if ($istok(%yetkili,$chan,32)) { return }
if (*+*h* iswm $1) {
msg $chan $2 yardimci operator konumuna gectiniz. (1,7 4. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11)
}
if $read(greet.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5]
}
return
}
}
if (*+*q* iswm $1) {
sajoin $2 #staff
os raw svsmode $2 +wq
chghost $2 $+($gettok($chan,1,$asc(#)),.,Founder.Domain.Net)
msg $chan $2 kanal sahibi konumuna gectiniz. (1,7 1. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11) ~
}
if $read(greet.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5] ~
}
return
}
if (*+*a* iswm $1) {
sajoin $2 #staff
chghost $2 $+($gettok($chan,1,$asc(#)),.,Sop.Domain.Net)
msg $chan $2 super operator konumuna gectiniz. (1,7 2. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) { .msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11) ~ }
if $read(greet.txt,w,$+($2,$chr(11),*)) { .msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5] }
return
}
if (*+*o* iswm $1) {
sajoin $2 #staff
chghost $2 $+($gettok($chan,1,$asc(#)),.,Operator.Domain.Net)
msg $chan $2 operator konumuna gectiniz. (1,7 3. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) { .msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11) }
if $read(greet.txt,w,$+($2,$chr(11),*)) { .msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5] }
return
}

}

}


Not: %yetkili değişkeninde #opers gibi kanallara yansımaması için kullanabilirsiniz. //set %yetkili #opers #adwords gibi.

IRCROOT
06 Eylül 2015, 15:41
Hangi takımlıysa kanalı o şekilde temizlese iyi olurdu nomercydeki gibi.

SuLh
06 Eylül 2015, 16:30
Sadece özeli kaplayan bir text eventi bu. Onun için # operatörü kullanmalı ve if koşuluyla nick sorgusu yapılıp temizle aliası tetiklenmelidir.

on *:text:!temizle:#: {
if ($nick isop $chan) {
if $read(takim.txt,w,$+($2,$chr(11),*)) {
if be* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32)) { temizlebjk }
}
}
}


alias temizlebjk {
buraya beşiktaş temizlemesi.
}

gibi yapabilirsin.

IRCROOT
06 Eylül 2015, 18:51
Anladım sagolasın. Takımı ekli olmayanlarda TÜRKİYE yazsa olmaz mı öyle, birde kanallara sajoinlenmiyor #fenerbahçe, #beşiktaş vs vs.

SuLh
07 Eylül 2015, 13:13
rawmode eventi içinde ki


if $read(takim.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11) ~
}


satırlarının altına

else { .msg $chan $+([,Takim,]) ~ Turkiye! ~ }


satirini eklersen dediğin olur. sajoin olayi icin,

yine


if $read(takim.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11)
}


satirinin icine, yani .msg $chan satirinin hemen üstüne bir if sorgusu yaparak yapabilirsin.

if be* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32)) { sajoin $2 #beşiktaş }
elseif *fe* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32)) { sajoin $2 #fenerbahce }
elseif *ga* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32)) { sajoin $2 #galatasaray }
elseif *tra* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32)) { sajoin $2 #trabzonspor }

IRCROOT
07 Eylül 2015, 22:33
tam olarak nereye eklicem hocam kodlar anlamıyorum fazla.

SuLh
07 Eylül 2015, 23:07
on *:text:*:?: {
if $regex($1,^(!|.)greet$) {
if ($2 == $null) { msg $nick Kullanimi !greet ekle MESAJ seklindedir. }
if ($3 == $null) { msg $nick Lutfen bir greet mesaji giriniz. }
if ($2 == ekle) {
if $read(greet.txt,w,$nick $+ *) {
.msg $nick $+(",$nick,") greet mesajiniz degistirildi: $3-
.write -dl $+ $readn greet.txt
}
else { msg $nick Greet mesajiniz degistirildi: $3- }
set %greetmesaj $3-
who $nick
set %kayitli $nick

}
if ($2 == sil) {
if $read(greet.txt,w,$nick $+ *) {
.write -dl $+ $readn greet.txt
msg $nick Greet mesajiniz silindi.
}
}

}
if $regex($1,^(!|.)takim$) {
if ($2 == BJK) { set %takim 3[1,0 Beşik0,1taş 3] }
if ($2 == FB) { set %takim 3[8,2 Fener2,8bahce 3] }
if ($2 == GS) { set %takim 3[4,8 Galata8,4saray 3] }
if ($2 == TS) { set %takim 3[5,10 Trab10,5zon 3] }
if $read(takim.txt,w,$nick $+ *) {
.msg $nick $+(",$nick,") takiminiz degistirildi. : %takim
.write -dl $+ $readn takim.txt
}
else { msg $nick Takiminiz degistirildi: %takim }
who $nick
set %takimnick $nick
}

}

raw 352:*: {
if $6 == %kayitli {
haltdef
if r isin $7 { .write greet.txt %kayitli $+ $chr(11) $+ %greetmesaj }
else { msg %kayitli Nickiniz kayitsiz. }
unset %kayitli
unset %greetmesaj
}
if $6 == %takimnick {
haltdef
if r isin $7 { .write takim.txt %takimnick $+ $chr(11) $+ %takim }
else { msg %takimnick Nickiniz kayitsiz. }
unset %takimnick
unset %takim
}
}

on *:rawmode:#: {
if ($2 == $me) { return }
if ($istok(%yetkili,$chan,32)) { return }
if (*+*h* iswm $1) {
msg $chan $2 yardimci operator konumuna gectiniz. (1,7 4. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11)
}
else { .msg $chan $+([,Takim,]) ~ Turkiye! ~ }
if $read(greet.txt,w,$+($2,$chr(11),*)) {
if be* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #beşiktaş }
elseif *fe* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #fenerbahce }
elseif *ga* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #galatasaray }
elseif *tra* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #trabzonspor }
.msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5]
}
return
}
}
if (*+*q* iswm $1) {
sajoin $2 #staff
os raw svsmode $2 +wq
chghost $2 $+($gettok($chan,1,$asc(#)),.,Founder.Domain.Net)
msg $chan $2 kanal sahibi konumuna gectiniz. (1,7 1. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) {
if be* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #beşiktaş }
elseif *fe* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #fenerbahce }
elseif *ga* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #galatasaray }
elseif *tra* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #trabzonspor }
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11) ~
}
else { .msg $chan $+([,Takim,]) ~ Turkiye! ~ }
if $read(greet.txt,w,$+($2,$chr(11),*)) {
.msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5] ~
}
return
}
if (*+*a* iswm $1) {
sajoin $2 #staff
chghost $2 $+($gettok($chan,1,$asc(#)),.,Sop.Domain.Net)
msg $chan $2 super operator konumuna gectiniz. (1,7 2. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) {
if be* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32)) { sajoin $2 #beşiktaş }
elseif *fe* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #fenerbahce }
elseif *ga* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #galatasaray }
elseif *tra* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #trabzonspor }
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11) ~
}
else { .msg $chan $+([,Takim,]) ~ Turkiye! ~ }
if $read(greet.txt,w,$+($2,$chr(11),*)) { .msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5] }
return
}
if (*+*o* iswm $1) {
sajoin $2 #staff
chghost $2 $+($gettok($chan,1,$asc(#)),.,Operator.Domain.Net)
msg $chan $2 operator konumuna gectiniz. (1,7 3. Seviye )
if $read(takim.txt,w,$+($2,$chr(11),*)) {
if be* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32)) { sajoin $2 #beşiktaş }
elseif *fe* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #fenerbahce }
elseif *ga* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #galatasaray }
elseif *tra* iswm $gettok($read(takim.txt,w,$+ $2 $+ *),2,32) { sajoin $2 #trabzonspor }
.msg $chan $+([,Takim,]) ~ $gettok($read(takim.txt,w,$2 $+ *),2,11)
}
else { .msg $chan $+([,Takim,]) ~ Turkiye! ~ }
if $read(greet.txt,w,$+($2,$chr(11),*)) { .msg $chan $+([,$2,]) ~ 5[ $gettok($read(greet.txt,w,$2 $+ *),2,11) 5] }
return
}

}

}


on *:text:!temizle:#: {
if ($nick isop $chan) {
if $read(takim.txt,w,$+($nick,$chr(11),*)) {
if be* iswm $gettok($read(takim.txt,w,$+ $nick $+ *),2,32)) { set %temizchan $chan | temizlebjk }
elseif *fe* iswm $gettok($read(takim.txt,w,$+ $nick $+ *),2,32)) { set %temizchan $chan | temizlefb }
elseif *ga* iswm $gettok($read(takim.txt,w,$+ $nick $+ *),2,32)) { set %temizchan $chan | temizlegs }
elseif *tra* iswm $gettok($read(takim.txt,w,$+ $nick $+ *),2,32)) { set %temizchan $chan | temizlets }
}
else { .timer 50 0 msg $chan $chr(3) | .timer 1 2 msg $chan Kanal temizlenmistir. }
}
}


alias temizlebjk {
buraya beşiktaş temizlemesi.
}
alias temizlefb {
buraya fenerbahçe temizlemesi.
}
alias temizlets {
buraya trabzonspor temizlemesi.
}
alias temizlegs {
buraya galatasaray temizlemesi.
}


istedikerinin tamamini ekledim. sadece aliaslar içine takımların temizlemesini atman yeterli.