mudgangster

Log | Files | Refs

commit a1a83bc5df419608d390f42e609999c217b43126
parent 2c7198b6ce4e448af64a01cfd1c116e8e0bc7b3f
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat, 25 Oct 2014 14:19:24 +0100

Send client version

Diffstat:
chat.lua | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/chat.lua b/chat.lua @@ -6,6 +6,7 @@ local CommandBytes = { all = "\4", pm = "\5", message = "\7", + version = "\19", } local Clients = { } @@ -133,6 +134,11 @@ local function call( address, port ) ev.IO.new( function( loop, watcher ) dataHandler( client, loop, watcher ) end, sock:getfd(), ev.READ ):start( loop ) + + ev.IO.new( function( loop, watcher ) + client.socket:send( CommandBytes.version .. "MudGangster" .. "\255" ) + watcher:stop( loop ) + end, sock:getfd(), ev.WRITE ):start( loop ) else mud.print( "\n#s> Failed to call %s:%d", address, port ) end