diff options
Diffstat (limited to 'mod')
-rw-r--r-- | mod/magic.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/magic.php b/mod/magic.php index 408619b7e..72fbe6dba 100644 --- a/mod/magic.php +++ b/mod/magic.php @@ -22,6 +22,17 @@ function magic_init(&$a) { intval(HUBLOC_FLAGS_PRIMARY) ); } + else { + // See if we know anybody at the dest site that will unlock the door for us + $b = explode('/',$dest); + if(count($b) >= 2) + $u = $b[0] . '//' . $b[2]; + $x = q("select xchan.xchan_url, hubloc.* from xchan left join hubloc on xchan_hash = hubloc_hash + where hubloc_url = '%s' limit 1", + dbesc($u) + ); + } + if(! $x) { |