X-Git-Url: https://git.cweiske.de/paste/242.git/blobdiff_plain/a80378eebdbbf5367498fd67085625507e9b4268:/phork0.txt..41d58a68d95f5117f48886400e8d09d3f815ceb7:/static/gitweb.js diff --git a/phork0.txt b/phork0.txt deleted file mode 100644 index 61f6088..0000000 --- a/phork0.txt +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env escript -%%! -sname sender@localhost -%% -%% Written by Holger Weiss . -%% - -% -% If the node name of your server is not 'ejabberd@localhost' (see the -% "ejabberdctl status" output), you must change the @localhost part of -% the node names above and below. -% -% Apart from that, you must set Room and Host to the desired values -% below. -% - -main(Args) -> - Room = <<"test">>, - Host = <<"conference.example.com">>, - Node = 'ejabberd@localhost', - Usage = "send-muc-message ...", - - Message = - case string:join(Args, " ") of - [] -> - io:format(standard_error, "Usage: ~s~n", [Usage]), - halt(2); - Joined -> - list_to_binary(Joined) - end, - - case rpc:call(Node, mnesia, dirty_read, [muc_online_room, {Room, Host}]) of - [R] -> - Pid = element(3, R), - gen_fsm:send_all_state_event(Pid, {service_message, Message}); - [] -> - io:format(standard_error, "Room ~s@~s unavailable~n", [Room, Host]), - halt(1) - end. - -% vim:set filetype=erlang tabstop=4 expandtab: