Skip to content

Instantly share code, notes, and snippets.

@landongn
Last active December 21, 2015 02:09
Show Gist options
  • Save landongn/6232656 to your computer and use it in GitHub Desktop.
Save landongn/6232656 to your computer and use it in GitHub Desktop.
code comment style
## Override required eggdrop.conf values, because text files can be large
set exclusive-mode 1
set max-queue-msg 102400
## Set up the namespace we'll be working in
namespace eval ::killscript {
## set this to 1 if you want spam in the eggdrop console
variable debug 1
## uncomment to stay explicit in namespace array creation
# variable script
# array set script {}
## script information variables
set script(name) "killscript.tcl"
set script(version) "1.5.1"
## channel flag variable for chanset
setudef flag killscript
## uncomment to stay explicit in namespace array creation
# variable filename
# array set filename {}
## declare our flat file locations, if no pathname is specified
## they will default to $HOME/eggdrop
set filename(lexicon) "killscript.txt"
set filename(dictionary) "killscript.dictionary"
set filename(quotes) "killscript.quotes"
## if killscript is running, don't reset it on loading
if { ![info exists running] } { variable running 0 }
## iterate through our filenames to make sure they exist
## create them if they do not exist (saves headache)
foreach files [array names filename] {
if { ![file exists $filename($files)] } {
set file [open $filename($files) w]
if { $debug } {
putlog "$script(name): Created $filename($files)"
}
close $file
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment