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.

Backlog: Difference between revisions

From ZNC
Jump to navigation Jump to search
>FruitieX
Created page with "{{DISPLAYTITLE:backlog}} {{External Module}} '''znc-backlog''' is a ZNC module that makes it easy to request backlog. Its intended use is for when you have just launched your ..."
 
KindOne (talk | contribs)
Restore Backlog from archive.org - 2016/09/20
Line 7: Line 7:
You can get this module's source code [http://github.com/fruitiex/znc-backlog/ here]. Read the [https://github.com/FruitieX/znc-backlog/blob/master/README.md README] for information on compiling and installing.
You can get this module's source code [http://github.com/fruitiex/znc-backlog/ here]. Read the [https://github.com/FruitieX/znc-backlog/blob/master/README.md README] for information on compiling and installing.


At the moment you must specify a log path manually:
At the moment you must specify a log path manually: See [[log]] for information on where ZNC's log module stores logs.
 
'''For ZNC versions after 1.6, you would use something like'''
 
/msg *backlog LogPath  /path/to/your/logs/$USER/$NETWORK/$WINDOW/*.log
 
'''For ZNC versions prior to 1.6, you would use something like'''


  /msg *backlog LogPath /path/to/your/logs/$USER_$NETWORK_$WINDOW_*.log
  /msg *backlog LogPath /path/to/your/logs/$USER_$NETWORK_$WINDOW_*.log


$USER will be replaced with your ZNC username, $NETWORK with the current network and $WINDOW with the requested channel/window name. The last found asterisk character '*' in the string is assumed to be a date, and the order in which the files are read is determined by a simple alphabetical sort. (ie. date format order must be year-month-date)
<code>$USER</code> will be replaced with your ZNC username, <code>$NETWORK</code> with the current network and <code>$WINDOW</code> with the requested channel/window name. The last found asterisk character '<code>*</code>' in the string is assumed to be a date, and the order in which the files are read is determined by a simple alphabetical sort (i.e. date format order must be year-month-day, which is true of output from the [[log]] module).


Optionally, you may specify this path as an argument to the module.
Optionally, you may specify this path as an argument to the module, either in the [[webadmin]] textbox, or in the ZNC config file.


== Usage ==
== Usage ==
Line 22: Line 28:
e.g.
e.g.
  /msg *backlog #znc 42
  /msg *backlog #znc 42
[num-lines] is optional and defaults to 150.
 
<code>[num-lines]</code> is optional and defaults to 150.


=== Commands ===
=== Commands ===


  Help (print this text)
  Help
  LogPath <path> (use keywords $USER, $NETWORK, $WINDOW and an asterisk * for date)
 
  PrintStatusMsgs true/false (print join/part/rename messages)
Prints this text
 
  LogPath <path>
 
Sets path to log files. Use keywords <code>$USER</code>, <code>$NETWORK</code>, <code>$WINDOW</code> and an asterisk <code>*</code> to stand-in for a year-month-day date.
 
  PrintStatusMsgs <true | false>
 
Show join/part/rename/etc. messages, in addition to lines of chat.
 
== Tips ==
 
=== ZNC Alias Module ===
You can make requesting backlogs slightly easier in any client with ZNC's alias module.
 
First, make sure the alias module is loaded:
 
/msg *status LoadMod alias
Create an alias for using backlog:
 
/msg *alias create BL
/msg *alias add BL PRIVMSG *backlog :%1% %?2% 50
This creates and then adds to an alias named "'''BL'''" that you can use to playback logs. <code>%1%</code> will be replaced by the channel/window name you type when using the alias. <code>%?2%</code> will optionally be the number of lines to play back. If no number of lines is supplied, then the last number is used instead—in this example <code>50</code>. You can set this number to anything you want.
 
Now try it out. To play back the default number of lines you set (50 in our example) in the channel #znc:
 
/bl #znc
To play back exactly 32 lines in the channel #znc:
 
/bl #znc 32
 
 


=== Tips ===
=== WeeChat ===


In weechat, you can create an alias to make requesting logs for the current window easier:
In [http://weechat.org weechat], you can create an alias to make requesting logs for the current window easier:
  /alias bl msg *backlog $channel $1
  /alias bl msg *backlog $channel $1
Now you can:
Now you can:

Revision as of 18:50, 2 April 2017

znc-backlog is a ZNC module that makes it easy to request backlog. Its intended use is for when you have just launched your IRC client and gotten a few lines of backlog sent to you, but want to read more. Instead of having to deal with shelling into the box where you run ZNC and manually sifting through the logs, you can issue a short command in your IRC client to request any amount of the most recent lines of log.

Setup

You can get this module's source code here. Read the README for information on compiling and installing.

At the moment you must specify a log path manually: See log for information on where ZNC's log module stores logs.

For ZNC versions after 1.6, you would use something like

/msg *backlog LogPath  /path/to/your/logs/$USER/$NETWORK/$WINDOW/*.log

For ZNC versions prior to 1.6, you would use something like

/msg *backlog LogPath /path/to/your/logs/$USER_$NETWORK_$WINDOW_*.log

$USER will be replaced with your ZNC username, $NETWORK with the current network and $WINDOW with the requested channel/window name. The last found asterisk character '*' in the string is assumed to be a date, and the order in which the files are read is determined by a simple alphabetical sort (i.e. date format order must be year-month-day, which is true of output from the log module).

Optionally, you may specify this path as an argument to the module, either in the webadmin textbox, or in the ZNC config file.

Usage

After the module is loaded and LogPath is set, you can request for logs with:

/msg *backlog <window-name> [num-lines]

e.g.

/msg *backlog #znc 42

[num-lines] is optional and defaults to 150.

Commands

Help

Prints this text

LogPath <path>

Sets path to log files. Use keywords $USER, $NETWORK, $WINDOW and an asterisk * to stand-in for a year-month-day date.

PrintStatusMsgs <true | false>

Show join/part/rename/etc. messages, in addition to lines of chat.

Tips

ZNC Alias Module

You can make requesting backlogs slightly easier in any client with ZNC's alias module.

First, make sure the alias module is loaded:

/msg *status LoadMod alias

Create an alias for using backlog:

/msg *alias create BL
/msg *alias add BL PRIVMSG *backlog :%1% %?2% 50

This creates and then adds to an alias named "BL" that you can use to playback logs. %1% will be replaced by the channel/window name you type when using the alias. %?2% will optionally be the number of lines to play back. If no number of lines is supplied, then the last number is used instead—in this example 50. You can set this number to anything you want.

Now try it out. To play back the default number of lines you set (50 in our example) in the channel #znc:

/bl #znc

To play back exactly 32 lines in the channel #znc:

/bl #znc 32


WeeChat

In weechat, you can create an alias to make requesting logs for the current window easier:

/alias bl msg *backlog $channel $1

Now you can:

/bl 42

or just:

/bl