[Mod] Chat plus [2.3] [chatplus] – Now two mods, bug fixes

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

[Mod] Chat plus [2.3] [chatplus] – Now two mods, bug fixes

by rubenwardy » Sat Jun 15, 2013 13:47

This mod allows the player to ignore other players on chat. It also provides a mail swear filtering and limiting by distance.

Recommended: email

Commands

  • /ignore <name> - ignore a player
  • /unignore <name> - unignore a player

To limit by distance, set the chatplus_distance setting in minetest.conf to something higher than 0 (number is meters/nodes)

To disable logging, set chatplus_log to false in minetest.conf.

To block messages with bad words, set chatplus_badwords in minetest.conf to a comma separated list of words.

Download

License: LGPL 2.1 or later.
Dependencies: None

Download latest version
... or view it on GitHub

Warning! This mod may not be compatible with any other mods that intercept chat messages!
Unexpected behaviour may occur. You have been warned.


Coming soon

  • Mention highlighter (you are alerted by a beep when someone uses you name)
  • Swearing filter
  • local chat
  • Suggest something!
Last edited by rubenwardy on Thu Mar 17, 2016 15:58, edited 9 times in total.
 

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Sun Jun 16, 2013 02:07

Nice! If you ignore someone, can they still see what you say?
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Sun Jun 16, 2013 02:33

In the chatstream? From my brief poking at the code, yes. Ignoring will block them from mailing you, though. Changing the default privs to not include shout- possibly in conjunction with a distancechat mod - will "fix" that issue somewhat.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Sun Jun 16, 2013 05:14

I had to change

Code: Select all
chatplus._players[key]


to

Code: Select all
chatplus.players[key]


from lines 124-142 to keep it from crashing.
 

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

by rubenwardy » Sun Jun 16, 2013 14:21

Ignoring works like it works in IRC: they can read your messages, but you can not read theirs.



@BrandonReese: That is incorrect, and will cause the mod to stop working properly. I will find out why it does not work.

_players{} contains the player entities (not saved)
players{} contains the player data (saved)

tinoesroho wrote:In the chatstream? From my brief poking at the code, yes. Ignoring will block them from mailing you, though. Changing the default privs to not include shout- possibly in conjunction with a distancechat mod - will "fix" that issue somewhat.


Ignoring will not stop them from mailing you yet, it only works in the chat.
You do not need to revoke "shout". I do not see what the issue is.

(Note: Mail means /mail name msg, chat means talking on "t")
Last edited by rubenwardy on Sun Jun 16, 2013 14:35, edited 1 time in total.
 

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

by rubenwardy » Sun Jun 16, 2013 14:29

Fixed this problem.

It was caused when the mod tries to update a player that is not online.
This error was not caught, because it tried:

Code: Select all
chatplus._players[key].player


not:

Code: Select all
chatplus._players[key]


Commit: Fix bug if player is offline
Last edited by rubenwardy on Sun Jun 16, 2013 14:32, edited 1 time in total.
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Mon Jun 17, 2013 02:28

rubenwardy wrote:Ignoring works like it works in IRC: they can read your messages, but you can not read theirs.



@BrandonReese: That is incorrect, and will cause the mod to stop working properly. I will find out why it does not work.

_players{} contains the player entities (not saved)
players{} contains the player data (saved)

tinoesroho wrote:In the chatstream? From my brief poking at the code, yes. Ignoring will block them from mailing you, though. Changing the default privs to not include shout- possibly in conjunction with a distancechat mod - will "fix" that issue somewhat.


Ignoring will not stop them from mailing you yet, it only works in the chat.
You do not need to revoke "shout". I do not see what the issue is.

(Note: Mail means /mail name msg, chat means talking on "t")


Ok thanks, I didn't poke around too much, saw the error and tried my change and it "worked". I'll try the fixed version later tonight.

Edit: Looks like it's working fine!
Last edited by BrandonReese on Mon Jun 17, 2013 05:25, edited 1 time in total.
 

ndjdjksisksk
Member
 
Posts: 130
Joined: Mon May 06, 2013 04:11

by ndjdjksisksk » Mon Jun 17, 2013 06:24

this is cool! suggeston: can you add a bad word filter to this that would realy work on servers sece so many people swear and curse.
nvm about me leaving minetest but i probably will for a while because i have nothing to do in this comunity becaise i can't make a server. my username is going to change i will make a new acount called stormchaser3000
 

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

by rubenwardy » Mon Jun 17, 2013 11:30

ndjdjksisksk wrote:this is cool! suggeston: can you add a bad word filter to this that would realy work on servers sece so many people swear and curse.


That is actually on my to list
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55
Location: Germany

by Cooper97 » Mon Jun 17, 2013 14:52

rubenwardy wrote:
ndjdjksisksk wrote:this is cool! suggeston: can you add a bad word filter to this that would realy work on servers sece so many people swear and curse.


That is actually on my to list


THANKS.

That is awesome.
Sorry for my bad english. (I am from germany.)
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55
Location: Germany

by Cooper97 » Mon Jun 17, 2013 14:58

You wrote that the command is /mail <name> <msg>
but if I write /mail Robin this is a text message
it says that no player "this" exists. Is it a bug? (Robin is the account name of my friend)
Sorry for my bad english. (I am from germany.)
 

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

by rubenwardy » Mon Jun 17, 2013 14:59

Cooper97 wrote:You wrote that the command is /mail <name> <msg>
but if I write /mail Robin this is a text message
it says that no player "this" exists. Is it a bug? (Robin is the account name of my friend)


Are you sure that is the text exactly?

I might be because "Robin" has an upper case letter in it. I will check.
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55
Location: Germany

by Cooper97 » Mon Jun 17, 2013 15:06

Yes I am sure. He has the account "Robin" and I "Cooper97" (also upper case letter).
Sorry for my bad english. (I am from germany.)
 

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

by rubenwardy » Tue Jun 18, 2013 13:01

Fixed: The problem is that there is a number in the players name.

Commit: Fix problem with command match pattern
Last edited by rubenwardy on Tue Jun 18, 2013 13:06, edited 1 time in total.
 

ndjdjksisksk
Member
 
Posts: 130
Joined: Mon May 06, 2013 04:11

by ndjdjksisksk » Tue Jun 18, 2013 17:15

rubenwardy wrote:
ndjdjksisksk wrote:this is cool! suggeston: can you add a bad word filter to this that would realy work on servers sece so many people swear and curse.


That is actually on my to list

realy epic i needed a swear word filter
nvm about me leaving minetest but i probably will for a while because i have nothing to do in this comunity becaise i can't make a server. my username is going to change i will make a new acount called stormchaser3000
 

User avatar
kaeza
Moderator
 
Posts: 2158
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Tue Jun 18, 2013 18:03

ndjdjksisksk wrote:
rubenwardy wrote:
ndjdjksisksk wrote:this is cool! suggeston: can you add a bad word filter to this that would realy work on servers sece so many people swear and curse.


That is actually on my to list

realy epic i needed a swear word filter

Swear word filters (which I think are useless anyway, because you can always find a workaround) would be better client-side, so players that don't care about swearing can leave that open if they want. Anyway, if someone is swearing on a server, you can /ignore them with this mod.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

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

by rubenwardy » Wed Jun 19, 2013 11:36

kaeza wrote:
ndjdjksisksk wrote:
rubenwardy wrote:
That is actually on my to list

realy epic i needed a swear word filter

Swear word filters (which I think are useless anyway, because you can always find a workaround) would be better client-side, so players that don't care about swearing can leave that open if they want. Anyway, if someone is swearing on a server, you can /ignore them with this mod.


i can make it so that players can choose their level of filtering.
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Mon Jul 01, 2013 15:03

I submitted a pull request for some minor improvements to this mod.

This pull request adds a chat message when a user uses /inbox clear so the player receives feedback that the command was successful.

The pull request adds a chat message when the player uses /inbox and they do not have any messages, so they receive feedback that the command was successful.

It delays the onjoin mail notification chat message, it seems sending chat messages or formspecs in the registered onjoin function aren't received by the client, but delaying those actions using minetest.after seems to make things work as expected.

Added chatplus._players[key].lastcount variable, this keeps track of the message count from the last time the hud was redrawn, and only redraws the hud if the message count changes. At times the hud would flicker, only redrawing the hud when the message count changes fixes that, and this will reduce any network traffic (as little as it may be) caused by redrawing the hud every 5 seconds.


I'm also thinking about adding "local chat" to this mod. So when you chat only players within X number of nodes from the chatting player would receive the chat message. You would have to start your chat message with a certain character (e.g. !,*,&) to send a "global" chat message. I wonder how the community would feel about that. Obviously I like it, it helps keep conversations separate. It would take some getting used to.
 

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

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

by rubenwardy » Wed Aug 14, 2013 16:06

[h]0.2 released[/h]

These changes were made in preparation for my new game, capture the flag.

  • Added limiting by distance filter
  • Added an api

[spoiler=the new API]-- Registers a handler to determine if the chat msg is sent
--FROM: the name of the player it is from
--TO: the name of the player it is to
--MSG: the text of the msg
--return NIL: no action
--return TRUE: send msg
--return FALSE: cancel msg
chatplus.register_handler( func( from, to, msg) )[/spoiler]
Last edited by rubenwardy on Wed Aug 14, 2013 16:10, edited 1 time in total.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Wed Aug 14, 2013 19:19

I'm absolutely chuffed with what you've done. Finally, my LAN survival server is complete. Distance limited-viewing? Check. Limited chat? Check.

Simply fantastic.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
Cooper97
Member
 
Posts: 52
Joined: Thu Feb 21, 2013 19:55
Location: Germany

by Cooper97 » Thu Aug 15, 2013 16:28

rubenwardy wrote:[h]Coming soon[/h]
Swearing filter


A swearing filter would be very useful on some servers.
Sorry for my bad english. (I am from germany.)
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Thu Aug 15, 2013 16:44

I think all I want you to add is what is on your todo list. Amazing job so far.
Back from the dead!
 

User avatar
BrunoMine
Member
 
Posts: 1021
Joined: Thu Apr 25, 2013 17:29
Location: SP-Brasil
GitHub: BrunoMine

by BrunoMine » Sat Aug 31, 2013 14:37

There is a problem. flooding is possible to inbox.
I suppose you have 15 posts (1 and 2 are important) (3-15 are useless, annoying)
send: /mail
? 1 - Hello, I left the items in bau
? 2 - tidy the house wall
? 3 - bla bla bla
? 4 - bla bla bla
? 5 - bla bla bla
? 6 - bla bla bla
? 7 - bla bla bla
? 8 - bla bla bla
? 9 - bla bla bla
_________________________________________________________
10 - bla bla bla
11 - bla bla bla
13 - bla bla bla
14 - bla bla bla
15 - bla bla bla

1 - 9 were not visualized
It is horrible that, even ignoring the player, simply enter it in server under another name.

solution:
It would be nice if the inbox was displayed in a very large box. It was possible to scroll up and down
I also think it would be good if the email was accessed whenever a computer! So'd have more to put an object at home.
Last edited by BrunoMine on Sat Aug 31, 2013 14:39, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
BrandonReese
Member
 
Posts: 839
Joined: Wed Sep 12, 2012 00:44
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Sat Aug 31, 2013 14:54

brunob.santos wrote:There is a problem. flooding is possible to inbox.
I suppose you have 15 posts (1 and 2 are important) (3-15 are useless, annoying)
send: /mail
? 1 - Hello, I left the items in bau
? 2 - tidy the house wall
? 3 - bla bla bla
? 4 - bla bla bla
? 5 - bla bla bla
? 6 - bla bla bla
? 7 - bla bla bla
? 8 - bla bla bla
? 9 - bla bla bla
_________________________________________________________
10 - bla bla bla
11 - bla bla bla
13 - bla bla bla
14 - bla bla bla
15 - bla bla bla

1 - 9 were not visualized
It is horrible that, even ignoring the player, simply enter it in server under another name.

solution:
It would be nice if the inbox was displayed in a very large box. It was possible to scroll up and down
I also think it would be good if the email was accessed whenever a computer! So'd have more to put an object at home.


You can press F10 and scroll up in the console window to see the rest of the mail items.
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: Bing [Bot] and 4 guests