]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add back in a session start handler
authorEvan Prodromou <evan@prodromou.name>
Wed, 27 Aug 2008 13:54:22 +0000 (09:54 -0400)
committerEvan Prodromou <evan@prodromou.name>
Wed, 27 Aug 2008 13:54:22 +0000 (09:54 -0400)
darcs-hash:20080827135422-84dde-857d6e980e18803186d080a60eea60f1362bb348.gz

scripts/xmppdaemon.php

index c15f28113121cb73d4cfd515fb35edc564eebb5c..8b5c727b6f6676468a6887dc69e0fdcf08b73b2a 100755 (executable)
@@ -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;