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.

Tcl error [crap:list]: can not find channel named "fu..

Old posts that have not been replied to for several years.
Locked
S
ShavdApe
Halfop
Posts: 46
Joined: Mon Dec 15, 2003 5:22 pm

Tcl error [crap:list]: can not find channel named "fu..

Post by ShavdApe »

Please help me figure out why I get this error
Tcl error [crap:list]: can not find channel named "fu....
proc crap:list {nick uhost hand chan args} {

set line [join $args]
sql selectdb *********
set wordlist ""
set wordcount 0
foreach row [sql "SELECT crapword FROM crapwords"] {
incr wordcount 1
append wordlist [lindex $row 0] " "
}
set pos 100
while {1} {
# this moves to $pos bytes before the end of the file
seek $wordlist -$pos end
# read to the end of the file
set data [read -nonewline $wordlist]
# we may have read multiple lines (if less than 512 bytes)
set lines [split $wordlist \n]
if {[llength $lines] > 1} {
# yup, we read at least 1 line and part of another, so we know
# we for sure have the complete last line, we're done
putserv "PRIVMSG $chan :\[\002CRAP-LIST\002\] [lindex $lines end] (Total CrapFilter words: $wordcount)"
} elseif {[tell $wordlists] < $pos} {
# This happens if the entire file is < 512 bytes, and we didn't read
# in multiple lines... therefore the file is a single line and we read the
# whole thing, so we're done.
putserv "PRIVMSG $chan :\[\002CRAP-LIST\002\] $data (Total CrapFilter words: $wordcount)"
}
# Now we just repeat the process, adding another 512 bytes
incr pos 512
}
}
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

It's because you seem to have copied some code from here and thought that your $wordlist (string) is the same as my $fp (file pointer).
Locked