A "real" Lua interface is desperately needed

Bug #537961 reported by Szabolcs Molnár
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ADCH++
Confirmed
Wishlist
Unassigned

Bug Description

Situation
------------
Noone develops any scripts for ADCH++

The main reason
----------------------
ADCH++ doesn't have a real Lua interface which could be used by third party script developers. For example, there is no way to trigger events easily (like user join, INF update, chat, pm, etc.). You can't check who's registered, can't get the IP of the user, can't kick or ban a user. To tell the truth, if you write an own script, you know _nothing_ about the users nor the hub settings and you can't control any of them.

The possible solution
------------------------------
Access.lua can be hacked further, but it has no point at all, instead it needs to be rewritten totally (or simply dropped and find another way to profide central functions for additional scirpts). The current way ADCH++ handling Lua is totally wrong. For those who don't agree: just think about how many scripts were made for ADCH++ so far? Zero.
So ADCH++ should have events for common happenings like user join, chat, pm. It needs a central function list which would allow other scripts (ANY script) to control the hub (write to main chat, to pm, kick, register a user, get info about a user, etc.).
If you wonder how a good Lua interface looks like, see Aquila: http://aquiladc.sourceforge.net/wiki/index.php/Lua_Manual -- Ok, it's old, and it's NMDC. It is neither perfect, but by browsing through the function and event list, one can have some idea how a script interface should look like.

Revision history for this message
Sulan (sulan80) wrote :

I disagree. I'v been working alot with the python part of ADCH++ which is very similar to lua. Access.lua is provided under plugins/script/example, and i believe it is intened as an example. Perhaps some commonly used functions could be provided in a simpler way, however the way it works now makes it very powerfull since you can access basicly every function you need from scripts.

I believe the main reason there are so few adch++ luascript deveopers (none except poy?) is that they are lazy. If you have some basic lua scripting skills and can understand ADC protocol you would not have any problems making scripts, especially since there are examples provided for the most common functions in Access.lua. Sure there could be some more tutorials around

Revision history for this message
Szabolcs Molnár (fleet) wrote :

I wonder to see poy's or arne's opinion about this bug.

Revision history for this message
Jacek Sieka (arnetheduck) wrote :

Actually, the lua interface is a raw interface into adch++'s internals and that's not going to change.

The upside of this is that its quite possible to write an "easy" interface in lua (or c/c++) that uses the current interface but offers a more simple event model...so if someone's interested, I'd be happy to include an "easy.lua" in the distribution that would translate the adc-centric interface (with adccommands, adcmessages etc) into nice and easy "nick changed, message arrived, blabla" type of events...if there's anything specific missing preventing such a script, I'll be happy to add that too..

Changed in adchpp:
importance: Undecided → Wishlist
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.