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 

Tcl error [pub:delgreet]: extra characters after close-quote

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
ache
Voice


Joined: 14 Oct 2005
Posts: 14

PostPosted: Thu Nov 03, 2005 2:55 pm    Post subject: Tcl error [pub:delgreet]: extra characters after close-quote Reply with quote

I canīt seem to find the problem with this.
I get this error:
Code:

Tcl error [pub:delgreet]: extra characters after close-quote

This is the code i have atm:
Code:

proc pub:delgreet { nick uhost handle channel arguments } {
  set greetdb "scripts/charlie.tcl/greet.db"
  list arguments $arguments
  set greetnick [lindex $arguments 0]
  set greetchannel [lindex $arguments 1]
  set searchString "$greetchannel $greetnick"
  set greetChannel [open $greetdb "r"]
  set greetData [read $greetChannel]
  close $greetChannel
  set greetData [split $greetData "\n"]
  if {($greetchannel == "ALL")} {
    set greetIndex [lsearch -all $greetData *$greetnick*]
    foreach { greets } $greetIndex {
      set greetData [lreplace $greetData $greetIndex $greetIndex]
    }
    putquick "NOTICE $nick :All greets for $greetnick has been removed."
  } elseif {([string index $greetchannel 0]=="#")} {
    set greetIndex [lsearch $greetData $searchString*]
    set greetData [lreplace $greetData $greetIndex $greetIndex]
    putquick "NOTICE $nick :Greeting for $greetnick has been removed from channel $greetchan."
  }   elseif {([string range $greetchannel 0 2]=="all")} { 
    set greetIndex [lsearch $greetData $searchString*]
    set greetData [lreplace $greetData $greetIndex $greetIndex]
    putquick "NOTICE $nick :Greeting for $greetnick has been removed from the "all" block."
  } else {
    putquick "NOTICE $nick :Missing parameter! \026!chelp !delgreet\026 for more info."
    return
  }
  set greetChannel [open $greetdb "w"]
  set greetData [join $greetData "\n"]
  puts -nonewline $greetChannel "$greetData\n"
  close $greetChannel
}
Back to top
View user's profile Send private message
ranny
Halfop


Joined: 22 Jun 2005
Posts: 49
Location: switzerland

PostPosted: Thu Nov 03, 2005 5:46 pm    Post subject: Reply with quote

hello,

replace

Code:
putquick "NOTICE $nick :Greeting for $greetnick has been removed from the "all" block."

with
Code:
putquick "NOTICE $nick :Greeting for $greetnick has been removed from the \"all\" block."
Back to top
View user's profile Send private message
ache
Voice


Joined: 14 Oct 2005
Posts: 14

PostPosted: Fri Nov 04, 2005 2:41 am    Post subject: Reply with quote

ahh Smile
thank you ranny.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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