| View previous topic :: View next topic |
| Author |
Message |
roughnecks Voice
Joined: 14 Sep 2008 Posts: 33 Location: Italy
|
Posted: Sat Dec 20, 2008 11:51 am Post subject: dlearn && IRC max message lenght |
|
|
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: |
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.  |
|
| Back to top |
|
 |
tomekk Master

Joined: 28 Nov 2008 Posts: 255 Location: Oswiecim / Poland
|
Posted: Sat Dec 20, 2008 5:50 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
roughnecks Voice
Joined: 14 Sep 2008 Posts: 33 Location: Italy
|
Posted: Sat Dec 20, 2008 6:14 pm Post subject: |
|
|
Thank U for the suggestions....actually i'm not able to do it myself in any way you mentioned
I need to look at some F(ucking)M(anual) before doing anything, 'cause i'm really not used in programming.
See U soon.  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
roughnecks Voice
Joined: 14 Sep 2008 Posts: 33 Location: Italy
|
Posted: Mon Dec 22, 2008 6:24 am Post subject: |
|
|
| Sir_Fz wrote: | | Check this out. |
Thanks, i'm working on that. |
|
| Back to top |
|
 |
|