PtokaX forum

Development Section => Your Developing Problems => Topic started by: Corayzon on 14 June, 2004, 04:01:23

Title: How does ptokax check for slots on user connect?
Post by: Corayzon on 14 June, 2004, 04:01:23
hmmm... here whats kicking...

most scripts use tags to get hold of the open slots for the users,
but playing around with ptokax i realised that it somehow
checks for the slots some other way when a user connects.

Meaning, if you remove ur tag, ptokax can still check the amount of open slots in it.

Im just wondering how ptokax does this?

hopefully someone can help =]
Title:
Post by: tezlo on 14 June, 2004, 04:18:01
check the protocol for $SR
Title:
Post by: Corayzon on 14 June, 2004, 04:39:09
understood tezlo after some watching of the ptokax loggin...

[12:06] 192.168.0.100:2240 > $Key 1 Ó??f?%?b3??????P?A??G@??c?????Qac??|
[12:06] 192.168.0.100:2240 > $ValidateNick Corayzon|
[12:06] 192.168.0.100:2240 > $MyPass ******|
[12:06] 192.168.0.100:2240 > $Version 1,0091|
[12:06] 192.168.0.100:2240 > $GetNickList|
[12:06] 192.168.0.100:2240 > $MyINFO $ALL Corayzon <++ V:0.401,M:P,H:0/1/0,S:10>$ $Cable$$44296418$|
[12:06] 192.168.0.100:2240 > $SR Corayzon new folder (2)\(rgcAudio) z3ta Plus DXi VSTi v1.1.rar4112851 2/2TTH:2QYPSU3YA26VB7GTRYQXKRG2AHTRIQBXVGACI2Y (192.168.0.100)|SlotFetch|
[12:06] - User disconnected: Corayzon
[12:06] - User disconnected: Corayzon
[12:06] x User removed: Corayzon

now this shows that ptokax gets a passive search return.

but now, i cant figure out what string ptokax uses to search with to allways get the user to send a passive search return back...

ne help?
Title:
Post by: TecMaster on 14 June, 2004, 07:36:20
I'm no expert but ....

Ptokax can't be sure to get a result back.
The only file every user has is the file list and that is not "searchable" (?)

Btw, the / in $SR reply is not hard to fake ...
Title:
Post by: tezlo on 14 June, 2004, 11:21:13
searching for "." (a dot) should do just fine
and well nothing is hard to fake once you actually get it to compile
Title:
Post by: TecMaster on 14 June, 2004, 12:55:34
Even if you search for . it's still no garantee you get a responce back ...
Title:
Post by: Corayzon on 17 June, 2004, 02:18:27
allrighty...

tUser:SendData("$Search Hub:" .. sBot .. " T?F?0?1?.|")

using this i can get all active users slots, but passice users dont responde to passive searchs

i then had another play with ptokax to see it also sends active searchs to get ppl that are passive to respond.

Awhile ago i seen stuff bout ptokax having open ports and someone noted that 413 is used for search results with active searchs from the hub.

i been now playing around with this tring to get passive users to send through there slots, but i just cant seem to get the search returns coming through the data arrival

neideas neone?

this is the search im testing with *tUser:SendData("$Search 192.168.0.1:413 T?F?0?1?.|")*
Title:
Post by: Corayzon on 18 June, 2004, 12:01:52
i sorted it all out, but i found ptokax doesnt handle the sr's in the second listening
socket to the main data arrival function =[ *shy*

what to do?
Title:
Post by: tezlo on 18 June, 2004, 12:27:21
not much you _can do.. active search results are not really meant to go through the hub
Title:
Post by: Corayzon on 19 June, 2004, 01:15:31
there is NOTHING i can do, and for passive search results to the active hub, happens all the time!

if your client has no tag a active search is sent to them, therefor, this can happen a bit.

im just very disapointed that you cant handle this in ptokax. The rs's even come to the log =[

this has held up cslave 1.0 cause i need access to this handle to be able to fully determine stuff that hubowners might want to turn on.

can someone please get the sr's recieved as udp packets from the hub on port 413, so we can handle them and make hub scripts more powerfull!
Title:
Post by: kepp on 27 June, 2004, 21:55:56
The thing is, Active $SR goes from client to client within a UDP Packet.
The hub handles $Search for both active and passive, but only Passive $SR arrives
Title:
Post by: Corayzon on 28 June, 2004, 01:43:15
kepp says:-
'The thing is, Active $SR goes from client to client within a UDP Packet.
The hub handles $Search for both active and passive, but only Passive $SR arrives'

have a play dude, ... remove ur tag and in ptokax set the cmds to log the screen.

now login and ull see what i mean ;)

...

ptokax sends a active search to the user with a return address of the hub on port 413 when they have no tag. The return result is sent back to the hub on port 413 and can be seen in ptokax's log.

Also, only the first return is handled by ptokax and seen in the cmd log in ptokax

noza