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 

its not work

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


Joined: 12 Feb 2008
Posts: 5

PostPosted: Mon May 05, 2008 6:48 am    Post subject: its not work Reply with quote

bro i use 2 script to change my bot nick but not work
1st
Code:
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:
<(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:
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:
<(Pro_ByFox> [10:50] Tcl error [notice:notreg]: variable "nick" already exists
Back to top
View user's profile Send private message
strikelight
Owner


Joined: 07 Oct 2002
Posts: 708

PostPosted: Mon May 05, 2008 7:07 pm    Post subject: Reply with quote

For your first one, all you need is to set keep-nick to 0 in your eggdrop's configuration file.
Back to top
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Tue May 06, 2008 12:05 am    Post subject: Reply with quote

try this
Code:
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"
}
Back to top
View user's profile Send private message
strikelight
Owner


Joined: 07 Oct 2002
Posts: 708

PostPosted: Tue May 06, 2008 1:26 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Tue May 06, 2008 12:01 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
strikelight
Owner


Joined: 07 Oct 2002
Posts: 708

PostPosted: Tue May 06, 2008 1:06 pm    Post subject: Reply with quote

I didn't say that error, now did I... I said the "regaining nick" error. Please read carefully, thanks.
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 May 06, 2008 4:01 pm    Post subject: Reply with quote

DragnLord wrote:
try this
Code:
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.
Back to top
View user's profile Send private message
speechles
Revered One


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

PostPosted: Tue May 06, 2008 4:08 pm    Post subject: Reply with quote

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:
# 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.
Quote:
<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.
Back to top
View user's profile Send private message
speechles
Revered One


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

PostPosted: Tue May 06, 2008 5:42 pm    Post subject: Reply with quote

Code:
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.
Back to top
View user's profile Send private message
strikelight
Owner


Joined: 07 Oct 2002
Posts: 708

PostPosted: Tue May 06, 2008 6:23 pm    Post subject: Reply with quote

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:
# 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.
Quote:
<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.


Embarassed 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.
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