egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

botnick help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Tue Nov 04, 2008 12:18 pm    Post subject: botnick help Reply with quote

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
View user's profile Send private message Visit poster's website
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Nov 04, 2008 8:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
silverboy
Halfop


Joined: 11 Feb 2006
Posts: 55

PostPosted: Mon Nov 10, 2008 5:08 am    Post subject: Reply with quote

great brotha.. thanks!
_________________
proxyz..proxyz...i see everywher... O_o
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber