oper olmayacak bir botta kullanılacaksa ,niye operserv komutlarıyla değiştirme ihtiyacı duydunuz ki?
henüz uyandım bir saat bile olmadı, konuyu görüp yazdım bir kod, şimdi bitti ,buraya atıyorum.denemek isteyen denesin... hata vs alınırsa bildirin çaresine bakarız.. syntax check/yazım kontrolü yaptım (olurda ayraç hatası vs gözden birşey kaçırmışmıyım diye) sorun yok... ama deneyip "iş üstünde" görmeniz gerek...
Kod: Kodu kopyalamak için üzerine çift tıklayın!
# .chanset #kanal +komutlar
# kanal üstünde aktif eder.
setudef flag komutlar
# komutlara erişimi olacak kullanıcılar : m = bot master | n = bot sahibi
set yetkiler "mn"
# !temizle komutunda kaç satır ile temizlenmesi isteniyor.
set temizsatir "15"
bind pubm - "*" kmt_pubs
proc kmt_pubs {nick uhost hand chan text} {
if {![channel get $chan komutlar]} { return 0 }
if {![matchattr [nick2hand $nick] $::yetkiler $chan]} {
puthelp "notice $nick :Komutları kullanmak için en az $::yetkiler flaglarına sahip olmalısınız..."
return 0
}
set kmt [lindex [split [string tolower $text]] 0]
set hedef [lindex [split [string tolower $text]] 1]
set neden [join [lrange [split [string tolower $text]] 2 end]]
switch -exact -- $kmt {
!deopla { if {[llength $hedef] eq 0} { puthelp "notice $nick :Kullanımı : $::lastbind <hedef-nick>"; return }
if {[onchan $hedef $chan] && [botisop $chan] && [isop $hedef $chan] && ![isbotnick $hedef]} {
puthelp "notice $nick :$hedef $chan kanalında deoplanıyor.."
pushmode $chan -o $hedef
flushmode $chan
} else {
puthelp "notice $nick :Houston bir sorunumuz var..."
}
}
!kick { if {[llength $hedef] eq 0} { puthelp "notice $nick :Kullanımı : $::lastbind <hedef-nick> <sebep>"
puthelp "notice $nick :Bir <sebep> belirtilmezse, öntanımlı olarak \"istek üzerine\" sebep olarak eklenecektir..."
return 0
}
if {[llength $neden] eq 0} { set neden "istek üzerine";}
if {[onchan $hedef $chan] && [botisop $chan] && ![isbotnick $hedef]} {
puthelp "notice $nick :$hedef ,$chan kanalında ,$neden sebebiyle kickleniyor..."
putkick $chan $hedef :$neden
} else {
puthelp "notice $nick :Houston sesim geliir mü?"
}
}
!voice { if {[llength $hedef] eq 0} { puthelp "notice $nick :Kullanımı : $::lastbind <hedef-nick>"; return }
if {[onchan $hedef $chan] && [botisop $chan] || [botishalfop $chan] && ![isvoice $hedef $chan]} {
puthelp "notice $nick :$hedef $chan kanalında voicelanıyor.."
pushmode $chan +v $hedef
flushmode $chan
} else {
puthelp "notice $nick :Houston nedir senden çektiğim böyle hıh?!..."
}
}
!banla { if {[llength $hedef] eq 0} { puthelp "notice $nick :Kullanımı : $::lastbind <hedef-nick>"; return }
if {[onchan $hedef $chan] && [botisop $chan] || [botishalfop $chan] && ![isbotnick $hedef]} {
puthelp "notice $nick :$hedef $chan kanalında banlanıyor.."
pushmode $chan +b $hedef
flushmode $chan
} else {
puthelp "notice $nick :Houston seninle benim bir sorunumuz olduğu kesin!..."
}
}
!temizle { if {[validchan $chan] && [botonchan $chan]} {
puthelp "notice $nick :$chan kanalı temizleniyor.."
puthelp "privmsg $chan :$chan kanalı için temizlik vakti..."
set i 0; set j "\00300,04 \u262A \003"
while {$i < $::temizsatir} { puthelp "privmsg $chan :$j"; incr i }
puthelp "privmsg $chan :$chan kanalında temizlik tamamlandı..."
} else {
puthelp "notice $nick :of Houston of...işimiz var seninle..."
}
}
default { return }
}
return 0
}
putlog "ok..."