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

Difference between revisions of "Shell"

From ZNC
Jump to: navigation, search
(Created page with "{{DISPLAYTITLE:shell}} {{Extra Module}} 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 ...")
 
m
Line 1: Line 1:
 
{{DISPLAYTITLE:shell}}
 
{{DISPLAYTITLE:shell}}
{{Extra Module}}
+
{{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.
  

Revision as of 16:38, 7 November 2012

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

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$

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 *shell user it will be saved in your currently working directory.