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.

Having troubles with a simple code. (bind notc)

Old posts that have not been replied to for several years.
Locked
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Having troubles with a simple code. (bind notc)

Post by awyeah »

Here is the code from which I get errors from.

Code: Select all

bind notc - * verbose:procedure 

proc verbose:procedure {nick uhost hand text {chan ""}} {
 global botnick verbosetype verbosefile verbosewhy
  set serviceverbose [lindex $text 0]; set verbose "VERBOSE"; set servicearrow [lindex $text 2]
  set arrow "=>"; set user [lindex $text 1]; set channel [lindex $text 4]; putlog a
  if {($chan == $botnick) || ($nick == $botnick)} { return 0 }; putlog b
  if {([string equal $nick "ChanServ"]) && ([string match -nocase *$serviceverbose* $verbose]) && ([string equal $servicearrow $arrow]) && ([string match -nocase "*!*" $user]) && ([string match -nocase "*@*" $user]) && ([string match -nocase "#*" $channel])} {; putlog c
  set access [lindex $text 3]; set modify [lindex $text 5]; set chan [lindex $text 4]
  set from [lindex $text 1]; set nick [lindex [split $from "!"] 0]; set uhost [lindex [split $from "!"] 1]
  putlog "CHANSERV VERBOSE [string toupper $chan] = $access - $modify - $chan - $from - $nick - $uhost"
  set file [open $verbosefile "a"]; set time [unixtime]; set whytime [ctime $time]
  set date [string trim [lindex $whytime 2]]; set month [string trim [lindex $whytime 1]]; set time [string trim [lindex $whytime 3]]
   if {($verbosewhy == 1)} { puts $file "\n\[$date $month $time\] -ChanServ- $text"; catch {close $file}; putserv "PRIVMSG $chanservices :WHY $chan $nick" }
   if {($verbosewhy != 1)} { puts $file "\n[$date $month $time\] -ChanServ- $text"; return 0 }
   putlog "a1"
   return 0
   }
}

I get this error.

Code: Select all

[16:44] Tcl error [verbose:procedure]: missing close-bracket
I cannot find any missing close bracket anywhere.

Plus I tried the if statements with switches as well gives me the same result. Please help me.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
d
dollar
Op
Posts: 178
Joined: Tue Oct 28, 2003 3:47 pm
Location: Netherlands

Post by dollar »

Code: Select all

if {($verbosewhy != 1)} { puts $file "\n[$date $mont
Escape the [
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Ah thanx... I'm such a loser at times.
Can't see the problem even when its infront of you.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked