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

User avatar
Mg
Member
 
Posts: 86
Joined: Sun Mar 02, 2014 20:49
Location: Periodic Table
GitHub: LeMagnesium
IRC: ElectronLibre Mg
In-game: Mg

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

by Mg » Wed Feb 03, 2016 17:01

Hello,
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.

Screenshot:
+ Spoiler


Tutorial:
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

Links:
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.
Last edited by Mg on Fri May 06, 2016 09:07, edited 1 time in total.
"[...] Manganese and Mercury, Molybdenum, Magnesium [...]"
Mods I shared : metatools, ignore, PvPButton with U_inv support
You can look for more in my GitHub repositories
Tox ID : D878DF75D369C10DC0D3A1A782636EA242AE64FD687EDBADCB679AFACA78910BCEAAECF825E0
Currently developper for MinetestForFun server .
 

User avatar
prof-turbo
Member
 
Posts: 518
Joined: Mon May 07, 2012 17:02
Location: MinetestForFun or Teeworlds master server list

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

by prof-turbo » Wed Feb 03, 2016 17:07

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 !
 

User avatar
rubenwardy
Moderator
 
Posts: 5541
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Wed Feb 03, 2016 19:33

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?
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

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

by Minetestforfun » Thu Feb 04, 2016 14:28

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 :))
 

User avatar
Mg
Member
 
Posts: 86
Joined: Sun Mar 02, 2014 20:49
Location: Periodic Table
GitHub: LeMagnesium
IRC: ElectronLibre Mg
In-game: Mg

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

by Mg » Fri Feb 05, 2016 21:12

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.
"[...] Manganese and Mercury, Molybdenum, Magnesium [...]"
Mods I shared : metatools, ignore, PvPButton with U_inv support
You can look for more in my GitHub repositories
Tox ID : D878DF75D369C10DC0D3A1A782636EA242AE64FD687EDBADCB679AFACA78910BCEAAECF825E0
Currently developper for MinetestForFun server .
 

User avatar
Mg
Member
 
Posts: 86
Joined: Sun Mar 02, 2014 20:49
Location: Periodic Table
GitHub: LeMagnesium
IRC: ElectronLibre Mg
In-game: Mg

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

by Mg » Fri May 06, 2016 09:05

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.
"[...] Manganese and Mercury, Molybdenum, Magnesium [...]"
Mods I shared : metatools, ignore, PvPButton with U_inv support
You can look for more in my GitHub repositories
Tox ID : D878DF75D369C10DC0D3A1A782636EA242AE64FD687EDBADCB679AFACA78910BCEAAECF825E0
Currently developper for MinetestForFun server .
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 1 guest