LUA 5 scripts for DCH++
 

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

LUA 5 scripts for DCH++

Started by Saivert, 21 April, 2005, 22:33:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Saivert

I'm missing a topic for DCH++ and LUA 5 scripts so I though I create one here.

I want this thread to be a place where people can discuss how to rewrite LUA 4/5 scripts for PtokaX so they work in DCH++.

NOTE: DCH++ does not have native support for LUA language but uses a LuaScript plugin for it.


Herodes

QuoteOriginally posted by Saivert
I'm missing a topic for DCH++ and LUA 5 scripts so I though I create one here.

I want this thread to be a place where people can discuss how to rewrite LUA 4/5 scripts for PtokaX so they work in DCH++.

NOTE: DCH++ does not have native support for LUA language but uses a LuaScript plugin for it.
PtokaX and DCH are not using the same functions that lua uses in the scripts to interact with the hubsoft. ( different API ). so it is impossible as far as i know to write a complex script or heavily-depended-on-API script that runs on both.
also please refer to the dch++ forum.. I wish you better luck there

Sedulus

actually, DCH++ supports the getHubVersion() function returning hubname,hubversion. so you could build a wrapper and write compatible scripts, as long as you only need features that both hubs provide.

Quote[06:42:03] +lua a,b = getHubVersion() ; dchpp.getClient("Sedulus"):hubMessage(a..","..b)
[06:42:03] DCH++,1

Saivert

#3
Does PtokaX support getHubVersion() too?

You mean that I can write something like this:

a,b = getHubVersion()
if a == "DCH++" then
  --do DCH++ stuff here...
else
  --do PtokaX stuff here...
end

Or one can write a PtokaX layer into the LuaScript plugin (or as a new plugin based on LuaScript) that makes PtokaX scripts run on DCH++ unmodified. PtokaX LUA scripts could then be loaded in it's own context.

Here's my idea of a LuaScript.xml fragement:

		
	

	
		
	

Herodes

#4
QuoteOriginally posted by Saivert
Does PtokaX support getHubVersion() too?

You mean that I can write something like this:

Quotea,b = getHubVersion()
if a == "DCH++" then
  --do DCH++ stuff here...
else
  --do PtokaX stuff here...
end

Or one can write a PtokaX layer into the LuaScript plugin (or as a new plugin based on LuaScript) that makes PtokaX scripts run on DCH++ unmodified. PtokaX LUA scripts could then be loaded in it's own context.
no PtokaX dont support getHubVersion()
but that helps the situation too..
function hubIsPtokaX()
	if pcall(getHubVersion()) then
		return nil;
	end;
	return true
end

Herodes

QuoteOriginally posted by Saivert
Or one can write a PtokaX layer into the LuaScript plugin (or as a new plugin based on LuaScript) that makes PtokaX scripts run on DCH++ unmodified. PtokaX LUA scripts could then be loaded in it's own context.

Here's my idea of a LuaScript.xml fragement:

		
	

	
		
	
once again .. this forum couldn't care less imo... it is about PtokaX .. go to DCH++ forum to discuss this.

Sedulus

QuoteOriginally posted by Herodes
function hubIsPtokaX()
	if pcall(getHubVersion()) then
		return nil;
	end;
	return true
end

I'd go with:
if getHubVersion and getHubVersion() == "DCH++" then
  // dch++
else
  // fallback, assume ptokax
end

it would be nice if ptokax did support getHubVersion though...

??????Hawk??????

#7
if getHubVersion and getHubVersion() == "DCH++" then
	function dchpp.userConnected( client )
		client:hubMessage( "http://www.ptokax.org <---------Click Here")
	end
else
	OpConnected = NewUserConnected
	function NewUserConnected(curUser)
		curUser.SendData(" You Saw the Light ! ! ! ")
	end
end



 :P  :P  :P  :P  :P  :P  :P

Sedulus


Saivert

We need a fast an stable hub and DCH++ is one such hub.
PtokaX can be very hungry and eat up a lot of resources (uneccessary) even with few users connected.

I just wanted to discuss LUA scripts running on DCH++ as I couldn't find any other fourms where they discussed LUA scripts for hub softwares.

So, sorry if you guys feel all warm and fuzzy about PtokaX and don't give a shit about DCH++.

To Sedulus: Why did you smile in the post after what Hawk just wrote (the stupid script). Do you like PtokaX?

PPK

QuoteOriginally posted by Saivert
We need a fast an stable hub and DCH++ is one such hub.
PtokaX can be very hungry and eat up a lot of resources (uneccessary) even with few users connected.
Why do you lie here  ?(
DCH++ use more badwith and more cpu than PtokaX :]
DCH++ is very bad and creators know it, that is why is here no real binary release :P
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Herodes

QuoteOriginally posted by Saivert
To Sedulus: Why did you smile in the post after what Hawk just wrote (the stupid script). Do you like PtokaX?
Having a sense of humor doesn't relate directly to any matter of opinion.

GeceBekcisi

#12
QuoteOriginally posted by Saivert
...DCH++ is also not a mainstream hub software. It is for us who likes to code and hack things. If you want a n00b hubsoft, then go for YnHub or even Neo-Modus DirectConnect hub (v1.00000)...
QuoteOriginally posted by Quattro
...Don't forget PtokaX...

Why needing to use irrogating sentences? There are facts in computers' world. If a software uses more bandwitdh under same conditions, it surely does; there can't be anything uncertain about this. If you worry which one is better, prepare to of them with same scripts or without scripts and run on the same system with same count of users then please post your results here.

Regards.
GeceBekcisi
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

plop

 
------------------------------------------------------------ 
Current stats: 
------------------------------------------------------------ 
Version: PtokaX DC Hub 0.3.3.0 build 17.03 [debug] built on Apr 24 2005 01:20:52 
Uptime: 1 days, 7 hours, 5 minutes 
Users (Max/Actual Peak (Max Peak)/Logged) : 50 / 32 (40) / 31 
Chat messages: 1256 x 
Unknown commands: 0 x 
PM commands: 49 x 
Key commands: 147 x 
Supports commands: 158 x 
MyINFO commands: 1171 x 
ValidateNick commands: 115 x 
GetINFO commands: 0 x 
Password commands: 103 x 
Version commands: 103 x 
UserIP commands: 968 x 
GetNickList commands: 147 x 
Search commands: 2335 x 
SR commands: 48 x 
CTM commands: 1216 x 
RevCTM commands: 3 x 
BotINFO commands: 0 x 
------------------------------------------------------------ 
CPU usage (60 seconds average): 0.00% 
CPU time: 0:00:28 
Mem usage (Old style): 3812 kB 
Mem usage (Peak): 7.23 MB (11.45 MB) 
VM size (Peak): 9.54 MB (10.00 MB) 
------------------------------------------------------------ 
SendRests (Peak): 0 (1) 
RecvRests (Peak): 0 (0) 
SendBytes: 8.94 MB 
RecvBytes: 463.40 kB
running on a p3 733 with 512Mb, 8 scripts (1 uses 1.1MB, the others from 60 to 120kb)

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk