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 

Help With Nick, Keepnick, And Bind Botnick. All Included.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
CoMMy
Halfop


Joined: 24 Jul 2003
Posts: 99
Location: Cyprus

PostPosted: Tue May 18, 2004 4:05 am    Post subject: Help With Nick, Keepnick, And Bind Botnick. All Included. Reply with quote

Well I Have A Problem With This. I Wrote A Public Command That Will Change The Bots Nickname By Setting keep-nick to "0" and binding the new botnick to the proc.

This is the problem.

[10:57:02] * EggDrop is now known as Newnick
[10:57:03] * Newnick is now known as EggDrop

Here is the code:

Code:
#Start Of nick
proc epub_nick {nick host handle chan testes} {
global botnick cmdchar owner keepnick keep-nick person
set person [lindex $testes 0]
if {[matchattr $handle n] && ([string match -nocase "*$handle*" "$owner"])} {
if {$person == ""} {
putserv "NOTICE $nick :Usage: ${cmdchar}nick <new nick>." -next
return 0 }
unbind pub - ${botnick} epub_command
catch {unbind pub - ${botnick} epub_command}
if {${keep-nick} != "0"} {
keepnick 0 }
utimer 3 { putserv "NICK :$person" }
return 1 }}
#End Of nick

#Keepnick Proc
proc keepnick { keeparg } {
global config
if {[info exists keeparg]} {
set fp [open $config r]
set lines [split [read $fp] \n]
close $fp
set idx [lsearch -glob $lines "set keep-nick *"]
set newline [list set keep-nick $keeparg]
if {$idx != -1} {
  set lines [lreplace $lines $idx $idx $newline]
} else {
  lappend lines $newline
}
set fp [open $config w]
puts -nonewline $fp [join $lines \n]
close $fp }
rehash }
#End proc


Can you help please?
_________________
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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