Show joins/parts of XMPP users

The users on the hub don't see if an user connects to hub via XMPP.

I created a Lua script for fixing this problem:

  1. --[[
  2. Copyright (C) 2008-2009 Viktor Balazs
  3.  
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. ]]--
  17.  
  18. join = {}
  19.  
  20. function join.dataReceived( data )
  21. result = false
  22.  
  23. if data:getSource() ~= nil then
  24. irrHub = kleodora:getService( "adcs://dcwatch.hu:29673" )
  25. if irrHub ~= nil then
  26. if data:getType() == "user.connected" then
  27. irrHub:sendMessage( "Joins: " .. data:getValue():getName() )
  28. elseif data:getType() == "user.disconnected" then
  29. irrHub:sendMessage( "Parts: " .. data:getValue():getName() )
  30. end
  31. end
  32. end
  33.  
  34. return result
  35. end
  36.  
  37. joinProxy = luajava.createProxy( "hu.dcwatch.common.service.ServiceListener", join )
  38. kleodora:addListener( "join.lua", joinProxy )