2011-05-25 05:40:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once('include/attach.php');
|
2014-02-21 01:07:43 +00:00
|
|
|
require_once('include/identity.php');
|
2011-05-25 05:40:52 +00:00
|
|
|
|
|
|
|
function wall_attach_post(&$a) {
|
|
|
|
|
2014-02-21 01:07:43 +00:00
|
|
|
if(argc() > 1)
|
|
|
|
$channel = get_channel_by_nick(argv(1));
|
2011-05-25 05:40:52 +00:00
|
|
|
else
|
2013-01-23 03:36:14 +00:00
|
|
|
killme();
|
2011-05-25 05:40:52 +00:00
|
|
|
|
2013-02-01 00:13:44 +00:00
|
|
|
$r = attach_store($channel,get_observer_hash());
|
2013-02-01 07:56:46 +00:00
|
|
|
|
2013-02-01 00:13:44 +00:00
|
|
|
if(! $r['success']) {
|
|
|
|
notice( $r['message'] . EOL);
|
2013-01-23 03:36:14 +00:00
|
|
|
killme();
|
2011-05-25 05:40:52 +00:00
|
|
|
}
|
|
|
|
|
2013-02-01 00:13:44 +00:00
|
|
|
echo "\n\n" . '[attachment]' . $r['data']['hash'] . ',' . $r['data']['revision'] . '[/attachment]' . "\n";
|
2011-05-25 05:40:52 +00:00
|
|
|
killme();
|
2013-02-01 00:13:44 +00:00
|
|
|
|
2011-05-25 05:40:52 +00:00
|
|
|
}
|