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/)
-   -   Oper/Admin nick yasağı. (https://www.ircforumlari.net/tcl-scriptler/743651-oper-admin-nick-yasagi.html)

unpainful 19 Mart 2016 20:53

Oper/Admin nick yasağı.
 
Sadece nickinin yanına |away takısı alıp , orjinal nicki hariç nick değiştirdiğinde otomatik olarak eski nickine geri dönsün , böyle bir tcl yapabiir miyiz?

rascoLn 21 Mart 2016 02:01

Cevap: Oper/Admin nick yasağı.
 
Şöyle bişey hazırladım kısaca bahsedeyim ;

tcl ' nin üst kısmındaki ayarları zaten kendinize göre doldurursunuz. (nick , kanal , takı)

tcl ' nin amacı belirtmiş olduğunuz takıyı , belirlemiş olduğunuz kanalda takı korumasına eklediğiniz nickler o takıyı alabilirler yalnız ,
nickler direk başka nicke geçemez , takıyı aldıktan sonra yine baska bir nicke geçiş yapamazlar yalnızca orjinal nicke geçiş yapabilirler , ne zamana kadar derseniz tabiki belirlemiş olduğunuz kanaldan çıkmadıkları sürece..

Komutlar:
Kod:

Takı ekleme : !taki ekle nick
Takı silme  : !taki sil nick

PHP- Kodu:

# ####################### #
# ###### ###### ##   # ## #
#   ##   ##  ## ## #   ## #
#   ##   ###### ## #   ## #
#   ##   ##  ## ##   # ## #
# ####################### # coding by rascoLn

# komutu kullanacak nick
set baskan "komutu-kullanacak-nick"

# komutun kullanılacağı kanal 
set operchan "#opers"

# takı
set tk "|away"

# ########### Kod Başlangıç ########### #
bind pub - !taki taki
bind nick 
- * lognick
proc taki 
{nick host hand chan text} {
global 
operchan baskan
if {[string match $chan $::operchan] & [string match -nocase $baskan $nick]} {
if {[
llength $textne 2} { putquick "notice $nick :\002Komut kullanımı:\002 !taki \[ekle/sil\] nick"; return}
set second [lindex $text 0]
set third [lindex $text 1]
if {[
string match -nocase "ekle" $second] & [string match -nocase $operchan $chan]} {
set odosya [open "taki" a]
puts $odosya $third
close $odosya
putquick 
"privmsg $operchan :\002$third \002takı korumasına eklendi."
}
if {[
string match -nocase "sil" $second] & [string match -nocase $operchan $chan] & [string match -nocase $baskan $nick]} {
set tdosya [open "taki" r]
set tnick [split [read -nonewline $tdosya] \n]
close $tdosya
if { [set trakam [lsearch -exact $tnick $third]] eq -} { putquick "privmsg $operchan :\002$third \002takı koruması listesinde yok."; return }
set degis [lreplace $tnick $trakam $trakam]
set tolustur [open "taki" w]
puts $tolustur $degis
close $tolustur
putquick 
"privmsg $operchan :\002 $third \002takı korumasından silindi."
}
} else { 
putquick "notice $nick :Bu komutu kullanma izniniz bulunmamaktadır." }
}
proc lognick {nick host hand chan newn} {
global 
tk
if {[string match $chan $::operchan]} {
  
set operdosya [open "taki" r]
  
set opers [split [read -nonewline $operdosya] \n]
  
close $operdosya
  
foreach opernick $opers {
  if {[
string match -nocase [string map -nocase [list $tk ""$nick$opernick]} {
  if {[
string match -nocase $newn $opernick$tk]} {
  break
  }
  if {[
string match -nocase $newn $opernick]} {
  break
  } else {
  
putquick "os raw svsnick $newn [string map -nocase [list $tk ""] $nick] :1"
  
break
  }
}
}
}
}
# ########### Kod Bitiş ########### #

putlog "Takı Koruması Tcl - rascoLn" 



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

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