Having a bit of a problem with my eggdrop. When I use puthelp or putquick in my tcl-scripts, it seems the lines get truncated after appx 450 chars. Any way around this?
Eggdrop truncates long lines because servers place restrictions on line length. Unless you have some modified ircd that allows longer lines anyway. There is probably a way around it... use putdccraw with idx 0 for the server.
set blah "this is a really long line\n"
putdccraw 0 [string length $blah] $blah
stdragon wrote:Eggdrop truncates long lines because servers place restrictions on line length. Unless you have some modified ircd that allows longer lines anyway. There is probably a way around it... use putdccraw with idx 0 for the server.
set blah "this is a really long line\n"
putdccraw 0 [string length $blah] $blah
I think it'll work
Using putdccraw doesn't work either. I thought it was a matter of editing tclserv.c but I purged the previous posting since it is more than that. It seems that the actual writing to the socket also has a max length.
I'm not sure how you tested it, but putdccraw does not impose any length restriction on the content. Neither does tputs, the network output function it uses.
Here's how you can test it:
Using tclsh, do this
% proc blah {args} {puts "blah: $args"}
% socket -server blah 1234
Then in eggdrop, do
.tcl connect localhost 1234
Tcl: 7
.tcl set blah [string repeat "horse" 1000]\n
Tcl: horsehorsehorsehorsehorsehorsehorse...
.tcl putdccraw 7 [string length $blah] $blah
Tcl:
Then back in tclsh, do
% update
blah: sock4 127.0.0.1 42027 (<-- it prints this out)
% set test [gets sock4]
horsehorsehorsehorse....
% string length $test
5000
ppslim wrote:If putdccraw is failing too, then it's not a eggdrop issue.
The IRC server you are connected too, must impose a length restriction lower than the RFC implmentation of 510 chracters.
Yes, what I observed was an IRC server limitation and not a limitation of putdccraw which indeed seems to work fine. My mistake I was a bit tricked by putlog which does not seem to display the full string