diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-08-27 09:54:22 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-08-27 09:54:22 -0400 |
commit | 9bdc7f8ec7abb53990b9360ccbdf5d38915c26de (patch) | |
tree | e058f7942864b9a7e2925cf79ba00bc0487cfa7c /scripts/xmppdaemon.php | |
parent | b69b206c97a97e89b9a7d80a1b4f7b65447f8039 (diff) |
add back in a session start handler
darcs-hash:20080827135422-84dde-857d6e980e18803186d080a60eea60f1362bb348.gz
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-x | scripts/xmppdaemon.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php index c15f28113..8b5c727b6 100755 --- a/scripts/xmppdaemon.php +++ b/scripts/xmppdaemon.php @@ -96,17 +96,22 @@ class XMPPDaemon { function handle() { - $this->conn->addEventHandler('message','handle_message',$this); - $this->conn->addEventHandler('presence','handle_presence',$this); + $this->conn->addEventHandler('message', 'handle_message', $this); + $this->conn->addEventHandler('presence', 'handle_presence', $this); + $this->conn->addEventHandler('session_start', 'handle_session_start', $this); + while(!$this->conn->isDisconnected()) { - $this->conn->processTime(10); $this->broadcast_queue(); $this->confirmation_queue(); } } - + function handle_session_start(&$pl) { + $this->conn->getRoster(); + $this->set_status("Send me a message to post a notice"); + } + function get_user($from) { $user = User::staticGet('jabber', jabber_normalize_jid($from)); return $user; |