🔔 Çevrimdışı bildirim almak ister misiniz?
Bir konuya etiketlendiğinizde, özel mesaj aldığınızda, bir mesajınız alıntılandığında forumda olmasanız bile anlık bildirim almak için lütfen izni verin.
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
# IUCTools
# IUC aralık 2025
# Eggdrop yönetimi için küçük yardımcı programlar
## NOT ##
# Tüm komutlara global +m (master)
# veya local +n (sahibi) erişebilir.
# Kullanıcı +n ise, sonuçlar
# sahip olduğu kanallarla sınırlıdır.
## KOMUTLAR ##
# .getattr <özellik>
# Her kanal için <özellik> değerini döndürür
# .toggle <bayrak özniteliği> [kanal]
# Kanalda özniteliği (bayrak türü olmalıdır) değiştirir
# veya hedef belirlenmemişse tüm kanallarda değiştirir
# .achannels [attr]
# attr etkin olan kanalların listesini döndürür
# .mcset [#chan[,#chan]] <[+|-]attr> [değer] [+|-özellik [değer]] [+|-özellik [değer]]
# Özelliklerin değerini toplu olarak değiştirir. Aşağıdaki örnekleri inceleyin.
## ÖRNEKLER ##
# - Daha önce belirtildiği gibi, kullanıcı yerel +n ise, yalnızca
# sahip olduğu kanallar etkilenecektir
# - Boşluk içeren dizeler {} içine alınmalıdır
# - Bir özniteliği sıfırlamak (boşaltmak) için, {} değerini ayarlayın.
# * .mcset need-op {} need-invite {putserv “PRIVMSG $::owner :Beni davet et!”} mytest {}
# Bu, need-op ve mytest (dize veya int) özniteliklerini boşaltacak ve
# putserv “PRIVMSG $::owner :Beni davet et!” need-invite'da ayarlanacaktır.
# * .mcset #chan1,#chan2 +guard -bitch wmsg {“merhaba arkadaşlar”}
# Bu, guard'ı açar, bitch'i kapatır ve
# wmsg'yi #chan1 ve #chan2'de “merhaba arkadaşlar” olarak ayarlar.
namespace eval iuctools {
variable version "0.3"
variable author "IUC"
# Kanallar için bir özniteliğin dönüş değeri
proc getattr {handle idx text} {
set attr [lindex $text 0]
if {$attr eq ""} {
putlog "Error: use .getattr attribute"
return
}
if {[::pltools::getatype $attr] eq "unknow"} {
putlog "Error: $attr is not a valid attribute"
return
}
foreach c [gethandlechans $handle] {
putlog "$attr for $c : [channel get $c$attr]"
}
}
# Kanallar için bir özniteliğin dönüş değeri
proc toggle {handle idx text} {
lassign [split $text] attr chan
if {[catch {set atype [chansettype $attr]}]} {
putlog "Sorry but $attr is not a valid attribute"
return
}
if {$atype ne "flag"} {
putlog "Sorry, $attr is not a flag attribute"
return
}
set lchan {}
foreach c [::pltools::gethandlechans $handle $chan] {
if {[channel get $c $attr]==1} {
channel set $c -$attr
} else {
channel set $c +$attr
}
lappend lchan $c
}
putlog "$attr toggled on [join $lchan ", "]"
}
# Toplu ayar özellikleri
proc mcset {handle idx text} {
set arg [::pltools::txt2list $text]
set chans {}
set attrname ""
set attrvals ""
for {set i 0} {$i<[llength $arg]} {incr i} {
if {$i==0 && [string index [lindex $arg $i] 0] eq "#"} {
set chans [::pltools::gethandlechans $handle [lindex $arg $i]]
continue
} elseif {$i==0 && [string index [lindex $arg $i] 0] ne "#"} {
set chans [::pltools::gethandlechans $handle]
}
set atype [::pltools::getatype [lindex $arg $i]]
if {$atype eq "unknow"} {
putlog "Unknow attribute: [lindex $arg$i] - Continue to next one"
continue
} elseif {$atype == "flag"} {
foreach c $chans {
putlog "channel set $c [lindex $arg$i]"
channel set $c [lindex $arg $i]
}
} else {
foreach c $chans {
putlog "channel set $c [lindex $arg$i] {*}[lindex $arg$i+1]"
channel set $c [lindex $arg $i] {*}[lindex $arg $i+1]
}
incr i
}
}
}
# Dahili kullanım
# returns type of an attribute or unknow
proc getatype {attr} {
set f [string index $attr 0]
if {$f=="+" || $f=="-"} {
set tmpattr [string range $attr 1 end]
} else {
set tmpattr $attr
}
if {[catch {set atype [chansettype $tmpattr]}]} {
return "unknow"
} else {
return $atype
}
}
# Belirli bir özniteliğe sahip kanalları döndürür
proc achannels {handle idx text} {
set achans {}
set chans [::pltools::gethandlechans $handle]
if {$text eq ""} {
putlog $chans
return
} else {
if {[::pltools::getatype $text] ne "flag"} {
putlog "$text is not a valid channel flag"
return
}
foreach c $chans {
if {[channel get $c $text]} {
lappend achans $c
}
}
if {[llength $achans]==0} {
putlog "No channel with $text flag enabled"
} else {
putlog "$text enabled on [join $achans ", "]"
}
}
}
# bir tanıtıcıya ait kanalların listesini döndürür
proc gethandlechans {handle {channels ""}} {
if {$channels ne "" && [string index $channels 0] eq "#"} {
set lchans [split $channels ","]
} else {
set lchans [channels]
}
if {[matchattr $handle +m]} {
foreach c $lchans {
if {[validchan $c]} {
lappend validchans $c
}
}
} else {
foreach c $lchans {
if {[validchan $c] && [matchattr $handle |+n $c]} {
lappend validchans $c
}
}
}
return $validchans
}
# iç kullanım
# Metni listeye dönüştürmek için kısa yardımcı programlar
proc txt2list {text} {
set rlist {}
set tmp {}
foreach e [split $text " "] {
if {[llength $tmp]==0 && [string index $e 0] ne "\{"} {
lappend rlist $e
} elseif {[string index $e end] ne "\}"} {
lappend tmp $e
} else {
lappend tmp $e
lappend rlist [join $tmp " "]
set tmp {}
}
}
return $rlist
}
putlog "IUCTools v${::pltools::version} by ${::pltools::author} Yüklendi"
}
__________________ Bir çok yeni lamer sunucuda IUC nicki kullanıyor lamerlar onlar ben değilim inanmayınız ve güvenmeyiniz. Kullanıcı imzalarındaki bağlantı ve resimleri görebilmek için en az 20 mesaja sahip olmanız gerekir ya da üye girişi yapmanız gerekir.