From DCBase Wiki
ADCH++ 2.3 rev 221 running in Windows 7
|Developed by||Jacek Sieka|
|Stable release||N / A |
|Written in||C++, C|
|Available in||1 languages|
|License||GNU GPL 2|
|Website||ADCH++ Sourceforge Site|
ADCH++ Launchpad Site
ADCH++ runs under both Windows and Unix systems (see requirements below) for compiling your version of ADCH++ or use the build archive (Windows only), the distribution is released on Sourceforge and it consists of an windows installer, a windows binary package and a platform independent source zip for each release but for bleeding edge source ADCH++ uses launchpad bazaar branch.
For documentation on the API for both LUA and Python use Doxygen or our online documentation on Sourceforge for futher information on how to build a plugin for ADCH++ can be found at the following adress:
Here are an example:
#!/usr/bin/python #import python adchpp module import pyadchpp #import os module import os import time def run(): #initialize the hubsoft with the complete path to your config directory containing adchpp.xml pyadchpp.initialize(os.getcwd()+'\config\\') pyadchpp.startup() #create a loop so the program doesnt exit while 1: time.sleep(0.1) if __name__== '__main__': run()
The following section is information about how to script in LUA for ADCH++ here are an example:
-- This is an example script that scripters might want to use as a basis for their work. It -- documents the bare minimum needed to make an Lua script interface with ADCH++. -- For more detailed information, peeking into other, more evolved (but less documented) example -- scripts as well as the Doxygen documentation of ADCH++ <http://adchpp.sourceforge.net/doc> would -- be a good idea. -- Generally, to reach member "bar" of the class "foo" of ADCH++, one has to use: adchpp.foo_bar. -- Examples: adchpp.Util_getCfgPath(), adchpp.AdcCommand_CMD_MSG, adchpp.Entity_STATE_NORMAL... -- When manipulating Entity objects, it can be useful to convert them to Client objects (which -- are aware of socket features such as a send method) by using: -- local client = entity:asClient() -- Feel free to use <https://answers.launchpad.net/adchpp> or <www.adcportal.com> if you need help. -- The global functions of Lua are privately imported into "base"; therefore, be sure to always -- reference it when calling these functions; eg base.print("blah"), base.pcall(protected_func)... local base = _G module("example") -- Give each module a unique name so they don't clash. -- Import the ADCH++ Lua DLL (luadchpp.dll). base.require('luadchpp') local adchpp = base.luadchpp -- Import various base sets of Lua methods. Only import those you need for your specific module. local io = base.require('io') local math = base.require('math') local os = base.require('os') local string = base.require('string') local table = base.require('table') -- Import some utilitary Lua Scripts; these don't need to be explicitly loaded by ADCH++ (eg if -- using the adchppd daemon, they don't need to be referenced in Scripts.xml). local autil = base.require('autil') local json = base.require('json') -- Cache pointers to some managers of ADCH++ that we frequently use. local cm = adchpp.getCM() -- ClientManager local pm = adchpp.getPM() -- PluginManager -- Listeners to connect to ADCH++. Define one unique identifier for each listener (i chose to call -- them example_1, example_2 and so on) to make sure the variable holding the listener doesn't get -- collected by Lua's garbage collector until the program is over. -- ClientManager::signalConnected: called after an Entity entity has connected. example_1 = cm:signalConnected():connect(function(entity) -- Process signalConnected here. end) -- ClientManager::signalReceive: called when an AdcCommand cmd is received from Entity entity. example_2 = cm:signalReceive():connect(function(entity, cmd, ok) local res = (function(entity, cmd, ok) -- Skip messages that have been handled and deemed as discardable by others. if not ok then return ok end -- Process signalReceive here. -- Return true to let the command be dispatched, false to block it. end)(entity, cmd, ok) if not res then cmd:setPriority(adchpp.AdcCommand_PRIORITY_IGNORE) end return res end) -- ClientManager::signalState: called after the state of an online Entity entity has changed. example_3 = cm:signalState():connect(function(entity) -- Process signalState here. end) -- ClientManager::signalDisconnected: called after an Entity entity has disconnected. example_4 = cm:signalDisconnected():connect(function(entity) -- Process signalDisconnected here. end) -- PluginManager::getCommandSignal(string): called when a +command managed by another plugin is -- being executed. example_5 = pm:getCommandSignal("blah"):connect(function(entity, list, ok) -- Skip messages that have been handled and deemed as discardable by others. if not ok then return ok end -- Process getCommandSignal here. -- Return true to let the command be executed, false to block it. end)
additionally you can now run Ptokax scripts in ADCH++ via ADCH++ Ptokax Bridge since that emulates the Ptokax LUA API.
- Being created by the actual developer of the protocol , it has the latest innovation there is, and this also makes this software a point of reference for all the other hubsoft developers. It probably has the most strict ADC implementation on the market, in the exact line of the protocol.
- As multiplatform, is very useful for users running multiple operating systems and has a wide market of delivery as a consequence.
- Being the only hubsoft implementing the drafting BLOM extension , it makes it very interesting for people wanting to test new things in the ADC world that were never tried before.
- The programming language used for this software is C++ a very powerful and stable language and the compiler (gcc) also provides quality executables.
- Scripting support makes ADCH++ very powerful since commands can be issued via scripting api.
- No I18n support since LUA doesn't support it.
- Software administrator : Jacek Sieka (arnetheduck)
- Contributors: poy
- ↑ ADCH++ First Release by Pietry (Jan 6, 2008)
- ↑ ADCH++ now more then an empty shell by Toast (Sep 30, 2009)
- ↑ First Looks at the ADCH++ Gui by Toast (Feb 02, 2009)
- ↑ ADCH++ Gui update by Toast (Sun Feb 08)
- ↑ ADCH++ Python scripts by Sulan (Jan 21, 2009)
- ↑ Bloom filters by cologic (Jan 7, 2008)
- ADCH++ Sourceforge Site
- ADCH++ Launchpad Site
- ADCH++ Online Documentation
- ADCH++ Frequently Asked Questions
- ADCH++ Build Archive