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/)
-   -   Global TCL ( Süre Aralıkları iLe ) (https://www.ircforumlari.net/eggdrop-neostats-bnc/290635-global-tcl-sure-araliklari-ile.html)

rondom 11 Kasım 2009 17:21

Cevap: Global TCL ( Süre Aralıkları iLe )
 
[17:20] invalid command name "globalat"
while executing
"globalat"
(file "scripts/globalat.tcl" line 8)
invoked from within
"source scripts/globalat.tcl"

böyle bir hata aldım.

BuCaLI 11 Kasım 2009 17:26

Cevap: Global TCL ( Süre Aralıkları iLe )
 
Kodu düzenlediğim şekilde tekrar alıp dene bakalım.

¿ 11 Kasım 2009 19:51

Cevap: Global TCL ( Süre Aralıkları iLe )
 
#Opers kanalinda global mesaj sistemini yonetme ozelligi ekledim.
Yardimlari icin BuCaLI'ya tsk. :)


<Namesis> !global
<Ra> Kullanimi: !global <on/off/durum/ekle/sil/listele>

<Namesis> !global on

<Ra> Global mesaj sistemi acildi.


<Namesis> !global durum

<Ra> Global mesaj sistemi acik.


<Namesis> !global off

<Ra> Global mesaj sistemi kapali.


<Namesis> !global ekle

<Ra> Global mesaj belirtmediniz. Lutfen global mesajinizi belirtiniz.


<Namesis> !global ekle Test mesajidir.

<Ra> GLOBAL MESAJ: Test mesajidir. » Basariyla global mesaj listesine eklendi.


<Namesis> !global sil

<Ra> Boyle bir global mesaj listede yok.
<Ra> Listeyi gormek icin: !global listele
<Ra> Silmek icin global mesajin basinda ki numarayi kullaniniz. Ornek: !global sil 1234


<Namesis> !global listele

<Ra> 4790 - Test mesajidir.
<Ra> Global mesaj listesinin sonu...


<Namesis> !global sil 4790

<Ra> 4790 numarali global mesaj listeden silindi.


Kod:


#########
# BASLA #
#########

# Global mesaj sistemini acip kapatma komutunun isleyecegi kanali belirtiniz.
set glbmsg(operchan) "#Opers"

# Global komut on ekini belirtiniz.
set glbmsg(komut) "!global"

# Global mesajlarin bulundugu dosya dizinini belirtiniz.
set glbmsg(text) "scripts/globalmsg.txt"

# Global mesajlar kac dakika arayla atilacaksa belirtiniz. (Dakika cinsinden)
set glbmsg(zaman) "15"

######################
# DOKUNMA BOZULUR :d #
######################

utimer 30 globalat
proc globalat {} {
global botnick globalat glbmsg
  if {[lsearch -exact [channel info $glbmsg(operchan)] +globcmd] != -1} {
  set msgzaman "0"
  set dosya [open $glbmsg(text) r]
  set liste [split [subst -nocommands [read $dosya]] \n]
      foreach i $liste {
      set msgzaman [expr $msgzaman + $glbmsg(zaman)]
      timer $msgzaman [list putquick "os global [lrange $i 2 end]"]
    }
    close $dosya
      set msgzaman [expr $msgzaman + $glbmsg(zaman)]
    timer $msgzaman [list globalat]
    }
  return 0
}

bind evnt - init-server baglan:dosyayarat
proc baglan:dosyayarat {type} {
global botnick glbmsg
 if {![file exists $glbmsg(text)]} {
  set dosya [open $glbmsg(text) w]
  close $dosya
 }
}

setudef flag globcmd

bind pub - $glbmsg(komut) globalonoff
proc globalonoff {nick uhost hand chan text} {
global botnick glbmsg
    set komut "[lindex [split $text] 0]"
    set mesaj "[lrange [split $text] 1 end]"
    if {[string match -nocase $glbmsg(operchan) $chan]} {
    if {$komut == ""} { putquick "PRIVMSG $chan :Kullanimi: $glbmsg(komut) \002<on/off/durum/ekle/sil/listele>\002"; return 0 }
    if {[string match -nocase "on" $komut]} { channel set $chan +globcmd; putquick "PRIVMSG $chan :Global mesaj sistemi \002acildi\002."; globalat; return 0 }
    if {[string match -nocase "off" $komut]} { channel set $chan -globcmd; putquick "PRIVMSG $chan :Global mesaj sistemi \002kapatildi\002."; return 0 }
    if {[string match -nocase "durum" $komut]} { if {[lsearch -exact [channel info $chan] +globcmd] != -1} { putquick "PRIVMSG $chan :Global mesaj sistemi \002acik\002." } else { putquick "PRIVMSG $chan :Global mesaj sistemi \002kapali\002."; return 0 } }
    if {[string match -nocase "ekle" $komut]} { if {$mesaj == ""} { putquick "PRIVMSG $chan :Global mesaj belirtmediniz. Lutfen global mesajinizi belirtiniz." ; return 0 }
        putquick "PRIVMSG $chan :GLOBAL MESAJ: $mesaj » Basariyla global mesaj listesine eklendi."
        set globs [open $glbmsg(text) a]
        puts $globs "[join [rand 9999]] [join -] [join $mesaj]"
        flush $globs
        catch {closer $globs}
    }
    if {[string match -nocase "sil" $komut]} {
        if {![file exists $glbmsg(text)]} {
            putquick "PRIVMSG $chan :Global mesaj listesi zaten bos."
            return
        }
        set data ""
        set input [open $glbmsg(text) r]
        while {![eof $input]} {
            set curline [gets $input];set curline [split $curline]
            if {$curline != ""} {
                set data [linsert $data end $curline]
            }
        }
        catch {close $input}
        set deger -1;set esles ""
        foreach line $data {
            incr deger
            if {[string match -nocase "$mesaj" [lindex $line 0]]} {
                set esles $deger
                break
            }
        }
        if {$esles == ""} {
            putquick "PRIVMSG $chan :Boyle bir global mesaj listede yok."
            putquick "PRIVMSG $chan :Listeyi gormek icin: \002$glbmsg(komut) listele\002"
            putquick "PRIVMSG $chan :Silmek icin global mesajin basinda ki numarayi kullaniniz. Ornek: \002$glbmsg(komut) sil 1234\002"
            return
        }
        set newdata [lreplace $data $deger $deger]
        set output [open $glbmsg(text) w]
        foreach newline $newdata {
            if {$newline != ""} {
                puts $output $newline
            }
        }
        flush $output
        catch {close $output}
            putquick "PRIVMSG $chan :\002$mesaj\002 numarali global mesaj listeden silindi."
            return
        }
        if {[string match -nocase "listele" $komut]} {
        if {![file exists $glbmsg(text)]} { putquick "PRIVMSG $chan :Global mesaj listesi bos."; return 0 }
        set input [open $glbmsg(text) r]
        set lines [split [subst -nocommands [read $input]] \n]
        catch {close $input}
        set sayc 0
          foreach line $lines {
          if {$line != ""} {
          putquick "PRIVMSG $chan :$line"
        incr sayc
        }
      }
      if {$sayc == 0} {
    putquick "PRIVMSG $chan :Global mesaj listesinde hic kayit bulunamadi."; return
    } else { putquick "PRIVMSG $chan :Global mesaj listesinin sonu..."
  }
  }
 }
}

#########
# BITTI #
#########


TaMeRGenc 11 Eylül 2013 14:49

Cevap: Global TCL ( Süre Aralıkları iLe )
 
bu kod bende calışmadı nasıl calıştıgını anlatırmısınız rica etsem paylaşım icin teşekürler

Gaib 11 Eylül 2013 18:33

Cevap: Global TCL ( Süre Aralıkları iLe )
 
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] bakabilirsin.

AspavA 30 Ekim 2014 16:30

Cevap: Global TCL ( Süre Aralıkları iLe )
 
globalleri 2 kere atıyor sürekli nedne olabilir.

4,1<15,1 YuzukNET 4,1>5 - 4YuzukNET 1Sohbet Sunucularına 2Facebook Üzerinden Bağlanmak için 4Tıklayınız. [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]
4,1<15,1 YuzukNET 4,1>5 - 4YuzukNET 1Sohbet Sunucularına 2Facebook Üzerinden Bağlanmak için 4Tıklayınız. [Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

rascoLn 30 Ekim 2014 18:24

Cevap: Global TCL ( Süre Aralıkları iLe )
 
Şu kısmı :

Kod:

######################
# DOKUNMA BOZULUR :d #
######################

utimer 30 globalat
proc globalat {} {
global botnick globalat glbmsg
  if {[lsearch -exact [channel info $glbmsg(operchan)] +globcmd] != -1} {
  set msgzaman "0"
  set dosya [open $glbmsg(text) r]
  set liste [split [subst -nocommands [read $dosya]] \n]
  close $dosya
      foreach i $liste {
      set msgzaman [expr $msgzaman + $glbmsg(zaman)]
      timer $msgzaman [list putquick "os global [lrange $i 2 end]"]
      }
      close $dosya
      set msgzaman [expr $msgzaman + $glbmsg(zaman)]
      timer $msgzaman [list globalat]
    }
  return 0
 }
  }
}

Şu şekilde değiştirin :

Kod:

######################
# DOKUNMA BOZULUR :d #
######################

proc globalat {} {
global botnick globalat glbmsg
  if {[lsearch -exact [channel info $glbmsg(operchan)] +globcmd] != -1} {
  set msgzaman "0"
  set dosya [open $glbmsg(text) r]
  set liste [split [subst -nocommands [read $dosya]] \n]
  close $dosya
      foreach i $liste {
      set msgzaman [expr $msgzaman + $glbmsg(zaman)]
      timer $msgzaman [list putquick "os global [lrange $i 0 end]"]
      }
      } else {
      return 0
  }
}


¿ 30 Ekim 2014 21:52

Cevap: Global TCL ( Süre Aralıkları iLe )
 
Butun hatalari giderilmistir.
Tekrar revizyondan gecirdim bu haliyle daha iyi oldu. :)
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

Kawissaa 09 Şubat 2020 03:07

Cevap: Global TCL ( Süre Aralıkları iLe )
 
bu tcl elinde olan var mı gelişmiş şekilde


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

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