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.

Query about "setudef str"

Old posts that have not been replied to for several years.
Locked
D
Dataforce
Voice
Posts: 3
Joined: Fri Jun 10, 2005 11:44 am

Query about "setudef str"

Post by Dataforce »

Is there a limit to the length of a string when storing it in a udef-str ?

The strings seem to be randomly truncated when i rehash the bot. (its storing a 400 char long encrypted string)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

nope, there's no limit

my guess is your encrypted udef string contains ^Z character, which is EOF (end-of-file) terminator for the Tcl_EvalFile() function that eggdrop uses to read and interpret a Tcl script (the chanfile is actually a script, just like eggdrop.conf)
D
Dataforce
Voice
Posts: 3
Joined: Fri Jun 10, 2005 11:44 am

Post by Dataforce »

At first I thought the same, so i recoded the encryption i use, and now when i store this:
bcibegceidbbbehbpagbkaoedamacbgbpboemalebbfbibkfhecaeanalbhanah
ajamekbpbdaggkbagpehchffacbhbmboedafcbbdagaaakekabaceldgagfhbc
bcengiabceecdkakagageeehaabkaefcbefgejagakbhehbgenajaefdfbajacbd
abbdajegegbhalbafbagefbhalbdabbiagakagaafabhamalaefbenaiadanbnap
aeecekacacelbmbmehbdaceibmbmeeecanabadfhfkegeagdbghdamacbgb
pboemalebbfbibkfhecaeanalbhanahajamekbpbmadbpajagalfmbkchapak
andhebahabbpeghpfggge
after rehashing, it now only has this:
bcibegceidbbbehbpagbkaoedamacbgbpboemalebbfbibkfhecaeanalbhanah
ajamekbpbdaggkbagpehchffacbhbmboedafcbbdagaaakekabaceldgagfhbc
bcengiabceecdkakagageeehaabkaefcbefgejagakbhehbgenajaefdfbajacbd
abbdajegegbhalbafbagefbhalbdabbiagakagaafabhamalaefbenaiadanbnap
aeecekacace
(all on one line, i split it up so as not to mess up the layout)


Interestingly, the channels file itself has the full string, but when using channel get , it only returns the truncated string
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

well then it might have something to do with truncating parameters of [channel add]; barring a patch in Tcl itself, you can't do anything about it

I'd recommend redesigning your script in such way it no longer requires such lengthy udefs
D
Dataforce
Voice
Posts: 3
Joined: Fri Jun 10, 2005 11:44 am

Post by Dataforce »

Strangely:

Other names seem to work fine, and renameing the udef made it work :/
Locked