Welcome to the PtokaX Wiki!


This wiki is devoted to let users share information on the great hubsoft PtokaX. However, it is not limited to PtokaX, it is destined to share and discuss information on different parts of the LUA programming language, but the site is NOT intended to be a replacement for the primary LUA Board aka the PtokaX Portal, nor the secondary LUA Board or the PtokaX resources.

If you’re not familiar with wikis then in short: they are user-contributed sites: pages can be edited by (almost) anyone. As such, there is always kind of up-to-date and (hopefully) proper content. They are better than forums, since relevant pieces of information are on the same page. Do not hesitate to share your knowledge, and we all hope you can learn and teach a lot here! — bastya_elvtars



Command Types (server to server)

Direct Connect uses UDP for server to server communication. The following section describes the format of the Commands. Each field is denoted with < >. The fields in the command are separated by a single space character (ASCII 32). And each Command ends with a | (pipe). All Commands are case sensitive. $Up

This message will be sent to each linked server.

  $Up <linkedserverpassword> <ownip> 
  • <linkedserverpassword> is the multi-hub searching password shared by linked hubs.
  • <ownip> is the ip address of the hub sending the command.

The server receiving the $Up command must then respond with

  $UpToo <linkedserverpassword> <ownip> 
  • <linkedserverpassword> is the multi-hub searching password shared by linked hubs.
  • <ownip> is the ip address of the hub sending the command.

$Search

Clients are either “active”, indicating they are on the Internet and can receive data directly from peers, or “passive”, in which case they can communicate only through the existing connection to the server. To perform a search, an active client can send,

  $Search <clientip>:<clientport> <searchstring>
  i.e. $Search 64.78.55.32:412 T?T?500000?1?madonna$ray 
  • <clientip> is this client's IP address.
  • <clientport> is a UDP port on which the client is listening for responses.
  • <searchstring> is a string describing the file the client is searching for.

<searchstring> is made up of

  <sizerestricted>?<isminimumsize>?<size>?<datatype>?<searchpattern> 
  • <sizerestricted> is T if the search should be restricted to files of a minimum or maximum size, otherwise F.
  • <isminimumsize> is F if <sizerestricted> is F or if the size restriction places an upper limit on file size, otherwise T.
  • <size> is the minimum or maximum size of the file to report (according to <isminimumsize>) if <sizerestricted> is T, otherwise 0.
  • <datatype> restricts the search to files of a particular type. It is an integer selected from:

o 1 for any file type

        o 2 for audio files ("mp3", "mp2", "wav", "au", "rm", "mid", "sm")
        o 3 for compressed files ("zip", "arj", "rar", "lzh", "gz", "z", "arc", "pak")
        o 4 for documents ("doc", "txt", "wri", "pdf", "ps", "tex")
        o 5 for executables ("pm", "exe", "bat", "com")
        o 6 for pictures ("gif", "jpg", "jpeg", "bmp", "pcx", "png", "wmf", "psd")
        o 7 for video ("mpg", "mpeg", "avi", "asf", "mov")
        o 8 for folders
  * <searchpattern> is used other users to determine if any files match. It is of the form:
        <term1>$<term2>$<term3>$...$ 
    where <term1>, <term2>, ... are search terms; normally, each search term is a space-delimited word entered by the user. Each search term is followed by a $, and after the last search term there is a total of two $.

$ConnectToMe

This message sends the server to each linked server, when a user sends the $MultiConnectToMe message.

  $ConnectToMe <remotenick> <senderip>:<senderport> 
  • <remotenick> is the nick who we would like to connect to.
  • <senderip> is our external ip address.
  • <senderport> is the port we are listening on.

Personal Tools