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.

Using commands: Difference between revisions

From ZNC
Jump to navigation Jump to search
Created page with "{{Languages}} === Commands === Commands are given to ZNC by messaging the virtual user *status. Likewise, modules are communicated to by messaging *modname as well. Alt..."
 
KindOne (talk | contribs)
→‎Command List: Update the commands list.
Line 20: Line 20:


=== Command List ===
=== Command List ===
 
<!-- Using output from <*status> ZNC 1.3-git-126-90bc025 - http://znc.in -->
  <zncuser> help
  <zncuser> help
  <*status> +------------------------+-------------------------+---------------------------------------------+
<*status> In the following list all occurrences of <#chan> support wildcards (* and ?)
  <*status> | Command                | Arguments               | Description                                 |
<*status> (Except ListNicks)
  <*status> +------------------------+-------------------------+---------------------------------------------+
  <*status> +------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  <*status> | Version                |                         | Prints which version of znc this is         |
  <*status> | Command                | Arguments                             | Description                                                                     |
  <*status> | ListDCCs               |                         | List all active DCCs                        |
  <*status> +------------------------+---------------------------------------+----------------------------------------------------------------------------------+
  <*status> | ListMods              |                         | List all loaded modules                     |
  <*status> | Version                |                                       | Print which version of ZNC this is                                               |
  <*status> | ListAvailMods          |                         | List all available modules                  |
  <*status> | ListMods               |                                       | List all loaded modules                                                          |
  <*status> | ListChans              |                         | List all channels                          |
  <*status> | ListAvailMods          |                                       | List all available modules                                                       |
  <*status> | ListNicks              | <#chan>                 | List all nicks on a channel                |
  <*status> | ListNicks              | <#chan>                              | List all nicks on a channel                                                      |
  <*status> | ListServers           |                         | List all servers                            |
  <*status> | ListServers            |                                       | List all servers of current IRC network                                          |
  <*status> | AddServer              | <host> [[+]port] [pass] | Add a server to the list                   |
<*status> | AddNetwork            | <name>                                | Add a network to your user                                                      |
  <*status> | RemServer             | <host>                  | Remove a server from the list               |
  <*status> | DelNetwork            | <name>                                | Delete a network from your user                                                  |
  <*status> | Enablechan            | <#chan>                 | Enable the channel                         |
<*status> | ListNetworks          |                                      | List all networks                                                                |
  <*status> | Detach                | <#chan>                 | Detach from the channel                     |
<*status> | MoveNetwork            | old-user old-net new-user [new-net]  | Move an IRC network from one user to another                                    |
  <*status> | Topics                |                         | Show topics in all channels                 |
  <*status> | JumpNetwork           | <network>                            | Jump to another network                                                          |
  <*status> | PlayBuffer            | <#chan>                 | Play back the buffer for a given channel   |
  <*status> | AddServer              | <host> [[+]port] [pass]               | Add a server to the list of alternate/backup servers of current IRC network.    |
  <*status> | ClearBuffer            | <#chan>                 | Clear the buffer for a given channel       |
  <*status> | DelServer             | <host> [port] [pass]                 | Remove a server from the list of alternate/backup servers of current IRC network |
  <*status> | ClearAllChannelBuffers |                         | Clear the channel buffers                   |
  <*status> | Enablechan            | <#chan>                               | Enable the channel                                                               |
  <*status> | SetBuffer              | <#chan> [linecount]     | Set the buffer count for a channel          |
<*status> | Disablechan            | <#chan>                              | Disable the channel                                                              |
  <*status> | SetVHost              | <vhost (ip preferred)>  | Set the VHost for this connection           |
  <*status> | Detach                | <#chan>                               | Detach from the channel                                                         |
  <*status> | ClearVHost            |                         | Clear the VHost for this connection        |
  <*status> | Topics                |                                       | Show topics in all your channels                                                 |
  <*status> | Jump                   |                         | Jump to the next server in the list        |
  <*status> | PlayBuffer            | <#chan>                               | Play back the buffer for a given channel                                         |
  <*status> | Disconnect            |                         | Disconnect from IRC                         |
  <*status> | ClearBuffer            | <#chan>                               | Clear the buffer for a given channel                                             |
  <*status> | Connect                |                         | Reconnect to IRC                           |
  <*status> | ClearAllChannelBuffers |                                       | Clear the channel buffers                                                       |
  <*status> | Send                  | <nick> <file>          | Send a shell file to a nick on IRC          |
  <*status> | SetBuffer              | <#chan> [linecount]                   | Set the buffer count for a channel                                               |
  <*status> | Get                    | <file>                 | Send a shell file to yourself              |
<*status> | AddBindHost            | <host (IP preferred)>                | Adds a bind host for normal users to use                                        |
  <*status> | LoadMod                | <module>               | Load a module                               |
<*status> | DelBindHost            | <host>                                | Removes a bind host from the list                                                |
  <*status> | UnloadMod             | <module>               | Unload a module                             |
<*status> | ListBindHosts         |                                      | Shows the configured list of bind hosts                                          |
  <*status> | ReloadMod             | <module>               | Reload a module                             |
  <*status> | SetBindHost            | <host (IP preferred)>                 | Set the bind host for this connection                                            |
  <*status> | ShowMOTD              |                         | Show the message of the day                 |
  <*status> | SetUserBindHost        | <host (IP preferred)>                | Set the default bind host for this user                                          |
  <*status> | SetMOTD                | <Message>               | Set the message of the day                 |
<*status> | ClearBindHost          |                                      | Clear the bind host for this connection                                         |
  <*status> | AddMOTD                | <Message>               | Append <Message> to MOTD                   |
  <*status> | ClearUserBindHost      |                                       | Clear the default bind host for this user                                        |
  <*status> | ClearMOTD              |                         | Clear the MOTD                             |
<*status> | ShowBindHost          |                                      | Show currently selected bind host                                                |
  <*status> | Rehash                |                         | Reload znc.conf from disk                   |
  <*status> | Jump [server]          |                                       | Jump to the next or the specified server                                         |
  <*status> | SaveConfig            |                         | Save the current settings to disk           |
  <*status> | Disconnect            | [message]                            | Disconnect from IRC                                                             |
  <*status> | ListUsers              |                         | List all users/clients connected to znc    |
  <*status> | Connect                |                                       | Reconnect to IRC                                                                 |
  <*status> | ListClients            | [User]                 | List all clients connected to your znc user |
  <*status> | Uptime                |                                       | Show for how long ZNC has been running                                          |
  <*status> | Traffic                |                         | Show basic traffic stats for all znc users  |
  <*status> | LoadMod                | [--type=global|user|network] <module> | Load a module                                                                    |
  <*status> | Uptime                |                         | Show how long ZNC is already running        |
  <*status> | UnloadMod              | [--type=global|user|network] <module> | Unload a module                                                                 |
  <*status> | Broadcast              | [message]               | Broadcast a message to all users           |
  <*status> | ReloadMod             | [--type=global|user|network] <module> | Reload a module                                                                 |
  <*status> | Shutdown              | [message]               | Shutdown znc completely                     |
  <*status> | UpdateMod             | <module>                             | Reload a module everywhere                                                      |
  <*status> | Restart                | [message]               | Restarts znc                                |
  <*status> | ShowMOTD              |                                       | Show ZNC's message of the day                                                   |
  <*status> +------------------------+-------------------------+---------------------------------------------+
  <*status> | SetMOTD                | <Message>                             | Set ZNC's message of the day                                                     |
  <*status> | AddMOTD                | <Message>                             | Append <Message> to ZNC's MOTD                                                   |
  <*status> | ClearMOTD              |                                       | Clear ZNC's MOTD                                                                 |
<*status> | ListPorts              |                                      | Show all active listeners                                                        |
<*status> | AddPort                | <arguments>                          | Add another port for ZNC to listen on                                            |
<*status> | DelPort                | <arguments>                          | Remove a port from ZNC                                                          |
  <*status> | Rehash                |                                       | Reload znc.conf from disk                                                       |
  <*status> | SaveConfig            |                                       | Save the current settings to disk                                               |
  <*status> | ListUsers              |                                       | List all ZNC users and their connection status                                  |
<*status> | ListAllUserNetworks    |                                      | List all ZNC users and their networks                                            |
  <*status> | ListChans              | [User <network>]                     | List all channels                                                                |
  <*status> | ListClients            | [User]                                | List all connected clients                                                      |
  <*status> | Traffic                |                                       | Show basic traffic stats for all ZNC users                                      |
  <*status> | Broadcast              | [message]                             | Broadcast a message to all ZNC users                                             |
  <*status> | Shutdown              | [message]                             | Shut down ZNC completely                                                         |
  <*status> | Restart                | [message]                             | Restart ZNC                                                                      |
  <*status> +------------------------+---------------------------------------+----------------------------------------------------------------------------------+

Revision as of 21:15, 22 April 2014

Commands

Commands are given to ZNC by messaging the virtual user *status. Likewise, modules are communicated to by messaging *modname as well.

Alternatively you can use /znc command instead of /msg *status command and /znc *module command instead of /msg *module command

Example: /msg *status listmods

<prozac> listmods
<*status> +---------+------------------------------------------------------+
<*status> | Name    | Description                                          |
<*status> +---------+------------------------------------------------------+
<*status> | email   | Monitors Email activity on local disk /var/mail/user |
<*status> | shell   | Gives shell access.                                  |
<*status> | schat   | Secure cross platform (:P) chat system               |
<*status> +---------+------------------------------------------------------+

The prefix for these virtual users can be changed from * in the znc.conf file. It is wise to use a character that is illegal to use on IRC so that you don't lose the ability to talk to a real person who happens to be using the same prefix on their IRC nick.

Command List

<zncuser> help
<*status> In the following list all occurrences of <#chan> support wildcards (* and ?)
<*status> (Except ListNicks)
<*status> +------------------------+---------------------------------------+----------------------------------------------------------------------------------+
<*status> | Command                | Arguments                             | Description                                                                      |
<*status> +------------------------+---------------------------------------+----------------------------------------------------------------------------------+
<*status> | Version                |                                       | Print which version of ZNC this is                                               |
<*status> | ListMods               |                                       | List all loaded modules                                                          |
<*status> | ListAvailMods          |                                       | List all available modules                                                       |
<*status> | ListNicks              | <#chan>                               | List all nicks on a channel                                                      |
<*status> | ListServers            |                                       | List all servers of current IRC network                                          |
<*status> | AddNetwork             | <name>                                | Add a network to your user                                                       |
<*status> | DelNetwork             | <name>                                | Delete a network from your user                                                  |
<*status> | ListNetworks           |                                       | List all networks                                                                |
<*status> | MoveNetwork            | old-user old-net new-user [new-net]   | Move an IRC network from one user to another                                     |
<*status> | JumpNetwork            | <network>                             | Jump to another network                                                          |
<*status> | AddServer              | <host> [[+]port] [pass]               | Add a server to the list of alternate/backup servers of current IRC network.     |
<*status> | DelServer              | <host> [port] [pass]                  | Remove a server from the list of alternate/backup servers of current IRC network |
<*status> | Enablechan             | <#chan>                               | Enable the channel                                                               |
<*status> | Disablechan            | <#chan>                               | Disable the channel                                                              |
<*status> | Detach                 | <#chan>                               | Detach from the channel                                                          |
<*status> | Topics                 |                                       | Show topics in all your channels                                                 |
<*status> | PlayBuffer             | <#chan>                               | Play back the buffer for a given channel                                         |
<*status> | ClearBuffer            | <#chan>                               | Clear the buffer for a given channel                                             |
<*status> | ClearAllChannelBuffers |                                       | Clear the channel buffers                                                        |
<*status> | SetBuffer              | <#chan> [linecount]                   | Set the buffer count for a channel                                               |
<*status> | AddBindHost            | <host (IP preferred)>                 | Adds a bind host for normal users to use                                         |
<*status> | DelBindHost            | <host>                                | Removes a bind host from the list                                                |
<*status> | ListBindHosts          |                                       | Shows the configured list of bind hosts                                          |
<*status> | SetBindHost            | <host (IP preferred)>                 | Set the bind host for this connection                                            |
<*status> | SetUserBindHost        | <host (IP preferred)>                 | Set the default bind host for this user                                          |
<*status> | ClearBindHost          |                                       | Clear the bind host for this connection                                          |
<*status> | ClearUserBindHost      |                                       | Clear the default bind host for this user                                        |
<*status> | ShowBindHost           |                                       | Show currently selected bind host                                                |
<*status> | Jump [server]          |                                       | Jump to the next or the specified server                                         |
<*status> | Disconnect             | [message]                             | Disconnect from IRC                                                              |
<*status> | Connect                |                                       | Reconnect to IRC                                                                 |
<*status> | Uptime                 |                                       | Show for how long ZNC has been running                                           |
<*status> | LoadMod                | [--type=global|user|network] <module> | Load a module                                                                    |
<*status> | UnloadMod              | [--type=global|user|network] <module> | Unload a module                                                                  |
<*status> | ReloadMod              | [--type=global|user|network] <module> | Reload a module                                                                  |
<*status> | UpdateMod              | <module>                              | Reload a module everywhere                                                       |
<*status> | ShowMOTD               |                                       | Show ZNC's message of the day                                                    |
<*status> | SetMOTD                | <Message>                             | Set ZNC's message of the day                                                     |
<*status> | AddMOTD                | <Message>                             | Append <Message> to ZNC's MOTD                                                   |
<*status> | ClearMOTD              |                                       | Clear ZNC's MOTD                                                                 |
<*status> | ListPorts              |                                       | Show all active listeners                                                        |
<*status> | AddPort                | <arguments>                           | Add another port for ZNC to listen on                                            |
<*status> | DelPort                | <arguments>                           | Remove a port from ZNC                                                           |
<*status> | Rehash                 |                                       | Reload znc.conf from disk                                                        |
<*status> | SaveConfig             |                                       | Save the current settings to disk                                                |
<*status> | ListUsers              |                                       | List all ZNC users and their connection status                                   |
<*status> | ListAllUserNetworks    |                                       | List all ZNC users and their networks                                            |
<*status> | ListChans              | [User <network>]                      | List all channels                                                                |
<*status> | ListClients            | [User]                                | List all connected clients                                                       |
<*status> | Traffic                |                                       | Show basic traffic stats for all ZNC users                                       |
<*status> | Broadcast              | [message]                             | Broadcast a message to all ZNC users                                             |
<*status> | Shutdown               | [message]                             | Shut down ZNC completely                                                         |
<*status> | Restart                | [message]                             | Restart ZNC                                                                      |
<*status> +------------------------+---------------------------------------+----------------------------------------------------------------------------------+