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

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

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

by rubenwardy » Post

This mod is no longer maintained and shouldn't be used

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by InfinityProject » Post

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 » Post

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
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
Location: USA

by BrandonReese » Post

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: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by BrandonReese » Post

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 » Post

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: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

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
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by Cooper97 » Post

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 » Post

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: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by Cooper97 » Post

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: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by ndjdjksisksk » Post

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: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

by kaeza » Post

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

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

by rubenwardy » Post

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.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by BrandonReese » Post

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: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

Thank you very much.

Merged.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by rubenwardy » Post

0.2 released

These changes were made in preparation for my new game, capture the flag.
  • Added limiting by distance filter
  • Added an api
Spoiler
-- 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) )
Last edited by rubenwardy on Wed Aug 14, 2013 16:10, edited 1 time in total.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by tinoesroho » Post

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 » Post

rubenwardy wrote:

Coming soon

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
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

by Evergreen » Post

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: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

by BrunoMine » Post

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
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
Location: USA

by BrandonReese » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests