Lua Extension: Sockets for PtokaX 0.3.3.21
 

Lua Extension: Sockets for PtokaX 0.3.3.21

Started by bluebear, 12 August, 2005, 22:17:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bluebear

Socket lib available for ptokax.

Use sockets in your px lua scripts.

Read more here:
http://www.thewildplace.dk/lua/wsa/

/Bluebear
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

Psycho_Chihuahua

#1
nice work bluebear

i put the file on my Ptx Mirror  as well :)
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

bastya_elvtars

#2
Can you add an option to send TCP-packets with pre-specified flags (like imitating a handshake by sending a SYN flag?)

-- // EDIT

Please consider uploading it to the script database... ;)
Everything could have been anything else and it would have just as much meaning.

Optimus

Cool stuff bluebear looks really good.

- Opti :D

bluebear

Thx for the replys :)

btw i created a forum on http://www.thewildplace.dk/ if there is any questions..

To those of you there will use it: Don't expect that i will follow other threads on this board, besides the ones i created myself.

Please use the forum, instead of pm'ing me on hubs where i'm online if you got any support/bug/request questions. Ofcourse your welcome to pm me if you just want a chat :)

If you create scripts that use this lib, I would be happy if you'd share/post it in the forum on my page.
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

bastya_elvtars

#5
Can you implement a feature that gets the state of a socket?
Everything could have been anything else and it would have just as much meaning.

bluebear

QuoteOriginally posted by bastya_elvtars
Can you implement a feature that gets the state of a socket?

I could, but the intension is that use a global for it.
For multiply sockets you could use a table.
Sincerely,
bluebear
--
http://www.thewildplace.dk/ is is closed - Use the following mirrors instead
http://bluebear.psycho-chihuahua.net
http://pxextension.piratez.dk/
[Lua extensions - Chat stats - YnHub PMSpy - DC Source code - and more]

plop

QuoteOriginally posted by bluebear
QuoteOriginally posted by bastya_elvtars
Can you implement a feature that gets the state of a socket?

I could, but the intension is that use a global for it.
For multiply sockets you could use a table.

sounds like a feature for WsaSocket.lua.

for the peeps who don't know yet.
WsaSocket.lua is a support script for bluebear's library which handles all basic features.
far from done, but here's a example script which shows how easy it works.
function Get1Arg(data)
	-- Written by plop
	local s,e,sArg = string.find(data, "%b<>%s+%pwhois%s+(%S+)")
	if sArg then
		return sArg
	end
end

-- Ptokax chat arrival
function ChatArrival(user, data)
	-- written by plop
	local data = string.sub(data, 1, (string.len(data) - 1))
	local sArg = Get1Arg(data)
	if sArg then
		local Sock = require("libs/WsaSocket")
		local _Error, sData = Sock.WhoIs(sArg)
		user:SendData("WhoisBOT", (_Error or sData))
		return 1
	end
end

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 <----<<

bastya_elvtars

Dedicated wiki page for the manual is up. Read, edit and enjoy! N. B.: the manual is for the upcoming version.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk