streams/mod/wall_attach.php

24 lines
439 B
PHP
Raw Normal View History

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
killme();
2011-05-25 05:40:52 +00:00
$r = attach_store($channel,get_observer_hash());
if(! $r['success']) {
notice( $r['message'] . EOL);
killme();
2011-05-25 05:40:52 +00:00
}
echo "\n\n" . '[attachment]' . $r['data']['hash'] . ',' . $r['data']['revision'] . '[/attachment]' . "\n";
2011-05-25 05:40:52 +00:00
killme();
2011-05-25 05:40:52 +00:00
}