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.

how to get eggdrop lang ?

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

how to get eggdrop lang ?

Post by CrazyCat »

Hello there,

I want to do a script which will automatically use the eggdrop lang, but I can't find which command or variable can be used to retrieve it.

Do you know if it exists anfd how I can get the information ?

Regards,
CrazyCat
User avatar
BLaCkShaDoW
Op
Posts: 117
Joined: Sun Jan 11, 2009 4:50 am
Location: Romania
Contact:

using config

Post by BLaCkShaDoW »

Code: Select all

# If you want to have your Eggdrop messages displayed in a language other
# than English, change this setting to match your preference. An alternative
# would be to set the environment variable EGG_LANG to that value.
#
# Languages included with Eggdrop: Danish, English, French, Finnish, German.
#addlang "english"
You can try to get the addlang line from config. If it's starting with # the languge is english, if not get the language from the addlang line :P
That could be a posibility :P
BLaCkShaDoW Production @ WwW.TclScripts.Net
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

It could be an option, but it won't work in every cases :(
My own example: I have several eggdrop using a short .conf which call the main eggdrop.conf. So, the eggdrop see "myrobot.conf" and not eggdrop.conf which contains the addlang directive.

I'll try to hack the language.c file to add a tcl-command "getlang" which will return the core language.
D
Dufresne
Voice
Posts: 1
Joined: Fri Oct 04, 2019 7:39 am

Post by Dufresne »

Do you think that will make things easier, CrazyCat?
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Not sure, but I need this feature, so I think I'm not the only one.
Even if 0.1% of eggdrop owners use it, it's usefull :)
w
willyw
Revered One
Posts: 1196
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

CrazyCat wrote:Not sure, but I need this feature, so I think I'm not the only one.
Even if 0.1% of eggdrop owners use it, it's usefull :)
A link to this thread was posted in #eggdrop , on Freenode IRC network .

Here is part of what was said there.
<nick deleted> Easy button solution is to retrieve the name of the config file being used (can't remember how, but I think it can be done through eggdrop) and then grep for addlang
<nick deleted> But, its not terrible to add something like that if he wants it, I think
<nick deleted> Ask him to post it to github, we can talk about it there

And I believe that is found here:
https://github.com/eggheads/eggdrop

I hope this helps.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
w
willyw
Revered One
Posts: 1196
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

CrazyCat wrote:Not sure, but I need this feature, so I think I'm not the only one.
Even if 0.1% of eggdrop owners use it, it's usefull :)
You really should post on github.

A little birdy told me that they are considering it, and might even be fiddling around with it some already.

There is no guarantee though. Too soon for that. No idea on how long it might be, either.

As I understand it, if you post on github and and issue is referenced, then you would be notified.
I guess that is the place to find out if they do a patch.


Good luck with it. :)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
w
willyw
Revered One
Posts: 1196
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

CrazyCat wrote:Not sure, but I need this feature, so I think I'm not the only one.
Even if 0.1% of eggdrop owners use it, it's usefull :)
Your request / idea was heard.

Better yet, somebody up there in Eggdrop Land took their time to work on it. :)

Have a look here :
https://github.com/eggheads/eggdrop/pull/883

:) :)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
User avatar
CrazyCat
Revered One
Posts: 1217
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Oh ! Marvelous !
Post Reply