Page 1 of 1

[mod] Ignore list manager [ignore][git]

Posted: Wed Feb 03, 2016 17:01
by Mg
This is a mod to manage ignore lists without having to care about other mods handling chat messages.

Technical Name: ignore

Purpose: This mod was originally created for MinetestForFun's Skyblock Server as a replacement for chatplus, which allowed players to manage ignore lists. Needing an independent ignore mod (for blocking callbacks and code optimization reasons), I assigned myself the task of coding one, and here it is. This ignore mod also blocks actions using /me from ignored players.
Note: I have not tested, but I can tell that if both ignore and chatplus are enabled they will not use the same lists, in case that was not clear.

Version: 00.01.19

Compatibility: Works with minetest 0.4.13 ; should work with any minetest version above 0.4.7.

+ Spoiler
The /ignore chatcommand is the interface for anyone to manage their own ignore list. Here is the set of subcommands available:
  • - help: shows you the help
    - add <name>: adds someone to your ignore list or tells you why it was not possible. (add can be replaced by a '+')
    - del <name>: removes someone from your ignore list or tells you why it was not possible. (del can be replaced by a '-')
    - show: shows you your entire ignore list : name of people you ignore, along with the date when you ignored them
    - init: resets your ignore list back to empty. There is no return after this (normally)
    - check <name>: tells (or at least tries to tell) you whether or not a player is ignoring you
Ignore lists are stored in <worldpath>/ignore/<playername>. This can be changed along with some configuration values, in ignore's init.lua file:
  • - ignore.config.save_dir: directory in which ignore lists are saved
    - ignore.queue_interval: interval between two queue works (in seconds). Currently used for saving files
    - ignore.config.enaled: disabling this will simply disable the ignore callback, thus the entire mod becomes useless
Download: [zip] [tar.gz]
Browse code: View on GitHub...
Report issues: Bug Tracker

Remember to rename the folder containing init.lua "ignore", instead of "ignore-master" or any other name.

Thanks to: Enjoy.

Re: [mod] Ignore list manager [ignore][git]

Posted: Wed Feb 03, 2016 17:07
by prof-turbo
Thanks !
This might be very useful on servers with many people, I hope to see it in PvP servers soon, it would permit to avoid flooders/spammers :)

My four thumbs up !

Re: [mod] Ignore list manager [ignore][git]

Posted: Wed Feb 03, 2016 19:33
by rubenwardy
Very nice. This pretty much makes chatplus obsolete as I've already taken the mail functionality out. I'll look at this code at some point and evaluate it, and if I like it I'll drop chatplus and move it to old mods.

I'm personally not very proud of chatplus, it's better recently but it's a bit of a buggy mess.

Does this support irc correctly?

Re: [mod] Ignore list manager [ignore][git]

Posted: Thu Feb 04, 2016 14:28
by Minetestforfun
Yes, it works great with IRC, we used on all of our servers since 2 weeks without bugs/crashs

Thank you again for your work on this mod @Mg :)

(EDIT : prefer the new website URL instead of the actually you posted, it's a redirection and it's slow :))

Re: [mod] Ignore list manager [ignore][git]

Posted: Fri Feb 05, 2016 21:12
by Mg
Does this support irc correctly?
Yes it does. Actually, I created ignore with the goal of not blocking any callback. The mod's callback function computes its position in the callbacks table and execute all functions registered to be called afterwards. This is how it is able to allow players to ignore each and another while not blocking anything that shouldn't be blocked.

Re: [mod] Ignore list manager [ignore][git]

Posted: Fri May 06, 2016 09:05
by Mg
The newest version (00.01.19) also overrides the "me" chat command's function to hide actions from players ignored to those who ignore them.