TCL Arşivimde Duruyormuş Bakayım Dedim Tamamen İngilizce Çıktı Ne İşe Yarar Sizce bu ?
Kod: Kodu kopyalamak için üzerine çift tıklayın!
######################################################
# Topic Guard #
# #
# By: Dr_P@EFNet (Morten Nilsen) #
# E-mail: Morten@
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]sen.com #
# mentor: Aug@EFNet (Adam Ormond) #
# E-mail: augurer@
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]magic.net #
# Created: 1/19/00 #
# Modified: 2/15/01 #
######################################################
######################################################
# DESCRIPTION #
# #
# NEW: #
# #
# * Topic guard ignores channels with topic="none" #
# #
# Features: #
# #
# * Controls the topics in all channels either #
# aggressively or passively. #
# #
# Installation: #
# #
# Place this script in the same directory you #
# store all of your other scripts. #
# Put "source scriptdir/topic.tcl" in your .conf #
# Telnet to your bot, and .rehash, then #
# type .tguard help #
# #
# #
# NOTES: #
# #
# * Concept by Dr_P #
# #
######################################################
######################################################
# GLOBAL VARIABLES #
# #
# Aggressive topic setting: 1 #
# Passive topic setting: 0 #
# #
set topic_mode 1
# #
# The default topic for all channes #
# #
set topics(default) "-{ 4th Age - Higher Knowledge }- ( Default Topic )"
# #
######################################################
######################################################
# DON'T TOUCH ANYTHING #
# BELOW THIS! #
######################################################
######################################################
# BINDINGS #
# #
# Causes the bot to check the topic every 10 minutes #
# #
bind time - "%5*" check_topics
# #
# Causes the bot to save the topics daily #
# #
bind evnt logfile save_topics
# #
# gives users access to the topic guard #
# #
bind dcc o|o tguard topic_front
# #
######################################################
if {[file exists "topics"]} {
set fin [open "topics" r]
while {[gets $fin line] != -1} {
set topics([lindex $line 0]) [join [lrange $line 1 end]]
}
close $fin
putlog "Topics loaded successfully! ***"
} else {
putlog "No topics to load! Please use \002tguard set\002 <\002chan\002> <\002topic\002>"
}
proc topic_front {hand idx args} {
set action [lindex [lindex $args 0] 0]
set params [join [lrange [lindex $args 0] 1 end]]
switch $action {
set { set_topic $params }
check { check_topics 0 0 0 0 0 }
save { save_topics }
clear { erase_topic $params }
help { give_help $idx }
}
}
proc give_help {idx} {
putdcc $idx "*** Topic-Guard by \002Dr_P\002 and \002Aug\002 ***\n\
syntax: \002tguard\002 <\002action\002> \[\002parameters\002\]\n\
supported actions:\n\
\n\
\002set\002 - set a default channel topic\n\
syntax: \002tguard set\002 <\002channel\002> \002<topic\002>\n\
\n\
\002check\002 - check the channels topics\n\
syntax: \002tguard check\002\n\
this is automagically called by the bot every 10 minutes\n\
\n\
\002save\002 - write the set topics to disk\n\
syntax: \002tguard save\002\n\
\n\
\002clear\002 - remove a set topic\n\
syntax: \002tguard clear\002 <\002channel\002>\n\
functionally equivalent to \002tguard set #chan none\002\n\
but only works on channels with a previous topic.\n\
\n\
\002help\002 - display help\n\
syntax: \002tguard help\002"
}
proc erase_topic {args} {
global topics
set $topics($args)
putlog "topic for $args set to default"
}
proc set_topic {args} {
global topics
set chan [lindex [lindex $args 0] 0]
if [validchan $chan] {
set ctopic "[lrange [lindex $args 0] 1 end]"
set topics($chan) [join $ctopic]
putlog "Topicguard: '$ctopic' set for $chan"
} else {
putlog "the bot is not on the channel $chan"
}
}
proc save_topics {} {
global topics
set fout [open "topics" w]
foreach chan [ channels ] {
if [info exists topics($chan)] {
set ctopic "$topics($chan)"
puts $fout "$chan $ctopic"
}
}
close $fout
putlog "channel topics saved"
}
proc check_topics {min hour day month year} {
global topics
global topic_mode
foreach chan [channels] {
if { ($topics($chan) != "none") && [botisop $chan] } {
if { [info exists topics($chan)] && ($topics($chan) != "") } {
set ctopic $topics($chan)
} else {
set ctopic [join $topics(default)]
}
set istopic [topic $chan]
switch $topic_mode {
0 {
if { ($istopic == "") } {
putserv "TOPIC $chan :$ctopic"
}
}
1 {
if { ($istopic != $ctopic) } {
putserv "TOPIC $chan :$ctopic"
}
}
}
}
}
}
putlog "Topic-guard 0.2.5 Written by \002Aug\002 & \002Dr_P\002 ***"
@
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] & @
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] Ve Diğer Arkadaşlar Necidir Bu TCL ?
Guard Diyo Kanallarda Reklam Topiclerini mi Bildiriyor Acaba ?