So what future holds for LUA Scripting clientside ?

Site Announcements

So what future holds for LUA Scripting clientside ?

Post by Toast » 18 Aug 2010, 18:29

Thought i do an article about lua scripting clientside

we all know that scripting clientside has never been a huge popular thing to do compared to hubside scripting since there is so much more you can do but times are changing and recently we been talking about a plugin interface for DC++ that has not yet been made into reality since arnetheduck hasnt given his consent to us implementing it but it has heavy support in DCDev.

I proposed a script manager that could connect to a central repository that allows the user to download scripts that the user wants kinda like Greasemonkey addon for firefox this could boost number of scripts that gets submitted also Thor proposed an improvment of startup.lua for clients.

For the BCDC++ startup.lua v3 visit:

also we would like to open the floor and get more input from the lua community what we can improve in the lua clientside api (if any) that way we can get rolling with more scripts for clientside and also decide who can host the repository and where :) probably gonna end up on sf but under whos command if a central repo was added since that is a nice idea :)

ideas, thoughts, criticism is welcomed

Junior Member
Posts: 30
Joined: 18 Feb 2010, 17:44
Location: England

Re: So what future holds for LUA Scripting clientside ?

Post by andyhhp » 26 Aug 2010, 14:58

I do like the idea of having a single script repository.

However, it would require all client-scriptable clients to implement the same interface, and moreover, in the same way.

Unfortunatly, the DC comunity is full of mods of mods which implement different functionality, different versions of standards etc.

Without some enforced consolidation and adherence to specs, I cant see this being feasable. This doesnt mean its not a good idea - its just I cant see it happening with the current diversity in the community.



Re: So what future holds for LUA Scripting clientside ?

Post by Toast » 26 Aug 2010, 17:32

Well the idea is that the plugin interface takes care of that in most cases so there some forms of standard (ie. the bcdc++ lua api)

Posts: 3
Joined: 17 Sep 2009, 16:54

Re: So what future holds for LUA Scripting clientside ?

Post by Thor » 28 Aug 2010, 07:42

To implement it (the repo) is easy, because startup.lua should do it.
My ideas about the new API:
  • Remove WinAPI calls. Nobody used them, and it's easy to do that 3-4 functions via libs.
  • Client must be capable to load standard Lua libraries. Now I have to copy lua.dll and MSVCRTD.dll beside the client's executable. First solution is to include them in the binaries, second, which I prefer is to check out Lua's source and fix these (Or look for these files in Plugins folder).
  • One built-in library should be used: alien, which is a FFI for Lua language. I use it in startup.lua to list the files from the scripts folder. Other solution is to bind an extra function to the interface which can do this. I prefer this way, because the initial startup.lua should be "lib-free".
  • Add listener for outgoing private message. Parameters should be: nick on NMDC / SID on ADC, text, and hub, if possible.
  • Script loading is now hard-coded in startup.lua, but it would be better if the client handle it, and load them into separate environments to avoid name clashes. Maybe script ordering would be also good :)
  • If possible, an additional event: call a function, when a private frame is closed.
  • Fix client-to-client messages on ADC hubs, because it's broken now in BCDC++ (catches just the outgoing ones afaik)
That's all what came to my mind so far.


Who is online

Users browsing this forum: No registered users and 0 guests