Code: Select all
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1203
can anyone edit it so it can work in the channel when i type
.nicktake <nick>
then bot ll take this nick as soon as it is available ?
Code: Select all
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1203
Code: Select all
# n flag means only the bot owners can use this command
bind pub n .nicktake nicktake
bind msg n .nicktake nicktakemsg
proc nicktakemsg {nick host handle text} {
nicktake $nick $host $handle "pm" $text
}
proc nicktake {n host handle chan text} {
# sanity checks, detects problems with user input
if {![llength [split $text]]} {
putserv "notice $n :Please supply a nickname as well, try again :P"
} elseif {[llength [split $text]] > 1} {
putserv "notice $n :Nicknames cannot contain spaces, try again :P"
} elseif {[string match "-alt" [lindex [split $text] 0]]} {
# set the global nick variable to the global alternate nick variable
set ::nick $::altnick
} else {
# credit to slennox for the question mark replacement thingy
while {[regsub -- \\? $text [rand 10] text]} {continue}
# ::nick is our global nick variable set it as per user request
set ::nick [lindex [split $text] 0]
}
}