From 93b148715f75aa29947fa3181cdf22d8209431a8 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 5 May 2010 11:24:45 +0100 Subject: net.server_event: Be sure to fire onincoming for backwards-compatibility with pre-onconnect listeners (thanks darkrain/mod_console) --- net/server_event.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/server_event.lua b/net/server_event.lua index be9e7f0a..dde13e61 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -161,7 +161,7 @@ do self:_lock( false, false, false ) --vdebug( "start listening on client socket with id:", self.id ) self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ); -- register callback - (self.onconnect or self.onincoming)(self) + self:onconnect() self.eventsession = nil return -1 end @@ -437,6 +437,7 @@ do -- Stub handlers function interface_mt:onconnect() + return self:onincoming(nil); end function interface_mt:onincoming() end -- cgit v1.2.3