#!/opt/gnu/bin/tclsh
# Change that line to your tcl dir
# Then,
#   chmod +x kewli0!
#   kewli0!
# if it doesn't work, mail keith@cs.oswego.edu

proc print vars {
    puts -nonewline "\[1;33m$vars\[0m --> \[2;33m"
}
proc newline {} {
    puts -nonewline {[0m}
}

set y [open kewli0.ans]
puts [read $y]
close $y
puts {[1;36mIf any question is a yes-or-no question,}
puts {yes = 1; no = 0}
newline
print "Where shall these vars be saved?"
gets stdin kewliosave
set x [open $kewliosave w]
puts $x "set kewliosave \{$kewliosave\}"
newline
print "What's the tcl's full path?"
gets stdin killa
puts $x "set killa \{$killa\}"
newline
puts {[1;32mPUBLIC CMDS[0m}
print "Anybody"
gets stdin x_
newline
print "Ops"
gets stdin o_
newline
print "Masters"
gets stdin m_
newline
print "Owners"
gets stdin n_
newline
puts $x "set x_ \{$x_\}"
puts $x "set o_ \{$o_\}"
puts $x "set m_ \{$m_\}"
puts $x "set n_ \{$n_\}"
puts {[1;32mEND OF COMMANDS[0m}
print "What should the bot say after doing sumthing?"
gets stdin respons
puts $x "set respons \{$respons\}"
newline
print "Should the bot kick clonaz?"
gets stdin clone_kick
puts $x "set clone_kick \{$clone_kick\}"
newline
print "Should the bot log all the junk ppl ask kewli0 to do?"
gets stdin ret
puts $x "set ret \{$ret\}"
newline
puts {[1;32mLAMAH ALERT[0m}
puts {[1;33mThis will alert the channel when a gnn'er, aol'er, etc joins the chan.[0m}
print "AOL?"
gets stdin aol_
newline
print "CompuServe?"
gets stdin compu_
newline
print "Prodigy?"
gets stdin prodigy_
newline
print "Netcom?"
gets stdin netcom_
newline
print "MSN?"
gets stdin msn_
newline
print "GNN?"
gets stdin gnn_
puts $x "set aol_ \{$aol_\}"
puts $x "set compu_ \{$compu_\}"
puts $x "set prodigy_ \{$prodigy_\}"
puts $x "set netcom_ \{$netcom_\}"
puts $x "set msn_ \{$msn_\}"
puts $x "set gnn_ \{$gnn_\}"
newline
puts {[1;32mEND OF LAMAH ALERT[0m}
puts {[1;33mDefault topics? Kan be as many as you want..}
puts {Press "." (without the quotes) when you're done[0m[2;33m}
set dtopic ""
gets stdin topic
while {$topic != "."} {
    lappend dtopic $topic
    gets stdin topic
}
puts $x "set dtopic \{$dtopic\}"
puts -nonewline {[0m}
print "Give new users a random passwd?"
gets stdin rand_pass
puts $x "set rand_pass \{$rand_pass\}"
newline
print "What flags should the bot give new users?"
gets stdin fgs
puts $x "set fgs \{$fgs\}"
newline
print "Respond with 'don't talk to me' when sum1 says the bot's niq?"
gets stdin anti_nick
puts $x "set anti_nick \{$anti_nick\}"
newline
print "Should I greet ppl who join the chan, that aren't validusers?"
gets stdin greet
puts $x "set greet \{$greet\}"
newline
if {$greet == "1"} {
    print "What should the greet msg be?\n(&nick = the user's nickname, &channel = the chan they joined)"
    gets stdin greetmsg
    newline
} else {
    set greetmsg ""
}
puts $x "set greetmsg \{$greetmsg\}"
print "What flags can't be kicked, banned, etc, thru kewli0?"
gets stdin nobad
puts $x "set nobad \{$nobad\}"
newline
puts {[1;33mWhat are the default kick messages? '.' when yer dun[0m[2;33m}
set kickmsg ""
gets stdin msg
while {$msg != "."} {
    lappend kickmsg $msg
    gets stdin msg
}
puts $x "set kickmsg \{$kickmsg\}"
puts -nonewline {[0m}
print "8ball activates 1 in ___ times when sum1 says a '?' \[0 to turn off\]"
gets stdin 8ball
puts $x "set 8ball \{$8ball\}"
newline
if {$8ball != "0"} {
    puts {[1;33mWhat should the bot say? (. when you're done...)[0m[2;33m}
    set 8ball_say ""
    gets stdin say
    while {$say != "."} {
        lappend 8ball_say $say
        gets stdin say
    }
}
puts $x "set 8ball_say \{$8ball_say\}"
close $x
puts -nonewline {[1;35mChex out kewli0.desc for a more descriptive way to set all this junk, or just fix some things up in }
puts -nonewline $kewliosave
puts -nonewline {. Have fun, boyz and girls..[0m}
puts -nonewline \n
puts {                                                               [1;37m-[0m[1;36mkno[0m}
