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

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

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

by TalkLounge » Sun Sep 24, 2017 17:54

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

+ Screenshots


+ Changelog
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
 

Zurul_HD
Member
 
Posts: 45
Joined: Mon Apr 25, 2016 12:26
Location: Somewhere dark and rainy ...
GitHub: Zurul
IRC: Zurul
In-game: Zurul

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

by Zurul_HD » Sun Sep 24, 2017 17:55

How cool!
Servers i play on: Yggdrasil, Projekt Hirnfrei, IhrFussel's Server.
 

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

User avatar
Lone_Wolf
Member
 
Posts: 1898
Joined: Sun Apr 09, 2017 05:50
Location: You wouldn't believe me
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody
 

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

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

by D0PIK » Sun Oct 01, 2017 07:14

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: 1898
Joined: Sun Apr 09, 2017 05:50
Location: You wouldn't believe me
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody

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

by Lone_Wolf » Sun Oct 01, 2017 07:32

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.
 

User avatar
Lone_Wolf
Member
 
Posts: 1898
Joined: Sun Apr 09, 2017 05:50
Location: You wouldn't believe me
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody
 

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

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

by TalkLounge » Tue Oct 03, 2017 09:21

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: 17
Joined: Sun Oct 01, 2017 07:03
In-game: dopik
 

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

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

by Krock » Tue Oct 03, 2017 11:02

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.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

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

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

by D0PIK » Tue Oct 03, 2017 11:37

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

User avatar
DS-minetest
Member
 
Posts: 983
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

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

by DS-minetest » Tue Oct 03, 2017 13:05

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).
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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

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

by D0PIK » Mon Oct 09, 2017 10:52

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
 

User avatar
BBmine
Member
 
Posts: 3416
Joined: Sun Jul 12, 2015 22:51
Location: USA
IRC: BBmine
In-game: Baggins

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

by BBmine » Wed Nov 08, 2017 21:43

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: 1898
Joined: Sun Apr 09, 2017 05:50
Location: You wouldn't believe me
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf or Somebody

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

by Lone_Wolf » Wed Nov 08, 2017 22:51

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
 

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

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

by ChimneySwift » Thu Nov 09, 2017 04:08

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: 17
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

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

by D0PIK » Thu Nov 09, 2017 20:02

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
 

User avatar
BBmine
Member
 
Posts: 3416
Joined: Sun Jul 12, 2015 22:51
Location: USA
IRC: BBmine
In-game: Baggins

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

by BBmine » Fri Nov 10, 2017 14:34

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: 17
Joined: Sun Oct 01, 2017 07:03
In-game: dopik

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

by D0PIK » Fri Nov 10, 2017 17:29

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: 314
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

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

by ChimneySwift » Sat Nov 11, 2017 06:05

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
 


Return to Client-side modding



Who is online

Users browsing this forum: No registered users and 1 guest