Mercurial > prosody-hg
comparison plugins/mod_presence.lua @ 1245:be5fe60bd866
mod_presence: Changed to use the prosody.events object directly, rather than through eventmanager2
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sun, 31 May 2009 00:45:02 +0500 |
| parents | d60e68855176 |
| children | d0e80c1578e1 |
comparison
equal
deleted
inserted
replaced
| 1244:3df7417225fe | 1245:be5fe60bd866 |
|---|---|
| 265 end | 265 end |
| 266 end | 266 end |
| 267 return true; | 267 return true; |
| 268 end | 268 end |
| 269 | 269 |
| 270 local add_handler = require "core.eventmanager2".add_handler; | 270 prosody.events.add_handler(module:get_host().."/presence", presence_handler); |
| 271 local remove_handler = require "core.eventmanager2".remove_handler; | |
| 272 | |
| 273 add_handler(module:get_host().."/presence", presence_handler); | |
| 274 module.unload = function() | 271 module.unload = function() |
| 275 remove_handler(module:get_host().."/presence", presence_handler); | 272 prosody.events.remove_handler(module:get_host().."/presence", presence_handler); |
| 276 end | 273 end |
