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: Select all
#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