To create new wiki account, please join us on #znc at Libera.Chat and ask admins to create a wiki account for you. You can say thanks to spambots for this inconvenience.

Shell: Difference between revisions

From ZNC
Jump to navigation Jump to search
>Un1matr1x
mNo edit summary
>Silverleo
DCC stuff was moved to dcc
 
Line 2: Line 2:
{{Core Module | version = 1.0}}
{{Core Module | version = 1.0}}
This module will allow you to type commands into a query as if it were a terminal. The one obvious drawback to a real terminal is that you can not use interactive programs like vi, pine or su.
This module will allow you to type commands into a query as if it were a terminal. The one obvious drawback to a real terminal is that you can not use interactive programs like vi, pine or su.
Additionally, this module can also combine the shell with DCC transfers. This allows you to send a file to yourself or someone else over DCC or you can send a file to the module so that it sends to the current working directory.


== Usage ==
== Usage ==
Line 30: Line 28:
  <*shell> -rw-r--r--  1 prozac users    6 Oct  8 14:30 znc.pid
  <*shell> -rw-r--r--  1 prozac users    6 Oct  8 14:30 znc.pid
  <*shell> znc$
  <*shell> znc$
DCC can even send you a file from shell by using the get command:
<prozac> get tmp.xpi
<*shell> DCC -> [prozac][tmp.xpi] - Attempting Send.
<*shell> DCC -> [prozac][tmp.xpi] - Transfer Started.
<*shell> DCC -> [prozac][tmp.xpi] - Completed! - Sent [/tmp/tmp.xpi] at [125 K/s]
Alternatively you can use the send command to make the DCC send a file to a specified user:
<prozac> send fool z.cpp
<*shell> DCC -> [fool][z.cpp] - Attempting Send.
<*shell> DCC -> [fool][z.cpp] - Transfer Started.
<*shell> DCC -> [fool][z.cpp] - Completed! - Sent [/home/prozac/z.cpp] at [13 K/s]
If you send a file with DCC to the <code>*shell</code> user it will be saved in your currently working directory.


[[Category:Modules]]
[[Category:Modules]]

Latest revision as of 08:31, 25 March 2013

This module will allow you to type commands into a query as if it were a terminal. The one obvious drawback to a real terminal is that you can not use interactive programs like vi, pine or su.

Usage

Arguments

This user module takes no arguments.

Read loading modules to learn more about loading modules.

Commands

To execute commands you have to open a query with the *shell user. When executing commands the result should be like this:

<prozac> pwd
<*shell> /home/prozac
<*shell> znc$
<prozac> cd .znc
<*shell> znc$
<prozac> pwd
<*shell> /home/prozac/.znc
<*shell> znc$
<prozac> ls -al
<*shell> total 36
<*shell> drwx------   6 prozac users 4096 Oct  9 16:17 .
<*shell> drwxr-xr-x  51 prozac users 4096 Oct  9 16:17 ..
<*shell> drwx------   3 prozac users 4096 Oct  9 16:17 configs
<*shell> drwx------  12 prozac users 4096 Sep 24 17:16 moddata
<*shell> drwx------   2 prozac users 4096 Oct  8 14:27 modules
<*shell> drwx------  10 prozac users 4096 Oct  8 10:04 users
<*shell> -rw-r--r--   1 prozac users 1644 Oct  8 23:57 znc.pem
<*shell> -rw-r--r--   1 prozac users    6 Oct  8 14:30 znc.pid
<*shell> znc$