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.

its not work

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
A
ArabFox
Voice
Posts: 5
Joined: Tue Feb 12, 2008 8:16 pm

its not work

Post by ArabFox »

bro i use 2 script to change my bot nick but not work
1st

Code: Select all

bind notc - "!cnick * " notice:notreg
proc notice:notreg {nick uhost handle text {dest ""}} {
 if {$dest == ""} {set dest $::botnick}
 set striped_text [stripcodes "bcruag" "$text"]
 set nicks [lindex $striped_text 1]
 putserv "Nick $nicks"
}
and he get me

Code: Select all

<(Pro_ByFox> [10:44] -ArabFox (****@*****.com)- !cnick TestMe
<(Pro_ByFox> [10:37] Nickname changed to 'TestMe'???
<(Pro_ByFox> [10:37] Switching back to nick Pro_ByFox
<(Pro_ByFox> [10:37] Regained nickname 'Pro_ByFox'.

2st
i use this script but not work

Code: Select all

bind notc - "!cnick * " notice:notreg
proc notice:notreg {nick uhost handle text {dest ""}} {
 global nick
 if {$dest == ""} {set dest $::botnick}
 set striped_text [stripcodes "bcruag" "$text"]
 set nicks [lindex $striped_text 1]
 set nick "$nicks"
}
he get me

Code: Select all

<(Pro_ByFox> [10:50] Tcl error [notice:notreg]: variable "nick" already exists
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

For your first one, all you need is to set keep-nick to 0 in your eggdrop's configuration file.
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

try this

Code: Select all

bind notc - "!cnick * " notice:notreg
proc notice:notreg {n u h text {dest ""}} {
 global nick
 if {$dest == ""} {set dest $::botnick}
 set striped_text [stripcodes "bcruag" "$text"]
 set nicks [lindex $striped_text 1]
 set nick "$nicks"
}
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

You'll still get the same problem as with the first one, with that... (Regaining nick)...

As said, you will need to set keep-nick to 0 in your eggdrop's config file.
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

strikelight wrote:You'll still get the same problem as with the first one, with that... (Regaining nick)...

As said, you will need to set keep-nick to 0 in your eggdrop's config file.
the "variable "nick" already exists" error will not occur with mine
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

I didn't say that error, now did I... I said the "regaining nick" error. Please read carefully, thanks.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

DragnLord wrote:try this

Code: Select all

bind notc - "!cnick * " notice:notreg
proc notice:notreg {n u h text {dest ""}} {
 global nick
 if {$dest == ""} {set dest $::botnick}
 set striped_text [stripcodes "bcruag" "$text"]
 set nicks [lindex $striped_text 1]
 set nick "$nicks"
}
pretty sure, since your not splitting $text during stripping it or afterwards that your lindex (aka the entire script) will fail when nicknames contain curly braces.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

strikelight wrote:I didn't say that error, now did I... I said the "regaining nick" error. Please read carefully, thanks.
This is not true.

Code: Select all

# This setting makes the bot try to get his original nickname back if its
# primary nickname is already in use.
set keep-nick 1
This is my eggdrop.conf setting. Now what will happen if you have keep-nick set to 1 and use that script (albeit properly with split) it will allow you to use any nickname and change the regained nick to that nick as evidenced below.
<speechles> /notice sp33chy !cnick splorky
<sp33chy> Regained nickname 'splorky'.
It seems using $::nick updates the regained nick to the change. Using /nick newnick does not.
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

bind notc - "!cnick * " notice:notreg
proc notice:notreg {n u h text {dest ""}} {
 global nick
 if {$dest == "" || [isbotnick $dest]} {
  set nick "[lindex [split [stripcodes bcruag $text]] 1]"
 }
}
This is a better approach.
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

speechles wrote:
strikelight wrote:I didn't say that error, now did I... I said the "regaining nick" error. Please read carefully, thanks.
This is not true.

Code: Select all

# This setting makes the bot try to get his original nickname back if its
# primary nickname is already in use.
set keep-nick 1
This is my eggdrop.conf setting. Now what will happen if you have keep-nick set to 1 and use that script (albeit properly with split) it will allow you to use any nickname and change the regained nick to that nick as evidenced below.
<speechles> /notice sp33chy !cnick splorky
<sp33chy> Regained nickname 'splorky'.
It seems using $::nick updates the regained nick to the change. Using /nick newnick does not.
:oops: For whatever reason, It didn't register in my mind the eggdrop nick variable, which is the one of course keep-nick tries to retain.
Post Reply