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.

Error in pxi2h.tcl

Support & discussion of released scripts, and announcements of new releases.
P
Passionate
Voice
Posts: 15
Joined: Tue Oct 25, 2005 9:38 am

Error in pxi2h.tcl

Post by Passionate »

Hello,

Theres an error in this tcl which am not able to trace it. Please help me to fix it.

Code: Select all

########################################################################
###                                         __  __  __               ###
###               ___  ____ __  _ ___  ___ / /_ \ \/ /               ###
###              / _ \' __/ _ `/ / -_)/ __/  _/  )  (                ###
###             / .__/_/  \___/ /\___/\__/\__/  /_/\_\               ###
###            /_/ -------- /__/ ---------------------               ###
###                                                                  ###
########################################################################
### ProjectX IRC 2 HTML v2.00 by Natrak <natrak@projectx.mx.dk>      ###
########################################################################
### This script logs what goes on in an IRC channel, converts it to  ###
### HTML and make it visible to user on the web. To see pxi2h in     ###
### action visit:                                                    ###
###   http://www.projectx.mx.dk/contact/spycam.html                  ###
########################################################################
### Goto http://www.projectx.mx.dk/contact/bugreport.shtml to send   ###
### bug reports, or http://www.projectx.mx.dk/contact/feedback.shtml ###
### to tell us what you think of this script.                        ###
########################################################################
### Configuration:
#

# The channel set to show online:
set pxi2h_chan(#channel) "/home/user/public_html/channel.html"
#
# The prefix to prevent stuff from being shown on the web:
set pxi2h(secret) "."
#
# Maximum number of lines shown on the web:
set pxi2h(maxlines) 15
#
# The page is set to refes every X seconds:
set pxi2h(refresh) 10
#
# The title of the page:
set pxi2h(title) "Canal #Channel - Rede BrasIRC.net"
#
# Text color:
set pxi2h(text) "#FFFFFF"
#
# Background color:
set pxi2h(bgcolor) "#000000"
#
# Heading color:
set pxi2h(heading) "#6666EE"
#
# Font type:
set pxi2h(font) "monospace"
#
### End of config.
########################################################################

proc pxi2h:style {event chan nick host arg} {
  global pxi2h_history
  set chan [pxi2h:findchan $chan]
  if {$chan == ""} { return }
  switch -- $event {
    actn { set text "* $nick $arg" }
    join { set text "*** $nick ($host) has joined $chan" }
    kick { set text "*** [lindex $arg 0] was kicked by $nick ([lrange $arg 1 end])" }
    mode { set text "*** $nick sets mode: $arg" }
    nick { set text "*** $nick is now known as $arg" }
    part { set text "*** $nick ($host) has left $chan" }
    pubm { set text "<$nick> $arg" }
    sign { set text "*** $nick ($host) has quit irc ($arg)" }
    topc { set text "*** $nick changes topic to '$arg'" }
  }
  set pxi2h_history($chan) [lappend pxi2h_history($chan) [pxi2h:control [pxi2h:convert $text]]]
  utimer 1 "pxi2h:make $chan"
}

proc pxi2h:dcc {hand idx arg} {
  global pxi2h
  if {[string tolower [lindex $arg 0]] == "on"} {
    set pxi2h(status) "on"
  } elseif {[string tolower [lindex $arg 0]] == "off"} {
    set pxi2h(status) "off"
  }
  putdcc $idx "ProjectX irc2html is $pxi2h(status)"
  return 1 
}

proc pxi2h:html {text} {
  return [pxi2h:unconvert [pxi2h:convert $text]]
}
proc pxi2h:control {text} {
 set temp $text
 set text ""
 set bold "0"
 set undr "0"
 set color "0"

 for {set i 0} {$i < [string length $temp]} {incr i} {
   set c [string index $temp $i]
   switch -- $c {
      { if {$bold == "1"} { set text "$text</B>"; set bold "0" } else { set text "$text<B>"; set bold "1" } }
      { if {$undr == "1"} { set text "$text</U>"; set undr "0" } else { set text "$text<U>"; set undr "1" } }
      { }
      { }
     default { set text "$text$c" }
   }
 }

 if {$bold == "1"} { set text "$text</B>" }
 if {$undr == "1"} { set text "$text</U>" }
 return $text
}
proc pxi2h:convert {text} {
  regsub -all , $text "" text
  regsub -all 0 $text "" text
  regsub -all 1 $text "" text
  regsub -all 2 $text "" text
  regsub -all 3 $text "" text
  regsub -all 4 $text "" text
  regsub -all 5 $text "" text
  regsub -all 6 $text "" text
  regsub -all 7 $text "" text
  regsub -all 8 $text "" text
  regsub -all 9 $text "" text
  regsub -all {\]} $text "p!c1" text
  regsub -all {\[} $text "p!c2" text
  regsub -all {\}} $text "p!c3" text
  regsub -all {\{} $text "p!c4" text
  regsub -all {\$} $text "p!c5" text
  regsub -all {\"} $text "p!c6" text
  regsub -all {\;} $text "p!c7" text
  regsub -all {\\} $text "p!c8" text
  regsub -all {\/} $text "p!c9" text
  regsub -all & $text "\\&" text
  regsub -all < $text "\\<" text
  regsub -all > $text "\\>" text
  regsub -all \" $text "\\"" text
  regsub -all "  " $text "\\  " text
  return $text
}
proc pxi2h:unconvert {text} {
  regsub -all {p!c1} $text "\]" text
  regsub -all {p!c2} $text "\[" text
  regsub -all {p!c3} $text "\}" text
  regsub -all {p!c4} $text "\{" text
  regsub -all {p!c5} $text "\$" text
  regsub -all {p!c6} $text "\"" text
  regsub -all {p!c7} $text "\;" text
  regsub -all {p!c8} $text "\\" text
  regsub -all {p!c9} $text "\/" text
  return $text
}

proc pxi2h:make {chan} {
  global pxi2h_history pxi2h pxi2h_chan server
  if {[llength $pxi2h_history($chan)] > $pxi2h(maxlines)} { set pxi2h_history($chan) [lrange $pxi2h_history($chan) 1 end] }
  set nicks ""
  foreach nick [chanlist $chan] { 
    if {[isop $nick $chan]} {
      set nicks "$nicks @[pxi2h:convert $nick]"
    } elseif {[isvoice $nick $chan]} {
      set nicks "$nicks +[pxi2h:convert $nick]"
    } else {
      set nicks "$nicks [pxi2h:convert $nick]"
    } 
  }
  set nicks [lsort -increasing $nicks]
  set html [open $pxi2h_chan($chan) w]
  puts $html "<HTML>\n<HEAD>\n <TITLE>$pxi2h(title)</TITLE>\n <META HTTP-EQUIV=\"Refresh\" CONTENT=\"$pxi2h(refresh)\">\n</HEAD>"
  puts $html "<BODY TEXT=\"$pxi2h(text)\" BGCOLOR=\"$pxi2h(bgcolor)\" LINK=\"$pxi2h(heading)\" VLINK=\"$pxi2h(heading)\">"
  puts $html " <FONT COLOR=\"$pxi2h(heading)\"><FONT SIZE=\"+1\" FACE=\"sans-serif\">$chan</FONT> <FONT SIZE=\"-1\" FACE=\"monospace\">\[[lindex [getchanmode $chan] 0]\]: '[pxi2h:html [topic $chan]]'</FONT></FONT><P>"
  puts $html " <FONT SIZE=\"-1\" FACE=\"$pxi2h(font)\">"
  puts $html "  <B>Server.</B>: [string range $server 0 [expr [string last ":" $server] - 1]]<BR>"
  puts $html "  <B>Users..</B>: [pxi2h:unconvert $nicks]<BR>\n  <HR SIZE=\"1\">"
  close $html
  set html [open $pxi2h_chan($chan) a]
  if {$pxi2h(status) == "on"} {
    for {set i 0} {$i < [llength $pxi2h_history($chan)]} { incr i } {
      puts $html "  \[[strftime "%H:%M"]\][pxi2h:unconvert [lindex $pxi2h_history($chan) $i]]<BR>"
    }
  } else {
    puts $html "  <BR><CENTER><B>O F F L I N E !</B></CENTER><P>"
  }
  puts $html " </FONT>\n <HR SIZE=\"1\">\n <CENTER><FONT SIZE=\"-1\" FACE=\"sans-serif\"><I>Powered by <A HREF=\"http://www.egghelp.org/\">www.egghelp.org</A></I></FONT></CENTER>\n</BODY>\n</HTML>"
  close $html
}

proc pxi2h:findchan {chan} {
  global pxi2h_chan
  foreach ele [array names pxi2h_chan] {
    if {[string tolower $ele] == [string tolower $chan]} { return $ele }
  }
}

proc pxi2h:ctcp {nick host handle dest keyword arg} {
  if {![string compare $keyword "ACTION"]} { pxi2h:style "actn" $dest $nick $host $arg }
}
proc pxi2h:join {nick host handle chan} {
  pxi2h:style "join" $chan $nick $host ""
}
proc pxi2h:kick {nick host handle chan knick arg} {
  pxi2h:style "kick" $chan $nick $host "$knick $arg"
}
proc pxi2h:mode11x {nick host handle chan arg} {
  if {[lindex $arg 0] == "+k"} { set mode [lindex $arg 0] } else { set mode [lrange $arg 0 end] }
  pxi2h:style "mode" $chan $nick $host $mode
}
proc pxi2h:mode13x {nick host handle chan arg mnick} {
  if {[lindex $arg 0] == "+k"} { set mode [lindex $arg 0] } else { set mode "[lrange $arg 0 end] $mnick" }
  pxi2h:style "mode" $chan $nick $host $mode
}
proc pxi2h:nick {nick host handle chan newnick} {
  pxi2h:style "nick" $chan $nick $host $newnick
}
proc pxi2h:part {nick host handle chan rest} {
  pxi2h:style "part" $chan $nick $host ""
}
proc pxi2h:pubm {nick host handle chan arg} {
  global pxi2h
  if {[string range $arg 0 0] != $pxi2h(secret)} { pxi2h:style "pubm" $chan $nick $host $arg }
}
proc pxi2h:sign {nick host handle chan arg} {
  pxi2h:style "sign" $chan $nick $host $arg
}
proc pxi2h:topc {nick host handle chan topic} {
  if {$nick != "*"} { pxi2h:style "topc" $chan $nick $host $topic }
}

bind dcc +m irc2html pxi2h:dcc
bind ctcp - ACTION pxi2h:ctcp
bind join - * pxi2h:join
bind kick - * pxi2h:kick
if {[lindex $version 1] < "01030000"} {
  bind mode - * pxi2h:mode11x
} else {
  bind mode - * pxi2h:mode13x
}
bind nick - * pxi2h:nick
bind part - * pxi2h:part
bind pubm - * pxi2h:pubm
bind sign - * pxi2h:sign
bind topc - * pxi2h:topc

set pxi2h(ver) "2.00"
if {![info exists pxi2h(status)]} { set pxi2h(status) "on" }
foreach ele [array names pxi2h_chan] {
  if {![info exists pxi2h_history($ele)]} { set pxi2h_history($ele) "" }
  pxi2h:make $ele
}
putlog "\[ProjectX\] irc2html v$pxi2h(ver) loaded."
The error msg was

Code: Select all

[11:56] invalid channel: #channel
    while executing
"chanlist $chan"
    (procedure "pxi2h:make" line 5)
    invoked from within
"pxi2h:make $ele"
    ("foreach" body line 3)
    invoked from within
"foreach ele [array names pxi2h_chan] {
  if {![info exists pxi2h_history($ele)]} { set pxi2h_history($ele) "" }
  pxi2h:make $ele
}"
    (file "scripts/pxi2h.tcl" line 241)
    invoked from within
"source scripts/pxi2h.tcl"



Thanks in advance.

Regards
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

set pxi2h_chan(#channel) "/home/user/public_html/channel.html"
That should be the reason for the error. You must change #channel to a valid channel.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
P
Passionate
Voice
Posts: 15
Joined: Tue Oct 25, 2005 9:38 am

Post by Passionate »

Hello,

I tried replacing #channel with the channel name it didnt work out.


Rgds
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

changing

Code: Select all

set pxi2h_chan(#channel) "/home/user/public_html/channel.html" 
to

Code: Select all

set pxi2h_chan(#mychannelHERE) "/home/user/public_html/mychannelHERE.html" 
will probably work
P
Passionate
Voice
Posts: 15
Joined: Tue Oct 25, 2005 9:38 am

Post by Passionate »

Nopes

It didnt work yet. the same result. :-(

Rgds
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

You're rehashing the bot after each edit?

Also:

Code: Select all

.set errorInfo
The above should help to narrow down an error.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
P
Passionate
Voice
Posts: 15
Joined: Tue Oct 25, 2005 9:38 am

Post by Passionate »

Hello Alchera,

I do rehash everytime i edit. But the bot goes offline saying this error. How do i get the .set ErrorInfo then? :(


Rgds
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

did you replace "user" with your user? You should not say "isnt working", but explain the problem more.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Passionate wrote:Hello Alchera,

I do rehash everytime i edit. But the bot goes offline saying this error. How do i get the .set ErrorInfo then? :(


Rgds
use catch to load it then,

put this in your eggdrop config file

Code: Select all

if {[catch { source scripts/scriptname.tcl } err]} {
  putlog "Found error in scriptname: $err"
}
P
Passionate
Voice
Posts: 15
Joined: Tue Oct 25, 2005 9:38 am

Post by Passionate »

Dear All,

I am pasting the code back again here. To Show the modifications i made in it. Also the error which i got in the putty when i tried to load the bot

Code: Select all

########################################################################
###                                         __  __  __               ###
###               ___  ____ __  _ ___  ___ / /_ \ \/ /               ###
###              / _ \' __/ _ `/ / -_)/ __/  _/  )  (                ###
###             / .__/_/  \___/ /\___/\__/\__/  /_/\_\               ###
###            /_/ -------- /__/ ---------------------               ###
###                                                                  ###
########################################################################
### ProjectX IRC 2 HTML v2.00 by Natrak <natrak@projectx.mx.dk>      ###
########################################################################
### This script logs what goes on in an IRC channel, converts it to  ###
### HTML and make it visible to user on the web. To see pxi2h in     ###
### action visit:                                                    ###
###   http://www.projectx.mx.dk/contact/spycam.html                  ###
########################################################################
### Goto http://www.projectx.mx.dk/contact/bugreport.shtml to send   ###
### bug reports, or http://www.projectx.mx.dk/contact/feedback.shtml ###
### to tell us what you think of this script.                        ###
########################################################################
### Configuration:
#

# The channel set to show online:
set pxi2h_chan(#testing) "/home/r/public_html/testing.html"
#
# The prefix to prevent stuff from being shown on the web:
set pxi2h(secret) "."
#
# Maximum number of lines shown on the web:
set pxi2h(maxlines) 15
#
# The page is set to refes every X seconds:
set pxi2h(refresh) 10
#
# The title of the page:
set pxi2h(title) "Canal #Channel - Rede BrasIRC.net"
#
# Text color:
set pxi2h(text) "#FFFFFF"
#
# Background color:
set pxi2h(bgcolor) "#000000"
#
# Heading color:
set pxi2h(heading) "#6666EE"
#
# Font type:
set pxi2h(font) "monospace"
#
### End of config.
########################################################################

proc pxi2h:style {event chan nick host arg} {
  global pxi2h_history
  set chan [pxi2h:findchan $chan]
  if {$chan == ""} { return }
  switch -- $event {
    actn { set text "* $nick $arg" }
    join { set text "*** $nick ($host) has joined $chan" }
    kick { set text "*** [lindex $arg 0] was kicked by $nick ([lrange $arg 1 end])" }
    mode { set text "*** $nick sets mode: $arg" }
    nick { set text "*** $nick is now known as $arg" }
    part { set text "*** $nick ($host) has left $chan" }
    pubm { set text "<$nick> $arg" }
    sign { set text "*** $nick ($host) has quit irc ($arg)" }
    topc { set text "*** $nick changes topic to '$arg'" }
  }
  set pxi2h_history($chan) [lappend pxi2h_history($chan) [pxi2h:control [pxi2h:convert $text]]]
  utimer 1 "pxi2h:make $chan"
}

proc pxi2h:dcc {hand idx arg} {
  global pxi2h
  if {[string tolower [lindex $arg 0]] == "on"} {
    set pxi2h(status) "on"
  } elseif {[string tolower [lindex $arg 0]] == "off"} {
    set pxi2h(status) "off"
  }
  putdcc $idx "ProjectX irc2html is $pxi2h(status)"
  return 1 
}

proc pxi2h:html {text} {
  return [pxi2h:unconvert [pxi2h:convert $text]]
}
proc pxi2h:control {text} {
 set temp $text
 set text ""
 set bold "0"
 set undr "0"
 set color "0"

 for {set i 0} {$i < [string length $temp]} {incr i} {
   set c [string index $temp $i]
   switch -- $c {
      { if {$bold == "1"} { set text "$text</B>"; set bold "0" } else { set text "$text<B>"; set bold "1" } }
      { if {$undr == "1"} { set text "$text</U>"; set undr "0" } else { set text "$text<U>"; set undr "1" } }
      { }
      { }
     default { set text "$text$c" }
   }
 }

 if {$bold == "1"} { set text "$text</B>" }
 if {$undr == "1"} { set text "$text</U>" }
 return $text
}
proc pxi2h:convert {text} {
  regsub -all , $text "" text
  regsub -all 0 $text "" text
  regsub -all 1 $text "" text
  regsub -all 2 $text "" text
  regsub -all 3 $text "" text
  regsub -all 4 $text "" text
  regsub -all 5 $text "" text
  regsub -all 6 $text "" text
  regsub -all 7 $text "" text
  regsub -all 8 $text "" text
  regsub -all 9 $text "" text
  regsub -all {\]} $text "p!c1" text
  regsub -all {\[} $text "p!c2" text
  regsub -all {\}} $text "p!c3" text
  regsub -all {\{} $text "p!c4" text
  regsub -all {\$} $text "p!c5" text
  regsub -all {\"} $text "p!c6" text
  regsub -all {\;} $text "p!c7" text
  regsub -all {\\} $text "p!c8" text
  regsub -all {\/} $text "p!c9" text
  regsub -all & $text "\\&" text
  regsub -all < $text "\\<" text
  regsub -all > $text "\\>" text
  regsub -all \" $text "\\"" text
  regsub -all "  " $text "\\  " text
  return $text
}
proc pxi2h:unconvert {text} {
  regsub -all {p!c1} $text "\]" text
  regsub -all {p!c2} $text "\[" text
  regsub -all {p!c3} $text "\}" text
  regsub -all {p!c4} $text "\{" text
  regsub -all {p!c5} $text "\$" text
  regsub -all {p!c6} $text "\"" text
  regsub -all {p!c7} $text "\;" text
  regsub -all {p!c8} $text "\\" text
  regsub -all {p!c9} $text "\/" text
  return $text
}

proc pxi2h:make {chan} {
  global pxi2h_history pxi2h pxi2h_chan server
  if {[llength $pxi2h_history($chan)] > $pxi2h(maxlines)} { set pxi2h_history($chan) [lrange $pxi2h_history($chan) 1 end] }
  set nicks ""
  foreach nick [chanlist $chan] { 
    if {[isop $nick $chan]} {
      set nicks "$nicks @[pxi2h:convert $nick]"
    } elseif {[isvoice $nick $chan]} {
      set nicks "$nicks +[pxi2h:convert $nick]"
    } else {
      set nicks "$nicks [pxi2h:convert $nick]"
    } 
  }
  set nicks [lsort -increasing $nicks]
  set html [open $pxi2h_chan($chan) w]
  puts $html "<HTML>\n<HEAD>\n <TITLE>$pxi2h(title)</TITLE>\n <META HTTP-EQUIV=\"Refresh\" CONTENT=\"$pxi2h(refresh)\">\n</HEAD>"
  puts $html "<BODY TEXT=\"$pxi2h(text)\" BGCOLOR=\"$pxi2h(bgcolor)\" LINK=\"$pxi2h(heading)\" VLINK=\"$pxi2h(heading)\">"
  puts $html " <FONT COLOR=\"$pxi2h(heading)\"><FONT SIZE=\"+1\" FACE=\"sans-serif\">$chan</FONT> <FONT SIZE=\"-1\" FACE=\"monospace\">\[[lindex [getchanmode $chan] 0]\]: '[pxi2h:html [topic $chan]]'</FONT></FONT><P>"
  puts $html " <FONT SIZE=\"-1\" FACE=\"$pxi2h(font)\">"
  puts $html "  <B>Server.</B>: [string range $server 0 [expr [string last ":" $server] - 1]]<BR>"
  puts $html "  <B>Users..</B>: [pxi2h:unconvert $nicks]<BR>\n  <HR SIZE=\"1\">"
  close $html
  set html [open $pxi2h_chan($chan) a]
  if {$pxi2h(status) == "on"} {
    for {set i 0} {$i < [llength $pxi2h_history($chan)]} { incr i } {
      puts $html "  \[[strftime "%H:%M"]\][pxi2h:unconvert [lindex $pxi2h_history($chan) $i]]<BR>"
    }
  } else {
    puts $html "  <BR><CENTER><B>O F F L I N E !</B></CENTER><P>"
  }
  puts $html " </FONT>\n <HR SIZE=\"1\">\n <CENTER><FONT SIZE=\"-1\" FACE=\"sans-serif\"><I>Powered by <A HREF=\"http://www.egghelp.org/\">www.egghelp.org</A></I></FONT></CENTER>\n</BODY>\n</HTML>"
  close $html
}

proc pxi2h:findchan {chan} {
  global pxi2h_chan
  foreach ele [array names pxi2h_chan] {
    if {[string tolower $ele] == [string tolower $chan]} { return $ele }
  }
}

proc pxi2h:ctcp {nick host handle dest keyword arg} {
  if {![string compare $keyword "ACTION"]} { pxi2h:style "actn" $dest $nick $host $arg }
}
proc pxi2h:join {nick host handle chan} {
  pxi2h:style "join" $chan $nick $host ""
}
proc pxi2h:kick {nick host handle chan knick arg} {
  pxi2h:style "kick" $chan $nick $host "$knick $arg"
}
proc pxi2h:mode11x {nick host handle chan arg} {
  if {[lindex $arg 0] == "+k"} { set mode [lindex $arg 0] } else { set mode [lrange $arg 0 end] }
  pxi2h:style "mode" $chan $nick $host $mode
}
proc pxi2h:mode13x {nick host handle chan arg mnick} {
  if {[lindex $arg 0] == "+k"} { set mode [lindex $arg 0] } else { set mode "[lrange $arg 0 end] $mnick" }
  pxi2h:style "mode" $chan $nick $host $mode
}
proc pxi2h:nick {nick host handle chan newnick} {
  pxi2h:style "nick" $chan $nick $host $newnick
}
proc pxi2h:part {nick host handle chan rest} {
  pxi2h:style "part" $chan $nick $host ""
}
proc pxi2h:pubm {nick host handle chan arg} {
  global pxi2h
  if {[string range $arg 0 0] != $pxi2h(secret)} { pxi2h:style "pubm" $chan $nick $host $arg }
}
proc pxi2h:sign {nick host handle chan arg} {
  pxi2h:style "sign" $chan $nick $host $arg
}
proc pxi2h:topc {nick host handle chan topic} {
  if {$nick != "*"} { pxi2h:style "topc" $chan $nick $host $topic }
}

bind dcc +m irc2html pxi2h:dcc
bind ctcp - ACTION pxi2h:ctcp
bind join - * pxi2h:join
bind kick - * pxi2h:kick
if {[lindex $version 1] < "01030000"} {
  bind mode - * pxi2h:mode11x
} else {
  bind mode - * pxi2h:mode13x
}
bind nick - * pxi2h:nick
bind part - * pxi2h:part
bind pubm - * pxi2h:pubm
bind sign - * pxi2h:sign
bind topc - * pxi2h:topc

set pxi2h(ver) "2.00"
if {![info exists pxi2h(status)]} { set pxi2h(status) "on" }
foreach ele [array names pxi2h_chan] {
  if {![info exists pxi2h_history($ele)]} { set pxi2h_history($ele) "" }
  pxi2h:make $ele
}
putlog "\[ProjectX\] irc2html v$pxi2h(ver) loaded."
The Error Message am getting on Putty while starting the bot.

Code: Select all

[19:46] Tcl error in file 'BoredMan.conf':
[19:46] invalid channel: #testing
    while executing
"chanlist $chan"
    (procedure "pxi2h:make" line 5)
    invoked from within
"pxi2h:make $ele"
    ("foreach" body line 3)
    invoked from within
"foreach ele [array names pxi2h_chan] {
  if {![info exists pxi2h_history($ele)]} { set pxi2h_history($ele) "" }
  pxi2h:make $ele
}"
    (file "scripts/pxi2h.tcl" line 241)
    invoked from within
"source scripts/pxi2h.tcl"
    (file "BoredMan.conf" line 276)
[19:46] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
Rgds
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Is #testing a valid channel, because it appears not to be.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

Hint: only channels which your bot has records of are valid (case insensitive).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Everything between:
### Configuration:
#
and...
#
### End of config.
You edit to suite your own needs; special attention is to be made to this line:

Code: Select all

set pxi2h_chan(#testing) "/home/r/public_html/testing.html"
It has to be a valid channel; change the the channel name and html name to reflect the channel the bot will actually be monitoring.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
P
Passionate
Voice
Posts: 15
Joined: Tue Oct 25, 2005 9:38 am

Post by Passionate »

Hello,

I have modified the line


Code: Select all

set pxi2h_chan(#testing) "/home/r/www/testing.html"
Now i get a different error this time

Code: Select all

<BoredMan> [11:02] wrong # args: should be "topic nick chan botnet host"
<BoredMan>     while executing
<BoredMan> "topic $chan"
<BoredMan>     (procedure "pxi2h:make" line 18)
<BoredMan>     invoked from within
<BoredMan> "pxi2h:make $ele"
<BoredMan>     ("foreach" body line 3)
<BoredMan>     invoked from within
<BoredMan> "foreach ele [array names pxi2h_chan] {
<BoredMan>   if {![info exists pxi2h_history($ele)]} { set pxi2h_history($ele) "" }
<BoredMan>   pxi2h:make $ele
<BoredMan> }"
<BoredMan>     (file "scripts/logs.tcl" line 241)
<BoredMan>     invoked from within
<BoredMan> "source scripts/logs.tcl"
<BoredMan>     (file "BoredMan.conf" line 276)
Rgds
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

Sounds like another script is overwriting the bots default TCL proc for topic. Search other scripts for 'proc topic ' (and remove the script or replace all occurance for the proc topic within it to something else).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Post Reply