| 1 |
<?php |
<?php |
| 2 |
// $Id: sockets.php,v 1.1 2008/09/25 06:45:42 t0talmeltd0wn Exp $ |
// $Id: sockets.php,v 1.2 2008/09/25 08:23:38 t0talmeltd0wn Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Start our sockets and set up the SSL context from our Drupal config vars. |
* Start our sockets and set up the SSL context from our Drupal config vars. |
| 75 |
|
|
| 76 |
function xmpp_server_send_to($key, $type, $node, $bare = false) { |
function xmpp_server_send_to($key, $type, $node, $bare = false) { |
| 77 |
$clients = xmpp_server_id_map($key, $type); |
$clients = xmpp_server_id_map($key, $type); |
|
|
|
|
if (!$clients) { |
|
|
return; |
|
|
} |
|
|
|
|
|
if (!is_array($clients)) { |
|
|
$clients = array($clients); |
|
|
} |
|
|
|
|
| 78 |
foreach ($clients as $client) { |
foreach ($clients as $client) { |
| 79 |
$c = xmpp_server_get_client($client); |
$c = xmpp_server_get_client($client); |
| 80 |
$s = xmpp_server_get_session($c); |
$s = xmpp_server_get_session($c); |