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.
Old posts that have not been replied to for several years.
ZoneISP
Voice
Posts: 11 Joined: Sun May 29, 2005 4:50 pm
Location: Kuwait
Contact:
Post
by ZoneISP » Fri Aug 19, 2005 12:50 pm
hi again
i want command that owner type !setnick harry` the bot chabged it to harry` anyone can help with me this plz
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Fri Aug 19, 2005 1:38 pm
This will change the botnick until the next rehash/restart.
For a permanent nickchange you have to manually change it in the config file.
Code: Select all
bind pub n !setnick foo
proc foo {n u h c a} {
set nick [lindex [split $a] 0]
set ::nick [join $nick]
}
Ian-Highlander
Op
Posts: 165 Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire
Post
by Ian-Highlander » Fri Aug 19, 2005 1:50 pm
Code: Select all
bind pub n !setnick nick_change
proc nick_change {nick host handle channel rest} {
global keep-nick
set new_nick [lindex [split $rest] 0]
set keep-nick 0
putserv "NICK $new_nick"
return 0
}
Edit: greenbear beat me to it, his code is nicer, use that
"Insanity Takes Its Toll, Please Have Exact Change"
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Fri Aug 19, 2005 3:28 pm
eggdrop should have [bind pub] unavailable to owners, controlling the bot that way is incredibly lame
sKy
Op
Posts: 194 Joined: Thu Apr 14, 2005 5:58 pm
Location: Germany
Post
by sKy » Fri Aug 19, 2005 8:02 pm
greenbear wrote: This will change the botnick until the next rehash/restart.
For a permanent nickchange you have to manually change it in the config file.
Code: Select all
bind pub n !setnick foo
proc foo {n u h c a} {
set nick [lindex [split $a] 0]
set ::nick [join $nick]
}
Well, small correction. lindex will return you a string and not a list. With that reason there is really no need to join this string. lrange and lindex are list commands. But other then lrange will lindex return a string.
set ::nick [join $nick] --> set ::nick $nick
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Thu Aug 25, 2005 2:53 am
Actually wrong, Using join is a very good idea incase of braces.
If the command gets used and the nickname contains brackets split will add braces around it and join removes those braces.
But ofcourse you can just make the code not make useless variables
Code: Select all
bind pub n !setnick change:nick
proc change:nick {n u h c a} {
set ::nick [join [lindex [split $a] 0]]
}
spock
Master
Posts: 319 Joined: Thu Dec 12, 2002 8:40 pm
Post
by spock » Thu Aug 25, 2005 9:58 am
metroid, try your script with nicknames such as {abc} or {abc}d
it probably wont do what you want
photon?