code:
<?php
/**
 * XMPPHP: The PHP XMPP Library
 * Copyright (C) 2008  Nathanael C. Fritz
 * This file is part of SleekXMPP.
 *
 * XMPPHP is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * XMPPHP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XMPPHP; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @category   xmpphp
 * @package	XMPPHP
 * @author	 Nathanael C. Fritz <JID: fritzy@netflint.net>
 * @author	 Stephan Wentz <JID: stephan@jabber.wentz.it>
 * @author	 Michael Garvin <JID: gar@netflint.net>
 * @copyright  2008 Nathanael C. Fritz
 */

/**
 * XMPPHP XML Object
 *
 * @category   xmpphp
 * @package	XMPPHP
 * @author	 Nathanael C. Fritz <JID: fritzy@netflint.net>
 * @author	 Stephan Wentz <JID: stephan@jabber.wentz.it>
 * @author	 Michael Garvin <JID: gar@netflint.net>
 * @copyright  2008 Nathanael C. Fritz
 * @version	$Id$
 */
class XMPPHP_XMLObj {
	/**
	 * Tag name
	 *
	 * @var string
	 */
	public $name;

	/**
	 * Namespace
	 *
	 * @var string
	 */
	public $ns;

	/**
	 * Attributes
	 *
	 * @var array
	 */
	public $attrs = array();

	/**
	 * Subs?
	 *
	 * @var array
	 */
	public $subs = array();

	/**
	 * Node data
	 *
	 * @var string
	 */
	public $data = '';

	/**
	 * Constructor
	 *
	 * @param string $name
	 * @param string $ns
	 * @param array  $attrs
	 * @param string $data
	 */
	public function __construct($name, $ns = '', $attrs = array(), $data = '') {
		$this->name = strtolower($name);
		$this->ns   = $ns;
		if(is_array($attrs) && count($attrs)) {
			foreach($attrs as $key => $value) {
				$this->attrs[strtolower($key)] = $value;
			}
		}
		$this->data = $data;
	}

	/**
	 * Dump this XML Object to output.
	 *
	 * @param integer $depth
	 */
	public function printObj($depth = 0) {
		print str_repeat("\t", $depth) . $this->name . " " . $this->ns . ' ' . $this->data;
		print "\n";
		foreach($this->subs as $sub) {
			$sub->printObj($depth + 1);
		}
	}

	/**
	 * Return this XML Object in xml notation
	 *
	 * @param string $str
	 */
	public function toString($str = '') {
		$str .= "<{$this->name} xmlns='{$this->ns}' ";
		foreach($this->attrs as $key => $value) {
			if($key != 'xmlns') {
				$value = htmlspecialchars($value);
				$str .= "$key='$value' ";
			}
		}
		$str .= ">";
		foreach($this->subs as $sub) {
			$str .= $sub->toString();
		}
		$body = htmlspecialchars($this->data);
		$str .= "$body</{$this->name}>";
		return $str;
	}

	/**
	 * Has this XML Object the given sub?
	 *
	 * @param string $name
	 * @return boolean
	 */
	public function hasSub($name, $ns = null) {
		foreach($this->subs as $sub) {
			if(($name == "*" or $sub->name == $name) and ($ns == null or $sub->ns == $ns)) return true;
		}
		return false;
	}

	/**
	 * Return a sub
	 *
	 * @param string $name
	 * @param string $attrs
	 * @param string $ns
	 */
	public function sub($name, $attrs = null, $ns = null) {
		#TODO attrs is ignored
		foreach($this->subs as $sub) {
			if($sub->name == $name and ($ns == null or $sub->ns == $ns)) {
				return $sub;
			}
		}
	}
}


code:
<?php
/**
 * XMPPHP: The PHP XMPP Library
 * Copyright (C) 2008  Nathanael C. Fritz
 * This file is part of SleekXMPP.
 *
 * XMPPHP is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * XMPPHP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XMPPHP; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @category   xmpphp
 * @package	XMPPHP
 * @author	 Nathanael C. Fritz <JID: fritzy@netflint.net>
 * @author	 Stephan Wentz <JID: stephan@jabber.wentz.it>
 * @author	 Michael Garvin <JID: gar@netflint.net>
 * @copyright  2008 Nathanael C. Fritz
 */

/** XMPPHP_Exception */
require_once dirname(__FILE__) . '/Exception.php';

/** XMPPHP_XMLObj */
require_once dirname(__FILE__) . '/XMLObj.php';

/** XMPPHP_Log */
require_once dirname(__FILE__) . '/Log.php';

/**
 * XMPPHP XML Stream
 *
 * @category   xmpphp
 * @package	XMPPHP
 * @author	 Nathanael C. Fritz <JID: fritzy@netflint.net>
 * @author	 Stephan Wentz <JID: stephan@jabber.wentz.it>
 * @author	 Michael Garvin <JID: gar@netflint.net>
 * @copyright  2008 Nathanael C. Fritz
 * @version	$Id$
 */
class XMPPHP_XMLStream {
	/**
	 * @var resource
	 */
	protected $socket;
	/**
	 * @var resource
	 */
	protected $parser;
	/**
	 * @var string
	 */
	protected $buffer;
	/**
	 * @var integer
	 */
	protected $xml_depth = 0;
	/**
	 * @var string
	 */
	protected $host;
	/**
	 * @var integer
	 */
	protected $port;
	/**
	 * @var string
	 */
	protected $stream_start = '<stream>';
	/**
	 * @var string
	 */
	protected $stream_end = '</stream>';
	/**
	 * @var boolean
	 */
	protected $disconnected = false;
	/**
	 * @var boolean
	 */
	protected $sent_disconnect = false;
	/**
	 * @var array
	 */
	protected $ns_map = array();
	/**
	 * @var array
	 */
	protected $current_ns = array();
	/**
	 * @var array
	 */
	protected $xmlobj = null;
	/**
	 * @var array
	 */
	protected $nshandlers = array();
	/**
	 * @var array
	 */
	protected $xpathhandlers = array();
	/**
	 * @var array
	 */
	protected $idhandlers = array();
	/**
	 * @var array
	 */
	protected $eventhandlers = array();
	/**
	 * @var integer
	 */
	protected $lastid = 0;
	/**
	 * @var string
	 */
	protected $default_ns;
	/**
	 * @var string
	 */
	protected $until = '';
	/**
	 * @var string
	 */
	protected $until_count = '';
	/**
	 * @var array
	 */
	protected $until_happened = false;
	/**
	 * @var array
	 */
	protected $until_payload = array();
	/**
	 * @var XMPPHP_Log
	 */
	protected $log;
	/**
	 * @var boolean
	 */
	protected $reconnect = true;
	/**
	 * @var boolean
	 */
	protected $been_reset = false;
	/**
	 * @var boolean
	 */
	protected $is_server;
	/**
	 * @var float
	 */
	protected $last_send = 0;
	/**
	 * @var boolean
	 */
	protected $use_ssl = false;
	/**
	 * @var integer
	 */
	protected $reconnectTimeout = 30;

	/**
	 * Constructor
	 *
	 * @param string  $host
	 * @param string  $port
	 * @param boolean $printlog
	 * @param string  $loglevel
	 * @param boolean $is_server
	 */
	public function __construct($host = null, $port = null, $printlog = false, $loglevel = null, $is_server = false) {
		$this->reconnect = !$is_server;
		$this->is_server = $is_server;
		$this->host = $host;
		$this->port = $port;
		$this->setupParser();
		$this->log = new XMPPHP_Log($printlog, $loglevel);
	}

	/**
	 * Destructor
	 * Cleanup connection
	 */
	public function __destruct() {
		if(!$this->disconnected && $this->socket) {
			$this->disconnect();
		}
	}

	/**
	 * Return the log instance
	 *
	 * @return XMPPHP_Log
	 */
	public function getLog() {
		return $this->log;
	}

	/**
	 * Get next ID
	 *
	 * @return integer
	 */
	public function getId() {
		$this->lastid++;
		return $this->lastid;
	}

	/**
	 * Set SSL
	 *
	 * @return integer
	 */
	public function useSSL($use=true) {
		$this->use_ssl = $use;
	}

	/**
	 * Add ID Handler
	 *
	 * @param integer $id
	 * @param string  $pointer
	 * @param string  $obj
	 */
	public function addIdHandler($id, $pointer, $obj = null) {
		$this->idhandlers[$id] = array($pointer, $obj);
	}

	/**
	 * Add Handler
	 *
	 * @param string $name
	 * @param string  $ns
	 * @param string  $pointer
	 * @param string  $obj
	 * @param integer $depth
	 */
	public function addHandler($name, $ns, $pointer, $obj = null, $depth = 1) {
		#TODO deprication warning
		$this->nshandlers[] = array($name,$ns,$pointer,$obj, $depth);
	}

	/**
	 * Add XPath Handler
	 *
	 * @param string $xpath
	 * @param string $pointer
	 * @param
	 */
	public function addXPathHandler($xpath, $pointer, $obj = null) {
		if (preg_match_all("/\(?{[^\}]+}\)?(\/?)[^\/]+/", $xpath, $regs)) {
			$ns_tags = $regs[0];
		} else {
			$ns_tags = array($xpath);
		}
		foreach($ns_tags as $ns_tag) {
			list($l, $r) = split("}", $ns_tag);
			if ($r != null) {
				$xpart = array(substr($l, 1), $r);
			} else {
				$xpart = array(null, $l);
			}
			$xpath_array[] = $xpart;
		}
		$this->xpathhandlers[] = array($xpath_array, $pointer, $obj);
	}

	/**
	 * Add Event Handler
	 *
	 * @param integer $id
	 * @param string  $pointer
	 * @param string  $obj
	 */
	public function addEventHandler($name, $pointer, $obj) {
		$this->eventhandlers[] = array($name, $pointer, $obj);
	}

	/**
	 * Connect to XMPP Host
	 *
	 * @param integer $timeout
	 * @param boolean $persistent
	 * @param boolean $sendinit
	 */
	public function connect($timeout = 30, $persistent = false, $sendinit = true) {
		$this->sent_disconnect = false;
		$starttime = time();

		do {
			$this->disconnected = false;
			$this->sent_disconnect = false;
			if($persistent) {
				$conflag = STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT;
			} else {
				$conflag = STREAM_CLIENT_CONNECT;
			}
			$conntype = 'tcp';
			if($this->use_ssl) $conntype = 'ssl';
			$this->log->log("Connecting to $conntype://{$this->host}:{$this->port}");
			try {
				$this->socket = @stream_socket_client("$conntype://{$this->host}:{$this->port}", $errno, $errstr, $timeout, $conflag);
			} catch (Exception $e) {
				throw new XMPPHP_Exception($e->getMessage());
			}
			if(!$this->socket) {
				$this->log->log("Could not connect.",  XMPPHP_Log::LEVEL_ERROR);
				$this->disconnected = true;
				# Take it easy for a few seconds
				sleep(min($timeout, 5));
			}
		} while (!$this->socket && (time() - $starttime) < $timeout);

		if ($this->socket) {
			stream_set_blocking($this->socket, 1);
			if($sendinit) $this->send($this->stream_start);
		} else {
			throw new XMPPHP_Exception("Could not connect before timeout.");
		}
	}

	/**
	 * Reconnect XMPP Host
	 */
	public function doReconnect() {
		if(!$this->is_server) {
			$this->log->log("Reconnecting ($this->reconnectTimeout)...",  XMPPHP_Log::LEVEL_WARNING);
			$this->connect($this->reconnectTimeout, false, false);
			$this->reset();
			$this->event('reconnect');
		}
	}

	public function setReconnectTimeout($timeout) {
		$this->reconnectTimeout = $timeout;
	}

	/**
	 * Disconnect from XMPP Host
	 */
	public function disconnect() {
		$this->log->log("Disconnecting...",  XMPPHP_Log::LEVEL_VERBOSE);
		if(false == (bool) $this->socket) {
			return;
		}
		$this->reconnect = false;
		$this->send($this->stream_end);
		$this->sent_disconnect = true;
		$this->processUntil('end_stream', 5);
		$this->disconnected = true;
	}

	/**
	 * Are we are disconnected?
	 *
	 * @return boolean
	 */
	public function isDisconnected() {
		return $this->disconnected;
	}

	/**
	 * Core reading tool
	 * 0 -> only read if data is immediately ready
	 * NULL -> wait forever and ever
	 * integer -> process for this amount of time
	 */

	private function __process($maximum=5) {

		$remaining = $maximum;

		do {
			$starttime = (microtime(true) * 1000000);
			$read = array($this->socket);
			$write = array();
			$except = array();
			if (is_null($maximum)) {
				$secs = NULL;
				$usecs = NULL;
			} else if ($maximum == 0) {
				$secs = 0;
				$usecs = 0;
			} else {
				$usecs = $remaining % 1000000;
				$secs = floor(($remaining - $usecs) / 1000000);
			}
			$updated = @stream_select($read, $write, $except, $secs, $usecs);
			if ($updated === false) {
				$this->log->log("Error on stream_select()",  XMPPHP_Log::LEVEL_VERBOSE);
				if ($this->reconnect) {
					$this->doReconnect();
				} else {
					fclose($this->socket);
					$this->socket = NULL;
					return false;
				}
			} else if ($updated > 0) {
				# XXX: Is this big enough?
				$buff = @fread($this->socket, 4096);
				if(!$buff) {
					if($this->reconnect) {
						$this->doReconnect();
					} else {
						fclose($this->socket);
						$this->socket = NULL;
						return false;
					}
				}
				$this->log->log("RECV: $buff",  XMPPHP_Log::LEVEL_VERBOSE);
				xml_parse($this->parser, $buff, false);
			} else {
				# $updated == 0 means no changes during timeout.
			}
			$endtime = (microtime(true)*1000000);
			$time_past = $endtime - $starttime;
			$remaining = $remaining - $time_past;
		} while (is_null($maximum) || $remaining > 0);
		return true;
	}

	/**
	 * Process
	 *
	 * @return string
	 */
	public function process() {
		$this->__process(NULL);
	}

	/**
	 * Process until a timeout occurs
	 *
	 * @param integer $timeout
	 * @return string
	 */
	public function processTime($timeout=NULL) {
		if (is_null($timeout)) {
			return $this->__process(NULL);
		} else {
			return $this->__process($timeout * 1000000);
		}
	}

	/**
	 * Process until a specified event or a timeout occurs
	 *
	 * @param string|array $event
	 * @param integer $timeout
	 * @return string
	 */
	public function processUntil($event, $timeout=-1) {
		$start = time();
		if(!is_array($event)) $event = array($event);
		$this->until[] = $event;
		end($this->until);
		$event_key = key($this->until);
		reset($this->until);
		$this->until_count[$event_key] = 0;
		$updated = '';
		while(!$this->disconnected and $this->until_count[$event_key] < 1 and (time() - $start < $timeout or $timeout == -1)) {
			$this->__process();
		}
		if(array_key_exists($event_key, $this->until_payload)) {
			$payload = $this->until_payload[$event_key];
			unset($this->until_payload[$event_key]);
			unset($this->until_count[$event_key]);
			unset($this->until[$event_key]);
		} else {
			$payload = array();
		}
		return $payload;
	}

	/**
	 * Obsolete?
	 */
	public function Xapply_socket($socket) {
		$this->socket = $socket;
	}

	/**
	 * XML start callback
	 *
	 * @see xml_set_element_handler
	 *
	 * @param resource $parser
	 * @param string   $name
	 */
	public function startXML($parser, $name, $attr) {
		if($this->been_reset) {
			$this->been_reset = false;
			$this->xml_depth = 0;
		}
		$this->xml_depth++;
		if(array_key_exists('XMLNS', $attr)) {
			$this->current_ns[$this->xml_depth] = $attr['XMLNS'];
		} else {
			$this->current_ns[$this->xml_depth] = $this->current_ns[$this->xml_depth - 1];
			if(!$this->current_ns[$this->xml_depth]) $this->current_ns[$this->xml_depth] = $this->default_ns;
		}
		$ns = $this->current_ns[$this->xml_depth];
		foreach($attr as $key => $value) {
			if(strstr($key, ":")) {
				$key = explode(':', $key);
				$key = $key[1];
				$this->ns_map[$key] = $value;
			}
		}
		if(!strstr($name, ":") === false)
		{
			$name = explode(':', $name);
			$ns = $this->ns_map[$name[0]];
			$name = $name[1];
		}
		$obj = new XMPPHP_XMLObj($name, $ns, $attr);
		if($this->xml_depth > 1) {
			$this->xmlobj[$this->xml_depth - 1]->subs[] = $obj;
		}
		$this->xmlobj[$this->xml_depth] = $obj;
	}

	/**
	 * XML end callback
	 *
	 * @see xml_set_element_handler
	 *
	 * @param resource $parser
	 * @param string   $name
	 */
	public function endXML($parser, $name) {
		#$this->log->log("Ending $name",  XMPPHP_Log::LEVEL_DEBUG);
		#print "$name\n";
		if($this->been_reset) {
			$this->been_reset = false;
			$this->xml_depth = 0;
		}
		$this->xml_depth--;
		if($this->xml_depth == 1) {
			#clean-up old objects
			#$found = false; #FIXME This didn't appear to be in use --Gar
			foreach($this->xpathhandlers as $handler) {
				if (is_array($this->xmlobj) && array_key_exists(2, $this->xmlobj)) {
					$searchxml = $this->xmlobj[2];
					$nstag = array_shift($handler[0]);
					if (($nstag[0] == null or $searchxml->ns == $nstag[0]) and ($nstag[1] == "*" or $nstag[1] == $searchxml->name)) {
						foreach($handler[0] as $nstag) {
							if ($searchxml !== null and $searchxml->hasSub($nstag[1], $ns=$nstag[0])) {
								$searchxml = $searchxml->sub($nstag[1], $ns=$nstag[0]);
							} else {
								$searchxml = null;
								break;
							}
						}
						if ($searchxml !== null) {
							if($handler[2] === null) $handler[2] = $this;
							$this->log->log("Calling {$handler[1]}",  XMPPHP_Log::LEVEL_DEBUG);
							$handler[2]->$handler[1]($this->xmlobj[2]);
						}
					}
				}
			}
			foreach($this->nshandlers as $handler) {
				if($handler[4] != 1 and array_key_exists(2, $this->xmlobj) and  $this->xmlobj[2]->hasSub($handler[0])) {
					$searchxml = $this->xmlobj[2]->sub($handler[0]);
				} elseif(is_array($this->xmlobj) and array_key_exists(2, $this->xmlobj)) {
					$searchxml = $this->xmlobj[2];
				}
				if($searchxml !== null and $searchxml->name == $handler[0] and ($searchxml->ns == $handler[1] or (!$handler[1] and $searchxml->ns == $this->default_ns))) {
					if($handler[3] === null) $handler[3] = $this;
					$this->log->log("Calling {$handler[2]}",  XMPPHP_Log::LEVEL_DEBUG);
					$handler[3]->$handler[2]($this->xmlobj[2]);
				}
			}
			foreach($this->idhandlers as $id => $handler) {
				if(array_key_exists('id', $this->xmlobj[2]->attrs) and $this->xmlobj[2]->attrs['id'] == $id) {
					if($handler[1] === null) $handler[1] = $this;
					$handler[1]->$handler[0]($this->xmlobj[2]);
					#id handlers are only used once
					unset($this->idhandlers[$id]);
					break;
				}
			}
			if(is_array($this->xmlobj)) {
				$this->xmlobj = array_slice($this->xmlobj, 0, 1);
				if(isset($this->xmlobj[0]) && $this->xmlobj[0] instanceof XMPPHP_XMLObj) {
					$this->xmlobj[0]->subs = null;
				}
			}
			unset($this->xmlobj[2]);
		}
		if($this->xml_depth == 0 and !$this->been_reset) {
			if(!$this->disconnected) {
				if(!$this->sent_disconnect) {
					$this->send($this->stream_end);
				}
				$this->disconnected = true;
				$this->sent_disconnect = true;
				fclose($this->socket);
				if($this->reconnect) {
					$this->doReconnect();
				}
			}
			$this->event('end_stream');
		}
	}

	/**
	 * XML character callback
	 * @see xml_set_character_data_handler
	 *
	 * @param resource $parser
	 * @param string   $data
	 */
	public function charXML($parser, $data) {
		if(array_key_exists($this->xml_depth, $this->xmlobj)) {
			$this->xmlobj[$this->xml_depth]->data .= $data;
		}
	}

	/**
	 * Event?
	 *
	 * @param string $name
	 * @param string $payload
	 */
	public function event($name, $payload = null) {
		$this->log->log("EVENT: $name",  XMPPHP_Log::LEVEL_DEBUG);
		foreach($this->eventhandlers as $handler) {
			if($name == $handler[0]) {
				if($handler[2] === null) {
					$handler[2] = $this;
				}
				$handler[2]->$handler[1]($payload);
			}
		}
		foreach($this->until as $key => $until) {
			if(is_array($until)) {
				if(in_array($name, $until)) {
					$this->until_payload[$key][] = array($name, $payload);
					if(!isset($this->until_count[$key])) {
						$this->until_count[$key] = 0;
					}
					$this->until_count[$key] += 1;
					#$this->until[$key] = false;
				}
			}
		}
	}

	/**
	 * Read from socket
	 */
	public function read() {
		$buff = @fread($this->socket, 1024);
		if(!$buff) {
			if($this->reconnect) {
				$this->doReconnect();
			} else {
				fclose($this->socket);
				return false;
			}
		}
		$this->log->log("RECV: $buff",  XMPPHP_Log::LEVEL_VERBOSE);
		xml_parse($this->parser, $buff, false);
	}

	/**
	 * Send to socket
	 *
	 * @param string $msg
	 */
	public function send($msg, $timeout=NULL) {

		if (is_null($timeout)) {
			$secs = NULL;
			$usecs = NULL;
		} else if ($timeout == 0) {
			$secs = 0;
			$usecs = 0;
		} else {
			$maximum = $timeout * 1000000;
			$usecs = $maximum % 1000000;
			$secs = floor(($maximum - $usecs) / 1000000);
		}

		$read = array();
		$write = array($this->socket);
		$except = array();

		$select = @stream_select($read, $write, $except, $secs, $usecs);

		if($select === False) {
			$this->log->log("ERROR sending message; reconnecting.");
			$this->doReconnect();
			# TODO: retry send here
			return false;
		} elseif ($select > 0) {
			$this->log->log("Socket is ready; send it.", XMPPHP_Log::LEVEL_VERBOSE);
		} else {
			$this->log->log("Socket is not ready; break.", XMPPHP_Log::LEVEL_ERROR);
			return false;
		}

		$sentbytes = @fwrite($this->socket, $msg);
		$this->log->log("SENT: " . mb_substr($msg, 0, $sentbytes, '8bit'), XMPPHP_Log::LEVEL_VERBOSE);
		if($sentbytes === FALSE) {
			$this->log->log("ERROR sending message; reconnecting.", XMPPHP_Log::LEVEL_ERROR);
			$this->doReconnect();
			return false;
		}
		$this->log->log("Successfully sent $sentbytes bytes.", XMPPHP_Log::LEVEL_VERBOSE);
		return $sentbytes;
	}

	public function time() {
		list($usec, $sec) = explode(" ", microtime());
		return (float)$sec + (float)$usec;
	}

	/**
	 * Reset connection
	 */
	public function reset() {
		$this->xml_depth = 0;
		unset($this->xmlobj);
		$this->xmlobj = array();
		$this->setupParser();
		if(!$this->is_server) {
			$this->send($this->stream_start);
		}
		$this->been_reset = true;
	}

	/**
	 * Setup the XML parser
	 */
	public function setupParser() {
		$this->parser = xml_parser_create('UTF-8');
		xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1);
		xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, 'UTF-8');
		xml_set_object($this->parser, $this);
		xml_set_element_handler($this->parser, 'startXML', 'endXML');
		xml_set_character_data_handler($this->parser, 'charXML');
	}

	public function readyToProcess() {
		$read = array($this->socket);
		$write = array();
		$except = array();
		$updated = @stream_select($read, $write, $except, 0);
		return (($updated !== false) && ($updated > 0));
	}
}

license: mit


code:
<?php
/**
 * XMPPHP: The PHP XMPP Library
 * Copyright (C) 2008  Nathanael C. Fritz
 * This file is part of SleekXMPP.
 *
 * XMPPHP is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * XMPPHP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XMPPHP; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @category   xmpphp
 * @package	XMPPHP
 * @author	 Nathanael C. Fritz <JID: fritzy@netflint.net>
 * @author	 Stephan Wentz <JID: stephan@jabber.wentz.it>
 * @author	 Michael Garvin <JID: gar@netflint.net>
 * @copyright  2008 Nathanael C. Fritz
 */

/** XMPPHP_XMLStream */
require_once dirname(__FILE__) . "/XMLStream.php";
require_once dirname(__FILE__) . "/Roster.php";

/**
 * XMPPHP Main Class
 *
 * @category   xmpphp
 * @package	XMPPHP
 * @author	 Nathanael C. Fritz <JID: fritzy@netflint.net>
 * @author	 Stephan Wentz <JID: stephan@jabber.wentz.it>
 * @author	 Michael Garvin <JID: gar@netflint.net>
 * @copyright  2008 Nathanael C. Fritz
 * @version	$Id$
 */
class XMPPHP_XMPP extends XMPPHP_XMLStream {
	/**
	 * @var string
	 */
	public $server;

	/**
	 * @var string
	 */
	public $user;

	/**
	 * @var string
	 */
	protected $password;

	/**
	 * @var string
	 */
	protected $resource;

	/**
	 * @var string
	 */
	protected $fulljid;

	/**
	 * @var string
	 */
	protected $basejid;

	/**
	 * @var boolean
	 */
	protected $authed = false;
	protected $session_started = false;

	/**
	 * @var boolean
	 */
	protected $auto_subscribe = false;

	/**
	 * @var boolean
	 */
	protected $use_encryption = true;

	/**
	 * @var boolean
	 */
	public $track_presence = true;

	/**
	 * @var object
	 */
	public $roster;

	/**
	 * Constructor
	 *
	 * @param string  $host
	 * @param integer $port
	 * @param string  $user
	 * @param string  $password
	 * @param string  $resource
	 * @param string  $server
	 * @param boolean $printlog
	 * @param string  $loglevel
	 */
	public function __construct($host, $port, $user, $password, $resource, $server = null, $printlog = false, $loglevel = null) {
		parent::__construct($host, $port, $printlog, $loglevel);

		$this->user	 = $user;
		$this->password = $password;
		$this->resource = $resource;
		if(!$server) $server = $host;
		$this->basejid = $this->user . '@' . $this->host;

		$this->roster = new Roster();
		$this->track_presence = true;

		$this->stream_start = '<stream:stream to="' . $server . '" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" version="1.0">';
		$this->stream_end   = '</stream:stream>';
		$this->default_ns   = 'jabber:client';

		$this->addXPathHandler('{http://etherx.jabber.org/streams}features', 'features_handler');
		$this->addXPathHandler('{urn:ietf:params:xml:ns:xmpp-sasl}success', 'sasl_success_handler');
		$this->addXPathHandler('{urn:ietf:params:xml:ns:xmpp-sasl}failure', 'sasl_failure_handler');
		$this->addXPathHandler('{urn:ietf:params:xml:ns:xmpp-tls}proceed', 'tls_proceed_handler');
		$this->addXPathHandler('{jabber:client}message', 'message_handler');
		$this->addXPathHandler('{jabber:client}presence', 'presence_handler');
		$this->addXPathHandler('iq/{jabber:iq:roster}query', 'roster_iq_handler');
	}

	/**
	 * Turn encryption on/ff
	 *
	 * @param boolean $useEncryption
	 */
	public function useEncryption($useEncryption = true) {
		$this->use_encryption = $useEncryption;
	}

	/**
	 * Turn on auto-authorization of subscription requests.
	 *
	 * @param boolean $autoSubscribe
	 */
	public function autoSubscribe($autoSubscribe = true) {
		$this->auto_subscribe = $autoSubscribe;
	}

	/**
	 * Send XMPP Message
	 *
	 * @param string $to
	 * @param string $body
	 * @param string $type
	 * @param string $subject
	 */
	public function message($to, $body, $type = 'chat', $subject = null, $payload = null) {
	    if(is_null($type))
	    {
	        $type = 'chat';
	    }

		$to	  = htmlspecialchars($to);
		$body	= htmlspecialchars($body);
		$subject = htmlspecialchars($subject);

		$out = "<message from=\"{$this->fulljid}\" to=\"$to\" type='$type'>";
		if($subject) $out .= "<subject>$subject</subject>";
		$out .= "<body>$body</body>";
		if($payload) $out .= $payload;
		$out .= "</message>";

		$this->send($out);
	}

	/**
	 * Set Presence
	 *
	 * @param string $status
	 * @param string $show
	 * @param string $to
	 */
	public function presence($status = null, $show = 'available', $to = null, $type='available', $priority=0) {
		if($type == 'available') $type = '';
		$to	 = htmlspecialchars($to);
		$status = htmlspecialchars($status);
		if($show == 'unavailable') $type = 'unavailable';

		$out = "<presence";
		if($to) $out .= " to=\"$to\"";
		if($type) $out .= " type='$type'";
		if($show == 'available' and !$status) {
			$out .= "/>";
		} else {
			$out .= ">";
			if($show != 'available') $out .= "<show>$show</show>";
			if($status) $out .= "<status>$status</status>";
			if($priority) $out .= "<priority>$priority</priority>";
			$out .= "</presence>";
		}

		$this->send($out);
	}
	/**
	 * Send Auth request
	 *
	 * @param string $jid
	 */
	public function subscribe($jid) {
		$this->send("<presence type='subscribe' to='{$jid}' from='{$this->fulljid}' />");
		#$this->send("<presence type='subscribed' to='{$jid}' from='{$this->fulljid}' />");
	}

	/**
	 * Message handler
	 *
	 * @param string $xml
	 */
	public function message_handler($xml) {
		if(isset($xml->attrs['type'])) {
			$payload['type'] = $xml->attrs['type'];
		} else {
			$payload['type'] = 'chat';
		}
		$payload['from'] = $xml->attrs['from'];
		$payload['body'] = $xml->sub('body')->data;
		$payload['xml'] = $xml;
		$this->log->log("Message: {$xml->sub('body')->data}", XMPPHP_Log::LEVEL_DEBUG);
		$this->event('message', $payload);
	}

	/**
	 * Presence handler
	 *
	 * @param string $xml
	 */
	public function presence_handler($xml) {
		$payload['type'] = (isset($xml->attrs['type'])) ? $xml->attrs['type'] : 'available';
		$payload['show'] = (isset($xml->sub('show')->data)) ? $xml->sub('show')->data : $payload['type'];
		$payload['from'] = $xml->attrs['from'];
		$payload['status'] = (isset($xml->sub('status')->data)) ? $xml->sub('status')->data : '';
		$payload['priority'] = (isset($xml->sub('priority')->data)) ? intval($xml->sub('priority')->data) : 0;
		$payload['xml'] = $xml;
		if($this->track_presence) {
			$this->roster->setPresence($payload['from'], $payload['priority'], $payload['show'], $payload['status']);
		}
		$this->log->log("Presence: {$payload['from']} [{$payload['show']}] {$payload['status']}",  XMPPHP_Log::LEVEL_DEBUG);
		if(array_key_exists('type', $xml->attrs) and $xml->attrs['type'] == 'subscribe') {
			if($this->auto_subscribe) {
				$this->send("<presence type='subscribed' to='{$xml->attrs['from']}' from='{$this->fulljid}' />");
				$this->send("<presence type='subscribe' to='{$xml->attrs['from']}' from='{$this->fulljid}' />");
			}
			$this->event('subscription_requested', $payload);
		} elseif(array_key_exists('type', $xml->attrs) and $xml->attrs['type'] == 'subscribed') {
			$this->event('subscription_accepted', $payload);
		} else {
			$this->event('presence', $payload);
		}
	}

	/**
	 * Features handler
	 *
	 * @param string $xml
	 */
	protected function features_handler($xml) {
		if($xml->hasSub('starttls') and $this->use_encryption) {
			$this->send("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required /></starttls>");
		} elseif($xml->hasSub('bind') and $this->authed) {
			$id = $this->getId();
			$this->addIdHandler($id, 'resource_bind_handler');
			$this->send("<iq xmlns=\"jabber:client\" type=\"set\" id=\"$id\"><bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"><resource>{$this->resource}</resource></bind></iq>");
		} else {
			$this->log->log("Attempting Auth...");
			if ($this->password) {
			$this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>" . base64_encode("\x00" . $this->user . "\x00" . $this->password) . "</auth>");
			} else {
                        $this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS'/>");
			}
		}
	}

	/**
	 * SASL success handler
	 *
	 * @param string $xml
	 */
	protected function sasl_success_handler($xml) {
		$this->log->log("Auth success!");
		$this->authed = true;
		$this->reset();
	}

	/**
	 * SASL feature handler
	 *
	 * @param string $xml
	 */
	protected function sasl_failure_handler($xml) {
		$this->log->log("Auth failed!",  XMPPHP_Log::LEVEL_ERROR);
		$this->disconnect();

		throw new XMPPHP_Exception('Auth failed!');
	}

	/**
	 * Resource bind handler
	 *
	 * @param string $xml
	 */
	protected function resource_bind_handler($xml) {
		if($xml->attrs['type'] == 'result') {
			$this->log->log("Bound to " . $xml->sub('bind')->sub('jid')->data);
			$this->fulljid = $xml->sub('bind')->sub('jid')->data;
			$jidarray = explode('/',$this->fulljid);
			$this->jid = $jidarray[0];
		}
		$id = $this->getId();
		$this->addIdHandler($id, 'session_start_handler');
		$this->send("<iq xmlns='jabber:client' type='set' id='$id'><session xmlns='urn:ietf:params:xml:ns:xmpp-session' /></iq>");
	}

	/**
	* Retrieves the roster
	*
	*/
	public function getRoster() {
		$id = $this->getID();
		$this->send("<iq xmlns='jabber:client' type='get' id='$id'><query xmlns='jabber:iq:roster' /></iq>");
	}

	/**
	* Roster iq handler
	* Gets all packets matching XPath "iq/{jabber:iq:roster}query'
	*
	* @param string $xml
	*/
	protected function roster_iq_handler($xml) {
		$status = "result";
		$xmlroster = $xml->sub('query');
		foreach($xmlroster->subs as $item) {
			$groups = array();
			if ($item->name == 'item') {
				$jid = $item->attrs['jid']; //REQUIRED
				$name = $item->attrs['name']; //MAY
				$subscription = $item->attrs['subscription'];
				foreach($item->subs as $subitem) {
					if ($subitem->name == 'group') {
						$groups[] = $subitem->data;
					}
				}
				$contacts[] = array($jid, $subscription, $name, $groups); //Store for action if no errors happen
			} else {
				$status = "error";
			}
		}
		if ($status == "result") { //No errors, add contacts
			foreach($contacts as $contact) {
				$this->roster->addContact($contact[0], $contact[1], $contact[2], $contact[3]);
			}
		}
		if ($xml->attrs['type'] == 'set') {
			$this->send("<iq type=\"reply\" id=\"{$xml->attrs['id']}\" to=\"{$xml->attrs['from']}\" />");
		}
	}

	/**
	 * Session start handler
	 *
	 * @param string $xml
	 */
	protected function session_start_handler($xml) {
		$this->log->log("Session started");
		$this->session_started = true;
		$this->event('session_start');
	}

	/**
	 * TLS proceed handler
	 *
	 * @param string $xml
	 */
	protected function tls_proceed_handler($xml) {
		$this->log->log("Starting TLS encryption");
		stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_SSLv23_CLIENT);
		$this->reset();
	}

	/**
	* Retrieves the vcard
	*
	*/
	public function getVCard($jid = Null) {
		$id = $this->getID();
		$this->addIdHandler($id, 'vcard_get_handler');
		if($jid) {
			$this->send("<iq type='get' id='$id' to='$jid'><vCard xmlns='vcard-temp' /></iq>");
		} else {
			$this->send("<iq type='get' id='$id'><vCard xmlns='vcard-temp' /></iq>");
		}
	}

	/**
	* VCard retrieval handler
	*
	* @param XML Object $xml
	*/
	protected function vcard_get_handler($xml) {
		$vcard_array = array();
		$vcard = $xml->sub('vcard');
		// go through all of the sub elements and add them to the vcard array
		foreach ($vcard->subs as $sub) {
			if ($sub->subs) {
				$vcard_array[$sub->name] = array();
				foreach ($sub->subs as $sub_child) {
					$vcard_array[$sub->name][$sub_child->name] = $sub_child->data;
				}
			} else {
				$vcard_array[$sub->name] = $sub->data;
			}
		}
		$vcard_array['from'] = $xml->attrs['from'];
		$this->event('vcard', $vcard_array);
	}
}


code:
<?php
/**
 * XMPPHP: The PHP XMPP Library
 * Copyright (C) 2008  Nathanael C. Fritz
 * This file is part of SleekXMPP.
 *
 * XMPPHP is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * XMPPHP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XMPPHP; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * @category   xmpphp
 * @package	XMPPHP
 * @author	 Nathanael C. Fritz <JID: fritzy@netflint.net>
 * @author	 Stephan Wentz <JID: stephan@jabber.wentz.it>
 * @author	 Michael Garvin <JID: gar@netflint.net>
 * @copyright  2008 Nathanael C. Fritz
 */

/** XMPPHP_XMPP
 *
 * This file is unnecessary unless you need to connect to older, non-XMPP-compliant servers like Dreamhost's.
 * In this case, use instead of XMPPHP_XMPP, otherwise feel free to delete it.
 * The old Jabber protocol wasn't standardized, so use at your own risk.
 *
 */
require_once "XMPP.php";

	class XMPPHP_XMPPOld extends XMPPHP_XMPP {
		/**
		 *
		 * @var string
		 */
		protected $session_id;

		public function __construct($host, $port, $user, $password, $resource, $server = null, $printlog = false, $loglevel = null) {
			parent::__construct($host, $port, $user, $password, $resource, $server, $printlog, $loglevel);
			if(!$server) $server = $host;
			$this->stream_start = '<stream:stream to="' . $server . '" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">';
			$this->fulljid = "{$user}@{$server}/{$resource}";
		}

		/**
		 * Override XMLStream's startXML
		 *
		 * @param parser $parser
		 * @param string $name
		 * @param array $attr
		 */
		public function startXML($parser, $name, $attr) {
			if($this->xml_depth == 0) {
				$this->session_id = $attr['ID'];
				$this->authenticate();
			}
			parent::startXML($parser, $name, $attr);
		}

		/**
		 * Send Authenticate Info Request
		 *
		 */
		public function authenticate() {
			$id = $this->getId();
			$this->addidhandler($id, 'authfieldshandler');
			$this->send("<iq type='get' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username></query></iq>");
		}

		/**
		 * Retrieve auth fields and send auth attempt
		 *
		 * @param XMLObj $xml
		 */
		public function authFieldsHandler($xml) {
			$id = $this->getId();
			$this->addidhandler($id, 'oldAuthResultHandler');
			if($xml->sub('query')->hasSub('digest')) {
				$hash = sha1($this->session_id . $this->password);
				print "{$this->session_id} {$this->password}\n";
				$out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><digest>{$hash}</digest><resource>{$this->resource}</resource></query></iq>";
			} else {
				$out = "<iq type='set' id='$id'><query xmlns='jabber:iq:auth'><username>{$this->user}</username><password>{$this->password}</password><resource>{$this->resource}</resource></query></iq>";
			}
			$this->send($out);

		}

		/**
		 * Determine authenticated or failure
		 *
		 * @param XMLObj $xml
		 */
		public function oldAuthResultHandler($xml) {
			if($xml->attrs['type'] != 'result') {
				$this->log->log("Auth failed!",  XMPPHP_Log::LEVEL_ERROR);
				$this->disconnect();
				throw new XMPPHP_Exception('Auth failed!');
			} else {
				$this->log->log("Session started");
				$this->event('session_start');
			}
		}
	}

?>


code:
<?php
/**
 * StatusNet, the distributed open-source microblogging tool
 *
 * Queue-mediated proxy class for outgoing XMPP messages.
 *
 * PHP version 5
 *
 * LICENCE: This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category  Network
 * @package   StatusNet
 * @author    Brion Vibber <brion@status.net>
 * @copyright 2010 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
 * @link      http://status.net/
 */

if (!defined('STATUSNET') && !defined('LACONICA')) {
    exit(1);
}

class QueuedXMPP extends XMPPHP_XMPP
{
    /**
     * Reference to the XmppPlugin object we're hooked up to.
     */
    public $plugin;

	/**
	 * Constructor
	 *
     * @param XmppPlugin $plugin
	 * @param string  $host
	 * @param integer $port
	 * @param string  $user
	 * @param string  $password
	 * @param string  $resource
	 * @param string  $server
	 * @param boolean $printlog
	 * @param string  $loglevel
	 */
	public function __construct($plugin, $host, $port, $user, $password, $resource, $server = null, $printlog = false, $loglevel = null)
	{
        $this->plugin = $plugin;

        parent::__construct($host, $port, $user, $password, $resource, $server, $printlog, $loglevel);

        // We use $host to connect, but $server to build JIDs if specified.
        // This seems to fix an upstream bug where $host was used to build
        // $this->basejid, never seen since it isn't actually used in the base
        // classes.
        if (!$server) {
            $server = $this->host;
        }
        $this->basejid = $this->user . '@' . $server;

        // Normally the fulljid is filled out by the server at resource binding
        // time, but we need to do it since we're not talking to a real server.
        $this->fulljid = "{$this->basejid}/{$this->resource}";
    }

    /**
     * Send a formatted message to the outgoing queue for later forwarding
     * to a real XMPP connection.
     *
     * @param string $msg
     */
    public function send($msg, $timeout=NULL)
    {
        $this->plugin->enqueueOutgoingRaw($msg);
    }

    //@{
    /**
     * Stream i/o functions disabled; only do output
     */
    public function connect($timeout = 30, $persistent = false, $sendinit = true)
    {
        // No i18n needed. Test message.
        throw new Exception('Cannot connect to server from fake XMPP.');
    }

    public function disconnect()
    {
        // No i18n needed. Test message.
        throw new Exception('Cannot connect to server from fake XMPP.');
    }

    public function process()
    {
        // No i18n needed. Test message.
        throw new Exception('Cannot read stream from fake XMPP.');
    }

    public function processUntil($event, $timeout=-1)
    {
        // No i18n needed. Test message.
        throw new Exception('Cannot read stream from fake XMPP.');
    }

    public function read()
    {
        // No i18n needed. Test message.
        throw new Exception('Cannot read stream from fake XMPP.');
    }

    public function readyToProcess()
    {
        // No i18n needed. Test message.
        throw new Exception('Cannot read stream from fake XMPP.');
    }
    //@}
}


code:
<?php
/**
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2009, StatusNet, Inc.
 *
 * Send and receive notices using the Jabber network
 *
 * PHP version 5
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @category  Jabber
 * @package   StatusNet
 * @author    Evan Prodromou <evan@status.net>
 * @copyright 2009 StatusNet, Inc.
 * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
 * @link      http://status.net/
 */

if (!defined('STATUSNET')) {
    // This check helps protect against security problems;
    // your code file can't be executed directly from the web.
    exit(1);
}

class SharingXMPP extends XMPPHP_XMPP
{
    function getSocket()
    {
        return $this->socket;
    }
}


code:
<?php
/*
 * StatusNet - the distributed open-source microblogging tool
 * Copyright (C) 2008, 2009, StatusNet, Inc.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }

/**
 * XMPP background connection manager for XMPP-using queue handlers,
 * allowing them to send outgoing messages on the right connection.
 *
 * Input is handled during socket select loop, keepalive pings during idle.
 * Any incoming messages will be handled.
 *
 * In a multi-site queuedaemon.php run, one connection will be instantiated
 * for each site being handled by the current process that has XMPP enabled.
 */
class XmppManager extends ImManager
{
    protected $lastping = null;
    protected $pingid = null;

    public $conn = null;

    const PING_INTERVAL = 120;

    /**
     * Initialize connection to server.
     * @return boolean true on success
     */
    public function start($master)
    {
        if(parent::start($master))
        {
            $this->connect();
            return true;
        }else{
            return false;
        }
    }

    function send_raw_message($data)
    {
        $this->connect();
        if (!$this->conn || $this->conn->isDisconnected()) {
            return false;
        }
        $this->conn->send($data);
        return true;
    }

    /**
     * Message pump is triggered on socket input, so we only need an idle()
     * call often enough to trigger our outgoing pings.
     */
    function timeout()
    {
        return self::PING_INTERVAL;
    }

    /**
     * Process XMPP events that have come in over the wire.
     * @fixme may kill process on XMPP error
     * @param resource $socket
     */
    public function handleInput($socket)
    {
        // Process the queue for as long as needed
        try {
            common_log(LOG_DEBUG, "Servicing the XMPP queue.");
            $this->stats('xmpp_process');
            $this->conn->processTime(0);
        } catch (XMPPHP_Exception $e) {
            common_log(LOG_ERR, "Got an XMPPHP_Exception: " . $e->getMessage());
            die($e->getMessage());
        }
    }

    /**
     * Lists the IM connection socket to allow i/o master to wake
     * when input comes in here as well as from the queue source.
     *
     * @return array of resources
     */
    public function getSockets()
    {
        $this->connect();
        if($this->conn){
            return array($this->conn->getSocket());
        }else{
            return array();
        }
    }

    /**
     * Idle processing for io manager's execution loop.
     * Send keepalive pings to server.
     *
     * Side effect: kills process on exception from XMPP library.
     *
     * @todo FIXME: non-dying error handling
     */
    public function idle($timeout=0)
    {
        $now = time();
        if (empty($this->lastping) || $now - $this->lastping > self::PING_INTERVAL) {
            try {
                $this->send_ping();
            } catch (XMPPHP_Exception $e) {
                common_log(LOG_ERR, "Got an XMPPHP_Exception: " . $e->getMessage());
                die($e->getMessage());
            }
        }
    }

    function connect()
    {
        if (!$this->conn || $this->conn->isDisconnected()) {
            $resource = 'queue' . posix_getpid();
            $this->conn = new SharingXMPP($this->plugin->host ?
                                    $this->plugin->host :
                                    $this->plugin->server,
                                    $this->plugin->port,
                                    $this->plugin->user,
                                    $this->plugin->password,
                                    $this->plugin->resource,
                                    $this->plugin->server,
                                    $this->plugin->debug ?
                                    true : false,
                                    $this->plugin->debug ?
                                    XMPPHP_Log::LEVEL_VERBOSE :  null
                                    );

            if (!$this->conn) {
                return false;
            }
            $this->conn->addEventHandler('message', 'handle_xmpp_message', $this);
            $this->conn->addEventHandler('reconnect', 'handle_xmpp_reconnect', $this);
            $this->conn->setReconnectTimeout(600);

            $this->conn->autoSubscribe();
            $this->conn->useEncryption($this->plugin->encryption);

            try {
                $this->conn->connect(true); // true = persistent connection
            } catch (XMPPHP_Exception $e) {
                common_log(LOG_ERR, $e->getMessage());
                return false;
            }

            $this->conn->processUntil('session_start');
            // TRANS: Presence announcement for XMPP.
            $this->send_presence(_m('Send me a message to post a notice'), 'available', null, 'available', 100);
        }
        return $this->conn;
    }

    function send_ping()
    {
        $this->connect();
        if (!$this->conn || $this->conn->isDisconnected()) {
            return false;
        }
        $now = time();
        if (!isset($this->pingid)) {
            $this->pingid = 0;
        } else {
            $this->pingid++;
        }

        common_log(LOG_DEBUG, "Sending ping #{$this->pingid}");
		$this->conn->send("<iq from='{" . $this->plugin->daemonScreenname() . "}' to='{$this->plugin->server}' id='ping_{$this->pingid}' type='get'><ping xmlns='urn:xmpp:ping'/></iq>");
        $this->lastping = $now;
        return true;
    }

    function handle_xmpp_message(&$pl)
    {
        $this->plugin->enqueueIncomingRaw($pl);
        return true;
    }

    /**
     * Callback for Jabber reconnect event
     * @param $pl
     */
    function handle_xmpp_reconnect(&$pl)
    {
        common_log(LOG_NOTICE, 'XMPP reconnected');

        $this->conn->processUntil('session_start');
        // TRANS: Message for XMPP reconnect.
        $this->send_presence(_m('Send me a message to post a notice'), 'available', null, 'available', 100);
    }

    /**
     * sends a presence stanza on the XMPP network
     *
     * @param string $status   current status, free-form string
     * @param string $show     structured status value
     * @param string $to       recipient of presence, null for general
     * @param string $type     type of status message, related to $show
     * @param int    $priority priority of the presence
     *
     * @return boolean success value
     */

    function send_presence($status, $show='available', $to=null,
                                  $type = 'available', $priority=null)
    {
        $this->connect();
        if (!$this->conn || $this->conn->isDisconnected()) {
            return false;
        }
        $this->conn->presence($status, $show, $to, $type, $priority);
        return true;
    }

    /**
     * sends a "special" presence stanza on the XMPP network
     *
     * @param string $type   Type of presence
     * @param string $to     JID to send presence to
     * @param string $show   show value for presence
     * @param string $status status value for presence
     *
     * @return boolean success flag
     *
     * @see send_presence()
     */

    function special_presence($type, $to=null, $show=null, $status=null)
    {
        // @todo FIXME: why use this instead of send_presence()?
        $this->connect();
        if (!$this->conn || $this->conn->isDisconnected()) {
            return false;
        }

        $to     = htmlspecialchars($to);
        $status = htmlspecialchars($status);

        $out = "<presence";
        if ($to) {
            $out .= " to='$to'";
        }
        if ($type) {
            $out .= " type='$type'";
        }
        if ($show == 'available' and !$status) {
            $out .= "/>";
        } else {
            $out .= ">";
            if ($show && ($show != 'available')) {
                $out .= "<show>$show</show>";
            }
            if ($status) {
                $out .= "<status>$status</status>";
            }
            $out .= "</presence>";
        }
        $this->conn->send($out);
        return true;
    }
}


code:
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
#: xmppmanager.php:167 xmppmanager.php:207
msgid "Send me a message to post a notice"
msgstr ""

#. TRANS: Plugin display name.
#: XmppPlugin.php:62
msgid "XMPP/Jabber/GTalk"
msgstr ""

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
#: XmppPlugin.php:123
msgid "Invalid JID: too many @s."
msgstr ""

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
#: XmppPlugin.php:132
msgid "Invalid JID: @ but no node"
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
#: XmppPlugin.php:140
msgid "Invalid JID: node too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#: XmppPlugin.php:145
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
#: XmppPlugin.php:151
msgid "Invalid JID: domain too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#: XmppPlugin.php:156
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#: XmppPlugin.php:167
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr ""

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#: XmppPlugin.php:368
#, php-format
msgid "[%s]"
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
#: XmppPlugin.php:406
msgid "You must specify a server in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
#: XmppPlugin.php:410
msgid "You must specify a port in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
#: XmppPlugin.php:414
msgid "You must specify a user in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
#: XmppPlugin.php:418
msgid "You must specify a password in the configuration."
msgstr ""

#. TRANS: Plugin description.
#: XmppPlugin.php:444
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""


code:
# Translation of StatusNet - Xmpp to Catalan (Català)
# Exported from translatewiki.net
#
# Author: Toniher
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-18 15:54+0000\n"
"PO-Revision-Date: 2011-06-18 15:58:03+0000\n"
"Language-Team: Catalan <http://translatewiki.net/wiki/Portal:ca>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:52:15+0000\n"
"X-Generator: MediaWiki 1.19alpha (r90318); Translate extension (2011-06-02)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ca\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Envia'm un missatge per a publicar un avís"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr ""

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr ""

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"El connector XMPP permet als usuaris enviar i rebre avisos des de la xarxa "
"XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to German (Deutsch)
# Exported from translatewiki.net
#
# Author: Giftpflanze
# Author: Habi
# Author: Inkowik
# Author: PtM
# Author: Tiin
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:31+0000\n"
"Language-Team: German <https://translatewiki.net/wiki/Portal:de>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: de\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Sende mir eine Nachricht, um eine Nachricht zu erstellen"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "Ungültige JID: zu viele @s."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "Ungültige JID: @ aber kein Knoten"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "Ungültige JID: Knoten zu lang."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Ungültiger JID-Knoten \"%s\"."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "Ungültige JID: Domain zu lang."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Ungültiger JID-Domainname „%s“."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Ungültige JID-Quelle „%s“."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Du musst einen Server in der Konfiguration angeben."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Du musst einen Port in der Konfiguration angeben."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Du musst einen Benutzernamen in der Konfiguration angeben."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Du musst ein Passwort in der Konfiguration angeben."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Das XMPP-Plugin ermöglicht es Benutzern, Nachrichten über das XMPP/Jabber-"
"Netzwerk zu senden und zu empfangen."


code:
# Translation of StatusNet - Xmpp to Spanish (español)
# Exported from translatewiki.net
#
# Author: Armando-Martin
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Envíeme un mensaje para publicar una nota"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "JID no válido: demasiados signos @s."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "JID no válido: Signo @ sin nodo"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "JID no válido: nodo demasiado largo."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Nodo JID \"%s\" no válido."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "JID no válido: dominio demasiado largo."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Nombre de dominio JID \"%s\" no válido."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Recurso JID \"%s\" no válido."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Debe especificar un servidor en la configuración."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Debe especificar un puerto en la configuración."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Debe especificar un usuario en la configuración."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Debe especificar una contraseña en la configuración."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"El complemento (plugin) XMPP permite a los usuarios enviar y recibir "
"mensajes mediante la red XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to French (français)
# Exported from translatewiki.net
#
# Author: Gomoko
# Author: Od1n
# Author: Peter17
# Author: Tititou36
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Language-Team: French <http://translatewiki.net/wiki/Portal:fr>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: fr\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "M’envoyer un message pour afficher un avis."

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "JID non valide: trop de @s."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "JID non valide: @ mais sans nœud."

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "JID non valide: nœud trop long."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Nœud JID \"%s\" non valide."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "JID non valide: domaine trop long."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Nom de domaine JID \"%s\" non valide."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Ressource JID \"%s\" non valide."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Vous devez spécifier un serveur dans la configuration."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Vous devez spécifier un port dans la configuration."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Vous devez spécifier un utilisateur dans la configuration."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Vous devez spécifier un mot de passe dans la configuration."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Le plugin XMPP permet aux utilisateurs d’envoyer et de recevoir des messages "
"depuis le réseau XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to Galician (galego)
# Exported from translatewiki.net
#
# Author: Toliño
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Language-Team: Galician <https://translatewiki.net/wiki/Portal:gl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: gl\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Envíame unha mensaxe para publicar unha nota"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "JID inválido: Demasiados signos @."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "JID inválido: Signo @ sen nodo"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "JID inválido: O nodo é longo de máis."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Nodo JID, \"%s\", inválido."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "JID inválido: O dominio é longo de máis."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Nome de dominio JID, \"%s\", inválido."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Recurso JID, \"%s\", inválido."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Cómpre especificar un servidor na configuración."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Cómpre especificar un porto na configuración."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Cómpre especificar un usuario na configuración."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Cómpre especificar un contrasinal na configuración."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"O complemento XMPP permite aos usuarios enviar e recibir mensaxes desde a "
"rede de XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to Interlingua (interlingua)
# Exported from translatewiki.net
#
# Author: McDutchie
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Language-Team: Interlingua <https://translatewiki.net/wiki/Portal:ia>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: ia\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Inviar me un message pro publicar un nota"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "JID invalide: troppo de signos @."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "JID invalide: signo @ sin nodo"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "JID invalide: nodo troppo longe."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Nodo JID \"%s\" invalide."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "JID invalide: dominio troppo longe."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Nomine de dominio JID \"%s\" invalide."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Ressource JID \"%s\" invalide."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Es necessari specificar un servitor in le configuration."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Es necessari specificar un porto in le configuration."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Es necessari specificar un usator in le configuration."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Es necessari specificar un contrasigno in le configuration."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Le plug-in XMPP permitte que usatores invia e recipe notas per le rete XMPP/"
"Jabber."


code:
# Translation of StatusNet - Xmpp to Macedonian (македонски)
# Exported from translatewiki.net
#
# Author: Bjankuloski06
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Language-Team: Macedonian <https://translatewiki.net/wiki/Portal:mk>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: mk\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n == 1 || n%10 == 1) ? 0 : 1;\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Испрати ми порака за да објавам забелешка"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "Неважечки JID: премногу мајмунчиња (@)."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "Неважежки JID: @, но нема јазол"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "Неважечки JID: јазолот е предолг."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Неважечки јазол од JID „%s“."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "Неважечки JID: доменот е предолг."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Неважечко доменско име од JID „%s“."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Неважечки ресурс од JID „%s“."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Мора да наведете опслужувач во поставувањето."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Мора да наведете порта во поставувањето."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Мора да назначите корисник во поставувањето."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Мора да назначите лозинка во поставувањето."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Приклучокот за XMPP им овозможува на корисниците да испраќаат и примаат "
"забелешки преку мрежата на XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to Malay (Bahasa Melayu)
# Exported from translatewiki.net
#
# Author: Anakmalaysia
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-18 15:54+0000\n"
"PO-Revision-Date: 2011-06-18 15:58:03+0000\n"
"Language-Team: Malay <http://translatewiki.net/wiki/Portal:ms>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:52:15+0000\n"
"X-Generator: MediaWiki 1.19alpha (r90318); Translate extension (2011-06-02)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: ms\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Hantarkan pesanan kepada saya untuk mengirim notis"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr ""

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr ""

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Pemalam XMPP membolehkan pengguna menghantar dan menerima notis menerusi "
"rangkaian XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to Dutch (Nederlands)
# Exported from translatewiki.net
#
# Author: Siebrand
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Language-Team: Dutch <https://translatewiki.net/wiki/Portal:nl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: nl\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Mij een bericht sturen om een mededeling te verzenden"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/Google Talk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "Ongeldige JID: te veel @'s."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "Ongeldige JID: @ maar geen node"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "Ongeldige JID: de node is te lang."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Ongeldige JID node \"%s\"."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "Ongeldige JID: het domein is te lang."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Ongeldige JID-domeinnaam \"%s\"."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Ongeldige JID-bron \"%s\"."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "U moet in de instellingen een server opgeven."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "U moet in de instellingen een poort opgeven."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "U moet in de instellingen een gebruiker opgeven."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "U moet in de instellingen een wachtwoord opgeven."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Maakt het mogelijk om mededelingen te zenden naar en ontvangen van het XMPP/"
"Jabber-netwerk."


code:
# Translation of StatusNet - Xmpp to Polish (polski)
# Exported from translatewiki.net
#
# Author: BeginaFelicysym
# Author: Woytecr
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"Plural-Forms: nplurals=3; plural=(n == 1) ? 0 : ( (n%10 >= 2 && n%10 <= 4 && "
"(n%100 < 10 || n%100 >= 20)) ? 1 : 2 );\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Wyślij do mnie wiadomość dodania ogłoszenia"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "Nieprawidłowy JID: zbyt wiele znaków @."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "Nieprawidłowy JID: jest @ ale brak węzła"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "Nieprawidłowy JID: za długi węzeł."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Nieprawidłowy węzeł \"%s\" w JID."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "Nieprawidłowy JID: za długa domena."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Nieprawidłowa nazwa domeny \"%s\" w JID."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Nieprawidłowy zasób \"%s\" w JID."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Musisz określić serwer w konfiguracji."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Należy określić port w konfiguracji."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Należy określić użytkownika w konfiguracji."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Musisz określić hasło w konfiguracji."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Wtyczka XMPP umożliwia użytkownikom wysyłanie i otrzymywanie powiadomień w "
"sieci XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to Portuguese (Português)
# Exported from translatewiki.net
#
# Author: SandroHc
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-18 15:54+0000\n"
"PO-Revision-Date: 2011-06-18 15:58:03+0000\n"
"Language-Team: Portuguese <http://translatewiki.net/wiki/Portal:pt>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:52:15+0000\n"
"X-Generator: MediaWiki 1.19alpha (r90318); Translate extension (2011-06-02)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: pt\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Envia-me uma mensagem para postar uma notícia"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr ""

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr ""

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"O plugin XMPP permite aos utilizadores enviar e receber avisos sobre a rede "
"XMPP/Jabber."


code:
# Translation of StatusNet - Xmpp to Swedish (Svenska)
# Exported from translatewiki.net
#
# Author: WikiPhoenix
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-06-18 15:54+0000\n"
"PO-Revision-Date: 2011-06-18 15:58:03+0000\n"
"Language-Team: Swedish <http://translatewiki.net/wiki/Portal:sv>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-05 21:52:15+0000\n"
"X-Generator: MediaWiki 1.19alpha (r90318); Translate extension (2011-06-02)\n"
"X-Translation-Project: translatewiki.net at http://translatewiki.net\n"
"X-Language-Code: sv\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr ""

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr ""

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr ""

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr ""

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr ""

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr ""

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"XMPP-tillägget tillåter användare skicka och ta emot meddelanden över XMPP/"
"Jabber-nätverket."


code:
# Translation of StatusNet - Xmpp to Tagalog (Tagalog)
# Exported from translatewiki.net
#
# Author: AnakngAraw
# --
# This file is distributed under the same license as the StatusNet package.
#
msgid ""
msgstr ""
"Project-Id-Version: StatusNet - Xmpp\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-30 11:07+0000\n"
"PO-Revision-Date: 2012-06-30 11:10:32+0000\n"
"Language-Team: Tagalog <http://translatewiki.net/wiki/Portal:tl>\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-POT-Import-Date: 2011-06-19 11:23:56+0000\n"
"X-Generator: MediaWiki 1.20alpha (233fc08); Translate 2012-06-21\n"
"X-Translation-Project: translatewiki.net <https://translatewiki.net>\n"
"X-Language-Code: tl\n"
"X-Message-Group: #out-statusnet-plugin-xmpp\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. TRANS: Presence announcement for XMPP.
#. TRANS: Message for XMPP reconnect.
msgid "Send me a message to post a notice"
msgstr "Padalhan ako ng isang mensahe upang makapagpaskil ng isang pabatid"

#. TRANS: Plugin display name.
msgid "XMPP/Jabber/GTalk"
msgstr "XMPP/Jabber/GTalk"

#. TRANS: Exception thrown when using too many @ signs in a Jabber ID.
msgid "Invalid JID: too many @s."
msgstr "Hindi katanggap-tanggap na JID: napakaraming mga @s."

#. TRANS: Exception thrown when using @ sign not followed by a Jabber ID.
msgid "Invalid JID: @ but no node"
msgstr "Hindi katanggap-tanggap na JID: @ ngunit walang buko"

#. TRANS: Exception thrown when using too long a Jabber ID (>1023).
msgid "Invalid JID: node too long."
msgstr "Hindi katanggap-tanggap na JID: napakahaba ng buko."

#. TRANS: Exception thrown when using an invalid Jabber ID.
#. TRANS: %s is the invalid Jabber ID.
#, php-format
msgid "Invalid JID node \"%s\"."
msgstr "Hindi katanggap-tanggap na buko ng JID na \"%s\"."

#. TRANS: Exception thrown when using too long a Jabber domain (>1023).
msgid "Invalid JID: domain too long."
msgstr "Hindi katanggap-tanggap na JID: napakahaba ng sakop."

#. TRANS: Exception thrown when using an invalid Jabber domain name.
#. TRANS: %s is the invalid domain name.
#, php-format
msgid "Invalid JID domain name \"%s\"."
msgstr "Hindi katanggap-tanggap na pangalan ng saklaw na \"%s\"."

#. TRANS: Exception thrown when using an invalid Jabber resource.
#. TRANS: %s is the invalid resource.
#, php-format
msgid "Invalid JID resource \"%s\"."
msgstr "Hindi katanggap-tanggap na pinagkunan ng JID na \"%s\"."

#. TRANS: Link description to notice in conversation.
#. TRANS: %s is a notice ID.
#, php-format
msgid "[%s]"
msgstr "[%s]"

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a server in the configuration."
msgstr "Dapat kang tumukoy ng isang tagapaghain sa loob ng pagkakaayos."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a port in the configuration."
msgstr "Dapat kang tumukoy ng isang daungan sa loob ng kaayusan."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a user in the configuration."
msgstr "Dapat kang tumukoy ng isang tagagamit sa loob ng pagkakaayos."

#. TRANS: Exception thrown when the plugin configuration is incorrect.
msgid "You must specify a password in the configuration."
msgstr "Dapat kang tumukoy ng isang hudyat sa loob ng kaayusan."

#. TRANS: Plugin description.
msgid ""
"The XMPP plugin allows users to send and receive notices over the XMPP/"
"Jabber network."
msgstr ""
"Nagpapahintulot ang pampasak ng XMPP sa mga tagagamit upang makapagpadala at "
"makatanggap ng mga pabatid sa ibabaw ng kalambatan ng XMPP/Jabber."