luadch
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

luadch

Started by blastbeat, 01 January, 2008, 22:55:45

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blastbeat

hi, a happy new year to all,

i wrote a little adc hub in lua, maybe someone is interested.
it is a first version with some very basic functions

http://sourceforge.net/projects/luadch/

blastbeat

--// 080109 v0.02 //--

- added ssl support via luasec/openssl
- added hub password protection
- added basic reg user support
- added basic scripting interface
- added simple i18n
- fixed some bugs

--// 080110 v0.03 //--

- added timer
- fixed some issues

blastbeat

#2
--// 080112 v0.04 //--

- added example scripts
- added some documentation
- added functions and listeners for scripting
- fixed some bugs and issues

moved to sourceforge:

http://sourceforge.net/projects/luadch/

TTB

Hi,

I don't know much about ADC, and I was just trying to get it work... When logging into the hub, it says only "connected...". After that, I can't type anything in the main chat. Is this correct? Project is still in Alpha stage, I know. I was just wondering and trying  ;)
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

Thor

Try to connect with adc:// prefix :)

TTB

Ha! OK, that makes sense... If other ppl wants to try it: You also need a client who supports ADC, like DC++ 0.704 (newest client atm):
*** Connecting to adc://local:6110...
*** Connected
<LUADCH Test Hub> LOGGED IN
<LUADCH Test Hub> Welcome!

Thanx
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

blastbeat

Hi,

luadch supports also clients with the old password encryption and older adc spec. i tested it both with dc++ 0.704 and BCDC 0.699.

blastbeat

#7
Release of luadch v0.05

--// changelog //--

- fixed many bugs
- added signal.lua, updated docs and example scripts
- improved listeners ( will be executed in script order )
- changed procedure of user registration
- added line tracing
- rewrote and improved server.lua
- updated lua to version 5.1.3
- upgraded luasec
- improved adc.lua
- added pid/cid function
- added bots, op chat, error log
- added some new functions
- added new hubcommands
- added STA
- changed select() FD_SETSIZE 
- added remote administration and luaterm client to access
- added reg only hub, max users, feature broadcast, UCMD

download: http://sourceforge.net/project/showfiles.php?group_id=214423

blastbeat

Luadch can reg bots now, here is a demonstration how to create an op chat (you need some knowledge of the adc protocol):

hub:regBot{ nick = "[ Bot ] OpChat", desc = "chatroom for operators",    --// nick and description of the bot for the userlist
	client = function( this, cmd )    --// client is a function, which will be called on every incoming message ( also messages of other bots )
		local bot_sid = this:getSid( )    --// this is the bot object which has a sid like every other user 
		local user_sid = cmd:mySid( )    --// extract the originator sid  from the command 
		local user = hub:getUser{ sid = user_sid }    --// get the user object of the originator 
		if not user or user:isBot( ) or user:getRank( ) < 4 then return end    --// dont allow messages from other bots or non-operators		
		if cmd:fourcc( ) == "EMSG" then    --// EMSG means private message to bot
			local to_sid = cmd:getNP( "PM", "array" )[ 1 ]    --// get body of named parameter "PM" ( is the sid for reply ) 
			cmd:changeNP( "PM", bot_sid, to_sid )    --// insert bot sid         
			for sid, user in pairs( hub:getUsers( ) ) do 
				if user:getRank( ) >= 4 then 	
					user:send( cmd:adcString( ) )    --// send adc command to all operators	
				end	
			end							
		end	
		return true
	end
}

blastbeat

Release of luadch/jit v0.06

--// 080302 v0.06 //--

- added luadchjit branch to compile with luajit
- added shell script to compile on linux/posix
- added shell script to create openssl certificates
- added coxpcall lib for some tests
- added luadch icon ( big thanks to pulsar! )
- added default userlevels:
   - 0   = UNREG
   - 10  = GUEST
   - 20  = REG
   - 30  = VIP
   - 40  = SVIP
   - 60  = OPERATOR
   - 80  = ADMIN
   - 100 = HUBOWNER
- added new scripts and splitted example.lua:
   - banner.lua
   - cmd_kick.lua
   - cmd_killscripts.lua
   - cmd_mass.lua
   - cmd_nick.lua
   - cmd_regnick.lua
   - cmd_reloadcfg.lua
   - cmd_restart.lua
   - cmd_restarthub.lua
   - cmd_shutdown.lua
   - cmd_sid.lua
   - unknown_command.lua   
   - usr_desc_prefix.lua
   - usr_nick_prefix.lua
   - usr_ranks.lua 
- added new client layer in server.lua, a layer between sockets and users
- added privacy to hub/user/adc/bot objects with usage of upvalues instead of self
- added new functions/listeners to script api
- improved error handling; undeclared globals are forbidden now
- improved script managment: now scripts can import functions of other scripts
- removed openssl headers/libs from distribution
- fixed some critical and many small bugs

blastbeat

Release of luadch/jit v0.07

--// 080719 v0.07 //--

- rewrote hub.c, will write exception file for fatal errors
- added simple preprocessor ( pre.lua ) to run luadch in debug/release mode
- improved restarthub: hub will be restarted from c with new lua state
- removed main.lua and useless coroutines
- rewrote complete server.lua, its possible now to add or remove server during runtime
- rewrote out.lua, cfg.lua, created log directory
- rewrote and renamed startup.lua, forced luadch to use locals only
- cached a lot of table lookups ( in some scripts virtually all )
- splitted scriptmanager from hub.lua
- joined hub.lua and luadch.lua to share common upvalues
- changed parameters of many functions from one table to multiple arguments to save table creation/lookups
- changed script api: scripts have access to most modules
- removed admin.lua and luaterm
- removed privacy from objects to save table lookups and metamethods
- added escape functions to adclib, because the lua version was too slow
- added utf8 stuff to adclib
- outgiong/incoming data will be checked for utf8 format now
- scripts will be checked for utf8 now
- utf8 BOM will be deleted from scripts now
- renamed settings.tbl and user.txt
- added automatic backups for user.tbl and cfg.tbl
- removed i18n from cfg.lua
- removed stack overflow caused from bots sending to bots sending to bots sending...
- added new methods to adc objects
- fixed make_cert
- fixed luadch crash on ubuntu hardy, caused from wrong compiler options for posix ( thanks  VidFamne for report )
- removed coxpcall
- updated scripts for new api
- added new scripts:
   - unban.lua
   - help.lua
   - delreg.lua
   - userinfo.lua
   - error.lua
   - setpas.lua
   - upgrade.lua
- introduced new scripting style for better readability

download: http://sourceforge.net/project/showfiles.php?group_id=214423

blastbeat

Release of luadch/jit v0.08

--// 081018 v0.08 //--

- added manual
- added PING extension
- added en, de language files for scripts/hub
- added possibility of settings profiles
- added script modules:
   - report
   - usercommands
   - hubcommands
- added new scripts:
   - cmd_ascii.lua
   - cmd_rules.lua
   - cmd_userlist.lua
   - cmd_accinfo.lua
   - cmd_code.lua
   - etc_char_replacer.lua
   - etc_hubcommands.lua
   - etc_usercommands.lua
   - etc.report.lua
   - usr_slots.lua
   - usr_share.lua
   - usr_hubs.lua
   - usr_hub_slot_ratio.lua
   - hub_cmd_manager.lua
   - hub_keeping_alive.lua
- added user redirection
- added usercommands in virtually all cmd scripts
- added new listener "onError"
- added some runtime type checking ( utf8, adcstr, adcstring, user, adccmd )
- added corrupt cfg.tbl/user.tbl checking
- added error reports in util.lua/cfg.lua
- added anti password brute force
- added simple memory managment ( reusing tables )
- added some server stats
- cleaned up many code ( e.g. adclib )
- changed script api ( e.g. user.getNick to user.nick )
- cached cfg_get's in hub.lua
- improved some scripts ( e.g. userinfo )
- rewrote timer
- rewrote partially adc.lua ( adccmds are self based now with extern methods )
- renamed some scripts ( e.g. cmd_regnick to cmd_reg )
- removed cmd_killscripts.lua
- fixed pre.lua
- fixed critical bug in util.lua
- fixed many small bugs
- BOM in files wont be overwritten now

download: http://sourceforge.net/project/showfiles.php?group_id=214423

SMF spam blocked by CleanTalk