IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   Eggdrop, NeoStats, BNC (https://www.ircforumlari.net/eggdrop-neostats-bnc/)
-   -   cycle utimer (https://www.ircforumlari.net/eggdrop-neostats-bnc/916708-cycle-utimer.html)

Raxs 16 Mayıs 2021 13:35

cycle utimer
 
Merhaba arkadaşlar cycle.tcl içerisinde utimer ile başlayan timer'ları dur komutu verdiğimizde tamamını durdurmak için nasıl bir kod eklememiz lazım konuyla ilgili yardımlarınıza ihtiyacım var


PHP- Kodu:

set pwhost "kolay.org"
set listfile [open host.txt r]
set nickflist [split [subst -nocommands [read $listfile]] \n]

##### Bota baslama komutunu verecek kisinin nickini girin #####
set authorized "Maximum"

##### Services adresini girin. #####
set servicesadr "services.kolay.org"
set logit 1
set logchany 
"#bot"
 
proc pwjoin {what what2 what3 what4 what5 what6 what7 what8 what9} {
 global 
kanal logit logchany
 
if {$logit == 1} { 
   
puthelp "PRIVMSG $logchany :$what Kanala sokuluyor --> $what9
 
}
 
putquick "os :raw :$what join $what9 "
 
utimer $what2 "pwpart $what $what3 $what $what2 $what3 $what4 $what5 $what6 $what7 $what8 $what9"
}

proc pwpart {whad whad2 oldu1 oldu2 oldu3 oldu4 oldu5 oldu6 oldu7 oldu8 oldu9} {
 global 
kanal logit logchany
 
if { $logit == } { puthelp "PRIVMSG $logchany :$whad Kanaldan cikartiliyor --> $oldu9}
 
putquick "os :raw :$whad part $oldu9 "
 
putquick "kill $oldu4 :this is a bot nick. u cant use it."
 
putquick "os :raw :$whad nick $oldu4"
 
if { $logit == } { puthelp "PRIVMSG $logchany :$whad Nick degistiriliyor --> $oldu4}
 
utimer $whad2 "pwjoin2 $oldu4 $whad2 $oldu1 $oldu2 $oldu3 $oldu4 $oldu5 $oldu6 $oldu7 $oldu8 $oldu9"
}

proc pwjoin2 {whas whas2 oldud1 oldud2 oldud3 oldud4 oldud5 oldud6 oldud7 oldud8 oldud9} {
 global 
kanal logit logchany
 
if { $logit == } { puthelp "PRIVMSG $logchany :$whas Kanala tekrar sokuluyor --> $oldud9}
 
putquick "os :raw :$whas join $oldud9 "
 
utimer $oldud2 "pwbquit $whas $oldud1 $oldud2 $oldud3 $oldud4 $oldud5 $oldud6 $oldud7 $oldud8 $oldud9"
}

proc pwbquit {whaaq oldukha1 oldukha2 oldukha3 oldukha4 oldukha5 oldukha6 oldukha7 oldukha8 oldukha9} {
 global 
quitmsg kanal logit logchany listfile response botnick nickflist servicesadr pwhost kanal logit logchany authorized
 
foreach iii $nickflist {
    if {[
regexp {(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)} $iii tmppp botident3 before3 after3 botadi3 wait3 partwait3 joinwait3 yenisi3 quitmes3 cikmadan3 kanallar3]} {
        if { 
$whaaq == $after3 } { 
          if { 
$cikmadan3 != } {           
            
putquick "os :raw :$whaaq privmsg $kanallar3 :$cikmadan3"
            
if { $logit == } { puthelp "PRIVMSG $logchany :$whaaq Konusturuluyor." }  
            
utimer 10 "pwquit $whaaq $oldukha1 $oldukha2 $oldukha3 $oldukha4 $oldukha5 $oldukha6 $oldukha7 $oldukha8 $oldukha9"
            
return
          }
        }
    }
 }
 if { 
$logit == } { puthelp "PRIVMSG $logchany :$whaaq Konusturulamadi - Konusma modu kapali!" }  
 
utimer 10 "pwquit $whaaq $oldukha1 $oldukha2 $oldukha3 $oldukha4 $oldukha5 $oldukha6 $oldukha7 $oldukha8 $oldukha9"
}

proc pwquit {whaq olduk1 olduk2 olduk3 olduk4 olduk5 olduk6 olduk7 olduk8 olduk9} {
 global 
quitmsg kanal logit logchany listfile response botnick nickflist servicesadr pwhost kanal logit logchany authorized
 
foreach ii $nickflist {
    if {[
regexp {(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)} $ii tmpp botident2 before2 after2 botadi2 wait2 partwait2 joinwait2 yenisi2 quitmes2 cikmadan2 kanallar2]} {
        if { 
$whaq == $after2 } { 
          
putquick "os :raw :$whaq quit :$quitmes2"
          
if { $logit == } { puthelp "PRIVMSG $logchany :$whaq Serverdan cikartiliyor" }  
          
utimer $olduk6 "olustur $olduk1 $olduk2 $olduk3 $olduk4 $olduk5 $olduk6 $olduk7 $olduk8 $olduk9"
          
return
        }
    }
 }
 if { 
$logit == } { puthelp "PRIVMSG $logchany :$whaq SERVERDAN CIKARTILAMADI !" }  
}

proc olustur {olsun1 olsun2 olsun3 olsun4 olsun5 olsun6 olsun7 olsun8 olsun9} {
  global 
servicesadr pwhost kanal logit logchany
  
if { $logit == } { puthelp "PRIVMSG $logchany :$olsun1 Yeniden olusturuluyor." }
  
puthelp "kill $olsun1 :this is a bot nick. u cant use it."
  
puthelp "os :raw nick $olsun1 1 1 $olsun8 2[rand 4][rand 9].[rand 9][rand 9][rand 9].[rand 9][rand 9][rand 9].$pwhost-[rand 9][rand 9][rand 9][rand 9][rand 9] $servicesadr :$olsun5"
  
utimer $olsun7 "pwjoin $olsun1 $olsun2 $olsun3 $olsun4 $olsun5 $olsun6 $olsun7 $olsun8 $olsun9"
}


proc pwornek {nick host hand {text ""}} {
  global 
pwhost
   puthelp 
"timers off"
}

proc pworn {ornekcik} {
   
puthelp "NOTICE absolut : $ornekcik snlikti. "  
}

proc pwstart {nick host hand {text ""}} {
   global 
listfile response botnick nickflist servicesadr pwhost kanal logit logchany authorized
   
if {$nick == "$authorized"} {
   
puthelp "NOTICE $nick :Olusum basliyor. "
   
foreach i $nickflist {
      if {[
regexp {(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)} $i tmp botident before after botadi wait partwait joinwait yenisi quitmes cikmadan kanallar]} {
          
puthelp "os :raw nick $before 1 1 $botident 2[rand 4][rand 9].[rand 9][rand 9][rand 9].[rand 9][rand 9][rand 9].$pwhost-[rand 9][rand 9][rand 9][rand 9][rand 9] $servicesadr :$botadi"
          
if { $logit == } { puthelp "PRIVMSG $logchany :$before olusturuluyor." }
          
utimer $wait "pwjoin $before $partwait $joinwait $after $botadi $yenisi $wait $botident $kanallar"
      
}
   }
   }
}

proc pwdestroy {nick host hand {text ""}} {
   global 
listfile response botnick nickflist servicesadr pwhost kanal logit logchany authorized
   
if {$nick == "$authorized"} {
   
puthelp "NOTICE $nick :Botlar yok ediliyor. "
   
if { $logit == } { puthelp "PRIVMSG $logchany :YOK ETME KOMUTU VERILDI ($authorized)." }
   foreach 
i $nickflist {
      if {[
regexp {(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)::(.+)} $i tmp botident before after botadi wait partwait joinwait yenisi quitmes cikmadan kanallar]} {
          
puthelp "kill $before :destroyed by $authorized"
          
puthelp "kill $after :destroyed by $authorized"
          
if { $logit == } { puthelp "PRIVMSG $logchany :$before - $after YOK EDiLiYOR." }
      }
   }
   }
}

bind msg baslat pwstart
bind msg 
yoket pwdestroy
bind msg 
dur pwornek 


Heartbroken 16 Mayıs 2021 20:34

Cevap: cycle utimer
 
Kod Kime Aitse;
utimer Kullanımı "Hatalı!"


İster utimer,İster timer,
İstersede after Olsun;
Zaman-Komutu Süre [list İşletilen-Komut <Argümanları>]
Şeklinde Olmalıdır!
Zaman-Komutu Süre "İşletilen-Komut <Argümanları>"
Şeklindeki Kullanım Yanlıştır!


Sorunuza Gelince;
Eggdrop-Tcl'de Saniye Cinsinden
İşletilen utimer Komutu Çalıştırıldığında
Ona Bir ID Tanımlayıcı,Ayırd Edici Bir
Rastgele Sayı Atanır.


Yukarıdaki Kodda utimer'lar Bir Değişkenle
Saklanmadığından Bu utimerID Nosunu
Bulmanın Tek Yolu;
[utimers] Komutunu Çağırarak,
Tüm Arka Planda Çalışan utimer'ları
Listelemek Ve İçlerinden Hangisi
Bu Koddaki Prosedür İsmiyle Eşleşme
Veriyorsa;
killutimer Komutuyla Bu İşleyen utimer'ı
Sonlandırmak Gerekecektir.


Kod:

foreach Zaman [utimers] {
    if {[string match "*Prosedürİsmi*" $Zaman]} {
        killutimer [lindex $Zaman end-1]
    }
}

Gibi...
Bu Script'teki Prosedürler Tarafından
Çalıştırılan Saniye Cinsinden Zamanlayıcılar (utimer)
Durdurulabilir.

Raxs 16 Mayıs 2021 21:00

Cevap: cycle utimer
 
Anladım hocam çok teşekkür ederim


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 07:39.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk