-
Notifications
You must be signed in to change notification settings - Fork 0
Linking Model
Propeng edited this page Feb 15, 2011
·
3 revisions
TransShell works by linking a process's output and input to a channel or nick). When linked, stdout/err will be redirected through IRC to that channel and PRIVMSGs to that channel/nick starting with Config.chan_prefix will be treated as stdin.
To link a process, the link command is used. link takes 3 arguments:
- The channel name or nickname to link to.
- The program to be linked.
- (Optional) Arguments to that program.
Example: shell> ;link #channel bash --debug or shell> ;link TransShellUser yum install gedit.
To reverse the effect of link, unlink is used. It takes one argument:
- The channel or nickname that was linked to.
Example: shell> ;unlink #channel
- The admin types
;link #channel /dev/shin the shell prompt. - TransShell runs
shand redirects stdout to#channel. -
shprompts~$, so TransShell sends[sh] ~$to#channel. - A user in the channel responds to the prompt, and sends
;cd /. - TransShell sends
cd /tosh's stdin. -
shresponds by switching the directory to the root directory, and now prompts/$. - TransShell sends
[sh] /$to#channel. - Finally, the admin unlinks
shby typing;unlink #channelin the shell prompt.