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.

dlearn && IRC max message lenght

Support & discussion of released scripts, and announcements of new releases.
Post Reply
r
roughnecks
Voice
Posts: 33
Joined: Sun Sep 14, 2008 9:33 am
Location: Italy

dlearn && IRC max message lenght

Post by roughnecks »

Hi, thanks in advance for the help you gave to me past times....now i got another question relative to the dlearn tcl:

The scripts stores definition of words inserted by users....as the words arise in number i get a problem, while listing them, with the command !learnlist...id est, the lenght of the output is greater in charachters available for one single IRC message (about 400 - 500 chars, usually) and the list gets cut before the ending....

I saw that the command used in the script is a putserv, this one :

Code: Select all

if {$check == 0} {putserv "$learn(method) $nick :The learn file is empty"} else {putserv "$learn(method) $nick :Learn words: $words"}
Version of the script : 1.0.1 same as the archived one.

Now...let's say there is no way to change the limits of messages lenght within the IRC server, witch is not owned neither administered by me.... do u think is there any chance to obtain a new line somehow in the putserv cmd ?


Always grateful, roughnecks. :D
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

I think new line char will not help, because this still will be one long string with \n chars (output without spliting will show all chars to first \n mark), but you can always try to split long string into 2 shorter

like, [string length $str] now set some max, maybe 400 and use [string range $str 0 400] and after that You can use expr to count the rest of chars :)

Or try to convert input strings to shorter or smth. After this will be no problem to output them.

You can even insert \n chars and after this you can split string into a list, [split $str "\n"] etc. etc.
Last edited by tomekk on Sat Dec 20, 2008 6:16 pm, edited 1 time in total.
r
roughnecks
Voice
Posts: 33
Joined: Sun Sep 14, 2008 9:33 am
Location: Italy

Post by roughnecks »

Thank U for the suggestions....actually i'm not able to do it myself in any way you mentioned :oops:

I need to look at some F(ucking)M(anual) before doing anything, 'cause i'm really not used in programming.
See U soon. :arrow:
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Check this out.
r
roughnecks
Voice
Posts: 33
Joined: Sun Sep 14, 2008 9:33 am
Location: Italy

Post by roughnecks »

Sir_Fz wrote:Check this out.
Thanks, i'm working on that.
Post Reply