egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dlearn && IRC max message lenght

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
roughnecks
Voice


Joined: 14 Sep 2008
Posts: 33
Location: Italy

PostPosted: Sat Dec 20, 2008 11:51 am    Post subject: dlearn && IRC max message lenght Reply with quote

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. Very Happy
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Sat Dec 20, 2008 5:50 pm    Post subject: Reply with quote

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 Smile

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
View user's profile Send private message Visit poster's website
roughnecks
Voice


Joined: 14 Sep 2008
Posts: 33
Location: Italy

PostPosted: Sat Dec 20, 2008 6:14 pm    Post subject: Reply with quote

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

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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Dec 21, 2008 6:51 pm    Post subject: Reply with quote

Check this out.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
roughnecks
Voice


Joined: 14 Sep 2008
Posts: 33
Location: Italy

PostPosted: Mon Dec 22, 2008 6:24 am    Post subject: Reply with quote

Sir_Fz wrote:
Check this out.


Thanks, i'm working on that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber