# HG changeset patch # User Matthew Wild # Date 1258823519 0 # Node ID 466bd2cac62ae66bd299f283cba2fea4fc84ac50 # Parent 0e0bc74c64a0652a6c5dbe28dbe44062ab82b009 net.connlisteners: Standardise on new syntax for addserver(), and clean up a bit diff -r 0e0bc74c64a0 -r 466bd2cac62a net/connlisteners.lua --- a/net/connlisteners.lua Sat Nov 21 17:07:22 2009 +0000 +++ b/net/connlisteners.lua Sat Nov 21 17:11:59 2009 +0000 @@ -61,9 +61,14 @@ end end - return server.addserver(h, - (udata and udata.port) or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0), - (udata and udata.interface) or h.default_interface or "*", (udata and udata.mode) or h.default_mode or 1, (udata and udata.ssl) or nil, 99999999, udata and udata.type == "ssl"); + local interface = (udata and udata.interface) or h.default_interface or "*"; + local port = (udata and udata.port) or h.default_port or error("Can't start listener "..name.." because no port was specified, and it has no default port", 0); + local mode = (udata and udata.mode) or h.default_mode or 1; + local ssl = (udata and udata.ssl) or nil; + local maxclients = 99999999; + local autossl = udata and udata.type == "ssl"; + + return server.addserver(interface, port, h, mode, ssl, autossl); end return _M;