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/)
-   TCL Scriptler (https://www.ircforumlari.net/tcl-scriptler/)
-   -   Antilag.tcl (https://www.ircforumlari.net/tcl-scriptler/1013648-antilagtcl.html)

Xadd1 29 Haziran 2023 15:21

Antilag.tcl
 
Sunucunuzdaki eggdrop düşmesini önlemek için kullanılabilir. Kırmızı ile çizdiğim yerleri scriptten renklendirmeyi unutmayınız...
!lagcheck komutu ile de yapabilirsiniz..

Kod:

# Komutları kullanmak için kullanıcı flagını burada ayarlayın.
set lagflag "m"

# Botun gecikmenin çok yüksek olduğunu bildireceği kanalları buradan ayarlayın.Devre dışı bırakmak için "" olarak ayarlayın.
set lagchans "#Sohbet"

# Bu, gecikme sınırıdır, gecikme bu süreyi (saniye cinsinden) aşarsa, bot sunucuları atlar.
set antilagtime 5

# Bu, komut dosyası zamanlayıcısıdır, bu, botun gecikmeyi kontrol edeceği dakika sayısıdır.
set lagtimer 10

# Gecikmeyi kontrol ederken botun taraf hattını bilgilendirmesini istiyorsanız bunu 1 olarak ayarlayın. Devre dışı bırakmak için 0'a ayarlayın.
set lagnotify 1

### Bu satırın altında düzenleme yapmayın! ###
### ---------------------------- ###

set antilagv 1.03
bind raw - 391 raw:check:lag
bind pub ${lagflag} !lagcheck pub:antilag
bind dcc ${lagflag} lagcheck dcc:antilag

if {![info exists antilagloaded]} {
  timer $lagtimer proc:antilag
  set antilagloaded 1
}

proc proc:antilag {} {
  global lagtimer lagnotify
  set ::lag "[clock clicks]"
  set ::type 0
  if {$lagnotify == 1} { putlog "\02-Anti-Lag-\02 Sunucu gecikmesi kontrol ediliyor.." }
  putquick "TIME"
  timer $lagtimer proc:antilag
}

proc pub:antilag {nick uhost hand chan text} {
  global lagchans
  foreach msgchan $lagchans {
    if {$chan == $msgchan} {
      set ::lag "[clock clicks]"
      set ::type 1
      set ::chan $msgchan
      putquick "PRIVMSG $::chan :\02-Anti-Lag-\02 Sunucu gecikmesi kontrol ediliyor.."
      putquick "TIME"
    }
  }
}

proc dcc:antilag {hand idx text} {
  set ::lag "[clock clicks]"
  putlog "\02-Anti-Lag-\02 Now checking server lag."
  set ::type 2
  putquick "TIME"
}

proc raw:check:lag {from key text} {
  global antilagtime lagchans lagnotify
  set lag [expr ((([clock clicks] - $::lag)/2)/60)/1000.]
  if {$lagnotify == 1} { putlog "\02-Anti-Lag-\02 Geçerli gecikme \02$lag\02 Saniyedir." }
  if {$::type == 1} { putquick "PRIVMSG $::chan :\02-Anti-Lag-\02Geçerli gecikme \02$lag\02 Saniyedir." }
  if {($lagnotify == 0) && ($::type == 2)} { putlog "\02-Anti-Lag-\02 Geçerli gecikme \02$lag\02 Saniyedir." }
  if {$lag > $antilagtime} {
    if {($lagchans != "") && ($::type != 2)} {
      foreach msgchan $lagchans {
        putquick "PRIVMSG $msgchan :\02Attention\02: Gecikmem sınırı aştı $antilagtime seconds (currently at $lag seconds). Şimdi sunucuları atlıyorum."
      }
    }
    putlog "\02-Anti-Lag-\02 Lag exceeded $antilagtime seconds. Trying another server..."
    jump
  }
  unset -nocomplain ::lag
  unset -nocomplain ::chan
  if {[info exists ::type]} { unset -nocomplain ::type }
 }

putlog "Antilag.tcl by FrostByte.."



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

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