This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

botnick help

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
silverboy
Halfop
Posts: 55
Joined: Sat Feb 11, 2006 5:44 am
Contact:

botnick help

Post by silverboy »

Code: Select all

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
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

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]
   }
}
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.
s
silverboy
Halfop
Posts: 55
Joined: Sat Feb 11, 2006 5:44 am
Contact:

Post by silverboy »

great brotha.. thanks!
proxyz..proxyz...i see everywher... O_o
Post Reply