diff options
author | tv <tv@xso> | 2011-09-06 23:54:24 +0200 |
---|---|---|
committer | tv <tv@xso> | 2011-09-06 23:54:24 +0200 |
commit | a1f17ef6fe871551ca6cd9fe5e4c04bb2a9d8a54 (patch) | |
tree | 93a5af3c4f789d00a6b9c7b83abbadf0b09f3da5 /cholerab | |
parent | 23cca02b550a80e91a76ddf7a3f2195859473c71 (diff) |
//cholerab/{IRC-RPC -> Reaktor/}
Diffstat (limited to 'cholerab')
-rw-r--r-- | cholerab/Reaktor/IRC-RPC | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cholerab/Reaktor/IRC-RPC b/cholerab/Reaktor/IRC-RPC new file mode 100644 index 00000000..a5350534 --- /dev/null +++ b/cholerab/Reaktor/IRC-RPC @@ -0,0 +1,32 @@ +# Krebs IRC RPC + + on :<from> PRIVMSG <target> :<handle>: <command> <argument> + + if <handle> ∈ { nickname, "ALL" } + if <command> is a public command + + path = $__public_command_directory/<command> + argv = [] + envp = { from: <from>, argument: <argument> } + + <code> = execve(path, argv, envp) → <stdout>, <stderr> + + if <code> = 0 + if <target> is channel + PRIVMSG <target> :<from>: <stdout> + PRIVMSG <from> :<stderr> + else + ; TODO assert <target> = <from> + PRIVMSG <from> :<stdout> + PRIVMSG <from> :Error: <stderr> + else + + send all <.*> to the Ministerium + + if <target> is channel + PRIVMSG <target> :<from>: <command> is broken ATM + else + PRIVMSG <target> :Error: <command> is broken ATM + + else + PRIVMSG <target> :<from>: you are made of stupid |