| View previous topic :: View next topic |
| Author |
Message |
silverboy Halfop
Joined: 11 Feb 2006 Posts: 55
|
Posted: Tue Nov 04, 2008 12:18 pm Post subject: botnick help |
|
|
| Code: | | http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1203 |
this script only works in partyline...
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 ? _________________ proxyz..proxyz...i see everywher... O_o |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Nov 04, 2008 8:34 pm Post subject: |
|
|
| Code: | # 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]
}
} |
This keeps the same features as slennox's script does. Allows you to use question marks to be replaced with random numerals and lets you switch to the bot's alternate nickname by using .nicktake -alt. Basically identical behavior with the key difference being it works in any channel your bot is in or via private message, no longer works via dcc chat/partyline. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
silverboy Halfop
Joined: 11 Feb 2006 Posts: 55
|
Posted: Mon Nov 10, 2008 5:08 am Post subject: |
|
|
great brotha.. thanks! _________________ proxyz..proxyz...i see everywher... O_o |
|
| Back to top |
|
 |
|