function Init () print "Loading sockets library..." -- load luasocket namespace socket = require("socket") print ("Socket library version:", socket._VERSION) -- table to map sockets to clients sockets = {} -- comms routines (read/write from sockets) dofile "comms.lua" -- stuff to handle new clients connecting dofile "logon.lua" -- assorted utilities dofile "utils.lua" -- player handling dofile "player.lua" -- commands dofile "commands.lua" print "Binding server port ..." -- create a TCP socket and bind it to the local host server = assert (socket.bind ("*", config.port)) server:settimeout (0) -- do not block waiting for client connections print ("MUD ready, on port", config.port) end -- Init