[Client-side Mod] Ignore players in chat [ignore]

Post Reply
User avatar
TalkLounge
Member
Posts: 324
Joined: Sun Mar 26, 2017 12:42
GitHub: TalkLounge
In-game: TalkLounge
Location: Germany

[Client-side Mod] Ignore players in chat [ignore]

by TalkLounge » Post

Hi,
this CSM by dopik, adds a command to ignore players in the chat, so you receive no chat messages from them, only pms.

Usage
Image

License
Code: LGPL v2.1+

Dependencies
None

Download
Download
Browse on Github
Spoiler
Image
Spoiler
  • 1.0 The mod was created
  • 2.0 Fixed bug
  • 3.0 Works now with 0.5
  • 4.0 Also ignore PMs with .block
Last edited by TalkLounge on Sun Oct 08, 2017 18:13, edited 6 times in total.
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de

u19318

Re: [Client-side Mod] Ignore players in chat [ignore]

by u19318 » Post

How cool!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Client-side Mod] Ignore players in chat [ignore]

by azekill_DIABLO » Post

Very useful! it's a must have!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Client-side Mod] Ignore players in chat [ignore]

by Lone_Wolf » Post

All this does is send a PM. I still see their chat...
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

D0PIK
Member
Posts: 21
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

Re: [Client-side Mod] Ignore players in chat [ignore]

by D0PIK » Post

Well,
I just checked the Code again and it's the same one I use. It works for me, so I guess that you did something wrong.
Mayby you have misswritten the playername or misused the chatcommand.

The usage would be (Example for my name) :

.ignore dopik --This should start ignoring me
.unignore dopik --This should stop ignoring me

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Client-side Mod] Ignore players in chat [ignore]

by Lone_Wolf » Post

D0PIK wrote:Well,
I just checked the Code again and it's the same one I use. It works for me, so I guess that you did something wrong.
Mayby you have misswritten the playername or misused the chatcommand.

The usage would be (Example for my name) :

.ignore dopik --This should start ignoring me
.unignore dopik --This should stop ignoring me
I'll try again. I was doing the cmds right.
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Client-side Mod] Ignore players in chat [ignore]

by Lone_Wolf » Post

Image
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
TalkLounge
Member
Posts: 324
Joined: Sun Mar 26, 2017 12:42
GitHub: TalkLounge
In-game: TalkLounge
Location: Germany

Re: [Client-side Mod] Ignore players in chat [ignore]

by TalkLounge » Post

Updatet, should work now.
Last edited by TalkLounge on Tue Oct 03, 2017 10:42, edited 1 time in total.
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de

D0PIK
Member
Posts: 21
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

Re: [Client-side Mod] Ignore players in chat [ignore]

by D0PIK » Post

Was another mistake.
Should be fixed now.

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Client-side Mod] Ignore players in chat [ignore]

by Krock » Post

I get the following error in a recent 0.5.0-dev version:

Code: Select all

2017-10-03 12:57:52: ERROR[Main]: ModError: Failed to load and run mod "ignore":
2017-10-03 12:57:52: ERROR[Main]: ignore:init.lua:15: attempt to call field 'register_on_receiving_chat_messages' (a nil value)
2017-10-03 12:57:52: ERROR[Main]: stack traceback:
2017-10-03 12:57:52: ERROR[Main]: 	ignore:init.lua:15: in main chunk
2017-10-03 12:57:52: ERROR[Main]: Siehe debug.txt für Details.
Loaded texture: /data/Minetest/run/textures/base/pack/menu_header.png
Renaming it to register_on_receiving_chat_message fixed it.

Not kidding. That's effective an error. In order to follow the other callback naming, this function was renamed to "register_on_receiving_chat_message" in https://github.com/minetest/minetest/commit/44495ea . To properly fix this issue, you should use this code:

Code: Select all

if not minetest.register_on_receiving_chat_message then
    minetest.register_on_receiving_chat_message = minetest.register_on_receiving_chat_messages
end
and use the new, corrected function name.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

D0PIK
Member
Posts: 21
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

Re: [Client-side Mod] Ignore players in chat [ignore]

by D0PIK » Post

Change made.
Please report if it still doesn't work, as I dont't have a 0.5 Version of the game

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Client-side Mod] Ignore players in chat [ignore]

by Desour » Post

You can try optional depending on this mod: https://github.com/DS-Minetest/s_compatibility
And tell the users to install it if it crashes, then you can use whatever of both you want (even both at once).
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

D0PIK
Member
Posts: 21
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

Re: [Client-side Mod] Ignore players in chat [ignore]

by D0PIK » Post

Updated to Version 4.0:

.inform Command added: Toggles between sending the informational message when ignoring somebody

.block and .unblock added
blocking is the permanent solution, as this doesn't reset when leaving a server
when .block without a Parameter is written, the blocklist gets displayed

.priority 1|2|3 chatcommand added, to toggle between 3 modes of displaying the blocklist:
1 : only shown on join
2 : shown when unblocking and on join
3 : shown when blocking, unblocking and on join

Default Settings is informing the Player when ignoring and only showing the blocklist on join

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [Client-side Mod] Ignore players in chat [ignore]

by BBmine » Post

Um, I tried doing .block on an annoying player on HOMETOWN (who BTW is a mod), but I can still see their chat.

User avatar
Lone_Wolf
Member
Posts: 2576
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Client-side Mod] Ignore players in chat [ignore]

by Lone_Wolf » Post

BBmine wrote:Um, I tried doing .block on an annoying player on HOMETOWN (who BTW is a mod), but I can still see their chat.
viewtopic.php?f=53&t=17216&p=299506#p299506
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Client-side Mod] Ignore players in chat [ignore]

by ChimneySwift » Post

BBmine wrote:Um, I tried doing .block on an annoying player on HOMETOWN (who BTW is a mod), but I can still see their chat.
FYI, blocking a moderator isn't allowed on HT.

Not to say I agree with how she handled the situation on the forums or in game, but I wouldn't block a moderator.
A spoon is basically a tiny bowl with a stick on it

D0PIK
Member
Posts: 21
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

Re: [Client-side Mod] Ignore players in chat [ignore]

by D0PIK » Post

Well, you shouldn't really block a moderator...

However, still some ideas what could cause this:
  • Most obvious first: you missspelled the name or used the command icorrectly(I don't think that you did that, but still a possibility
  • This is, what happened most likely: If the server manipulates the chat in any way, the CSM doesn't find the blocked player's name in the msg. The CSM does only find the player's name in the "standard" ways of chatting: Normal usage of chat, /msg and /whisper. I purposly decided to do it in this way, as players do not want every message containing a blocked player's name to not be shown. If you want, you can add a new case into the code: For that, you'd have to find the structure of the sent chatmessage(s) and extract the sender's name throug string manipulations.)
And before you ask: No, I will not program this for you or any other player. It is simply too much work to get every case possible.

I hope that this helped you

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [Client-side Mod] Ignore players in chat [ignore]

by BBmine » Post

D0PIK wrote:Well, you shouldn't really block a moderator...

However, still some ideas what could cause this:
  • Most obvious first: you missspelled the name or used the command icorrectly(I don't think that you did that, but still a possibility
  • This is, what happened most likely: If the server manipulates the chat in any way, the CSM doesn't find the blocked player's name in the msg. The CSM does only find the player's name in the "standard" ways of chatting: Normal usage of chat, /msg and /whisper. I purposly decided to do it in this way, as players do not want every message containing a blocked player's name to not be shown. If you want, you can add a new case into the code: For that, you'd have to find the structure of the sent chatmessage(s) and extract the sender's name throug string manipulations.)
And before you ask: No, I will not program this for you or any other player. It is simply too much work to get every case possible.

I hope that this helped you
Actually, I think ExeterDad made it impossible to block moderators on HT.
The player I'm trying to block is no longer a moderator, so it should work now.

D0PIK
Member
Posts: 21
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

Re: [Client-side Mod] Ignore players in chat [ignore]

by D0PIK » Post

No, not really. I think that this may only be possible with minetest 0.5 or higher, as servers in 0.4.16 or lower can't limit CSM in any way.

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [Client-side Mod] Ignore players in chat [ignore]

by ChimneySwift » Post

BBmine wrote: Actually, I think ExeterDad made it impossible to block moderators on HT.
This should only be if/when he implements a server-side mod.
A spoon is basically a tiny bowl with a stick on it

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests