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.

Logsearch

From ZNC
Jump to navigation Jump to search


A log search module for ZNC ≥ 1.60.

Getting the Code[edit]

The code for this module can be found here. Example method of fetching the code:

$ mkdir ~/.znc/modules ; cd ~/.znc/modules/
$ git clone https://github.com/pR0Ps/znc-logsearch.git

Installation[edit]

Refer to the README or use the following example:

$ cd znc-logsearch
$ cp logsearch.py ~/.znc/modules/

Requirements[edit]

Taken from the README:

1. The ZNC server must be running ZNC v1.6.0 or later.
2. The ZNC server must have the log module enabled using the default configuration.
3. The ZNC server must have grep on the PATH of the user ZNC is running under.
4. The ZNC server must have modpython loaded.

Usage[edit]

Arguments

This user module takes no arguments.

Read loading modules to learn more about loading modules.

In your IRC client type /msg *status loadmodule logsearch

Commands[edit]

Commands can be found on the README

Example Output[edit]

+====================+========================================+
| Command            | Description                            |
+====================+========================================+
| ?/help             | Shows the help text                    |
+--------------------+----------------------------------------+
| * <query>          | Search all logs for <query>            |
+--------------------+----------------------------------------+
| #<channel> <query> | Search logs in <channel> for <query>   |
+--------------------+----------------------------------------+
| @<user> <query>    | Search logs to/from <user> for <query> |
+====================+========================================+

Example Usage[edit]

+==================+===========================================================+
| Command          | Result                                                    |
+==================+===========================================================+
| #hi hi           | Messages in the #hi channel saying "hi"                   |
+------------------+-----------------------------------------------------------+
| @NickServ .*     | Any private messages to/from NickServ                     |
+------------------+-----------------------------------------------------------+
| @* hello         | Any private messages saying "hello"                       |
+------------------+-----------------------------------------------------------+
| #* znc           | Mentions of ZNC in any channel                            |
+------------------+-----------------------------------------------------------+
| #znc* testing    | Messages in channels starting with "znc" saying "testing" |
+------------------+-----------------------------------------------------------+
| * znc            | Mentions of ZNC in any logs (channel or private message)  |
+------------------+-----------------------------------------------------------+
| * ] \* .* dances | Dancing users in any logs                                 |
+------------------+-----------------------------------------------------------+
| * .*             | Any messages in any logs                                  |
+==================+===========================================================+