cnaude / PurpleIRC-spigot

Bukkit plugin for IRC integration.
26 stars 15 forks source link

File Trailer #10

Closed ghost closed 4 years ago

ghost commented 8 years ago

How does this feature work, and how can I add this to a channel?

If i put 'latest.log' for the log file will it find spigots log file, or do i need to specify directory structure ie /home/minecraft/logs/latest.log ??

cnaude commented 8 years ago

Try something like this in your bot yml file:

file-tailer:
  enabled: true
  file: /home/minecraft/logs/latest.log
  recipient: '#minecraft'
  ctcp: false
ghost commented 8 years ago

will a /irc reloadbotconfigs enable this? or will i need to restart in order for it to hook to the log file?

cnaude commented 8 years ago

Yes the reloadbotconfigs will enable it.

ghost commented 8 years ago

I tried to use reloadbotconfigs but it did not catch the file. I restarted my server and it is now outputting to the #deltalog channel. However, you might wish to add a delay based on time stamp so that it does not try to send to the channel before the bot has joined causing "cannot send to channel errors" and possible spam

See: http://hastebin.com/ewaqivuyed.avrasm

ghost commented 8 years ago

Also is there formatting in the config.yml for this? It would be nice to add a '[LOGFILE]' prefix to the output

color coding from the log file is also not parsed but thats really not a big deal, however some players in the chan might get a ping.

it perhaps could also be possible to pars out the IRC listerner pool or even setup a LEVEL of report, ie, ERROR, INFO] as a config option to only show those level log file messages.

Is it possible to track more than one log file?

cnaude commented 8 years ago

Latest dev build won't send messages to the channel unless already joined. It also includes a new option in for multiple files. In addition a new template called log-tailer is available for use.

Example of multiple files:

file-tailer:
  enabled: true
  file: /games/spigottest/test1.log
  extra_files:
  - /games/spigottest/test2.log
  - /games/spigottest/test3.log
  recipient: '#giraffe'
  ctcp: true
ghost commented 8 years ago

AWESOME! working so far, however the formatting is not accepting color coding Would it be possible to not show anything from purpleirc as all staff get pinged in that channel anytime they talk in game or in irc.

screen shot 2015-11-29 at 10 34 48 pm

cnaude commented 8 years ago

My next step is to add filtering. I'll add regular expression inclusive and exclusive filters which should help.

On Sun, Nov 29, 2015 at 8:35 PM, austindkelly notifications@github.com wrote:

AWESOME! working so far, however the formatting is not accepting color coding Would it be possible to not show anything from purpleirc as all staff get pinged in that channel anytime they talk in game or in irc.

[image: screen shot 2015-11-29 at 10 34 48 pm] https://cloud.githubusercontent.com/assets/1545250/11462950/715cda4a-96e9-11e5-96d8-9a35d62b9897.png

— Reply to this email directly or view it on GitHub https://github.com/cnaude/PurpleIRC-spigot/issues/10#issuecomment-160508012 .

Chris Naude

ghost commented 8 years ago

Something else I noticed, is that if the bot (ie DELTA) is sent in any sentence, like "DELTA is so coo" or response from a command it puts a space, which looks weird and is not needed since the bot cant ping itself in the first place, perhaps this could be hardcoded out, so that the bot name is excluded from the spacing

cnaude commented 4 years ago

Closing very old tickets. Let me know if this is still an issue.