Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 1.54 KB

README.md

File metadata and controls

49 lines (40 loc) · 1.54 KB

OpenComputers-chat

Server and client must contain at least one wireless network card or network card. That's all.
Both client and server can be represented as you want — computer, server or even robot.

Server

Server type: Parallel
Consists of three levels.

Each level is broadcasting only in its own separate port.

  • 1. Registration Level. Registration of new users is going on here.
  • 2. Authentication Level. Registered users login here.
  • 3. Primary Level. Actually the chat.

    Note: User names and passwords stored in a "users" file.
    Note: Primary level has a random port each new uptime cycle.
    Recommended: Register the "Server.lua" script in autorun.lua on the server side

    Server commands
    restart - force restart.
    close - сlose server immediately.
    [message] - broadcast message with tag [Server].
    ban [nickname] - ban by nickname (create a row in banlist).

    Configuration example:

    home> edit server
    * Paste Server.lua code here
    * Ctrl-S
    * Ctrl-W
    home> server

    If you saw "Log file size — 0 bytes" then server configure is done.

    Client

    On chat start client check connection to server
    After success login client receive primary level port from the server (chat port)
    Use "exit" to exit from current chat

    Configuration example:

    home> edit client
    * Paste Client.lua code here
    * Ctrl-S
    * Ctrl-W
    home> client