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

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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

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

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: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Sun Jun 16, 2013 05:14

I had to change

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
chatplus._players[key]


to

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
chatplus.players[key]


from lines 124-142 to keep it from crashing.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
chatplus._players[key].player


not:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 836
Joined: Wed Sep 12, 2012 00:44
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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

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

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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

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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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: 836
Joined: Wed Sep 12, 2012 00:44
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
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Jul 07, 2013 11:12

Thank you very much.

Merged.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
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

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

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: 2131
Joined: Sun Jan 06, 2013 01:22
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.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
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: 836
Joined: Wed Sep 12, 2012 00:44
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.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Sat Aug 31, 2013 16:50

Living and discovering! Thanks for the solution. But I think it would be cool to idea of the computer! I think we should explore the possibilities of using a work area in pcs.
We could use pcs for:
Access banking balance and make payments
Use our inbox
Read news event server
Read a wiki server
Enter and exit rooms private chat.

All this without becoming annoying Recurring commands!
But anyway, I believe it will happen when the minetest become a very famous game.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
fairiestoy
Member
 
Posts: 191
Joined: Sun Jun 09, 2013 19:25

by fairiestoy » Sat Sep 21, 2013 16:44

Hello ruben,

i came up with a suggestion when looking through my fork of this and watching the user traffic on the landruch server. I think its necessary to include some kind of time check when a user last log in. Otherwise, your file will be fed up by dozens of users that show up only once and never come back. But they do take place in your files, therefore it might be a good idea to attach a date to each user when he last logged in and delete him after a specific timespan. About compatibility with your old files: Since you are only storing a serialized table, you could make check on init (when loading the data from file) if each user has already such a date. It will increase the server load time, but will keep the resulting file smaller as well as the used memory.

Greetings
Interesting about new things is, to figure out how it works ...
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Tue Jan 07, 2014 18:20

[h]0.5 Released![/h]

Reworked code to be more stable and logical.

When the game is loaded, it cleans stored data to get rid of any unneeded ones, fixing @fairiestoy's problem.

To enable distance limitation, set chatplus_distance in minetest.conf to something bigger than zero.

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

Coming soon:

  • Freeminer specific features (coloring)
  • Mention Highlighting
Last edited by rubenwardy on Tue Jan 07, 2014 18:26, edited 1 time in total.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Tue Jan 07, 2014 19:51

Can't say much about this, I like this mod!

A GUI would be a cool addition but right now it's working well :)

EDIT: sorry, it's not working well:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
/mail singleplayer haiiii

20:55:21: ERROR[main]: ServerError: LuaError: E:\Programme\minetest\bin\..\mods\
chatplus\init.lua:288: bad argument #1 to 'insert' (table expected, got nil)
20:55:21: ERROR[main]: stack traceback:
20:55:21: ERROR[main]:  [C]: in function 'insert'
20:55:21: ERROR[main]:  E:\Programme\minetest\bin\..\mods\chatplus\init.lua:288:
 in function 'func'
20:55:21: ERROR[main]:  E:\Programme\minetest\bin\..\builtin/chatcommands.lua:25
: in function <E:\Programme\minetest\bin\..\builtin/chatcommands.lua:16>
Last edited by Krock on Tue Jan 07, 2014 19:55, edited 1 time in total.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Tue Jan 07, 2014 20:02

 

Next

Return to Mod Releases

Who is online

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

cron