[Mod] Player notes [player_notes]

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

[Mod] Player notes [player_notes]

by Krock » Wed Apr 09, 2014 09:53

Add a note to a player!
Image

This is why I created this mod.

It allows everybody with the "player_notes" privilege to write comments/messages/notices about a specific player.
Every note gets a random key from 100 to 999.
There can be multiple keys with the same number, just on diffrent players.

Commands:
/notes Shows up notes GUI

Optional settings: (in "init.lua")
Enable/disable timestamps
Define minimal and maximal number of keys.

Privilege required: player_notes (Added by mod)
Depends: nothing
License: WTFPL
Download: Master *.zip, View source
Last edited by Krock on Thu Oct 08, 2015 07:03, edited 8 times 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
CraigyDavi
Member
 
Posts: 565
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio or CraigyDavi
In-game: davisonio or CraigyDavi

by CraigyDavi » Wed Apr 09, 2014 17:29

Nice mod!
 

User avatar
Achilles
Member
 
Posts: 246
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles

by Achilles » Wed Apr 09, 2014 17:34

Nice... Easy way to keep track of of clients who repeatedly break server rules

+1
The Ironic Thing About Common Sense Is That It Isn't Very Common
 

User avatar
Achilles
Member
 
Posts: 246
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles

by Achilles » Thu Apr 10, 2014 19:18

Could the mod be adapted so that as soon as someone kills another it would appear on their notes screen?
The Ironic Thing About Common Sense Is That It Isn't Very Common
 

User avatar
Achilles
Member
 
Posts: 246
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles

by Achilles » Thu Apr 10, 2014 19:22

E.g say Achilles killed random_bot, then as soon as this happened something like 'Achilles at (10.05.2014 5:37:73) killed random_bot' would appear under the notes section for Achilles
The Ironic Thing About Common Sense Is That It Isn't Very Common
 

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

by Krock » Thu Apr 10, 2014 20:13

Achilles wrote:Could the mod be adapted so that as soon as someone kills another it would appear on their notes screen?

Impossible.
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
Achilles
Member
 
Posts: 246
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles

by Achilles » Fri Apr 11, 2014 19:53

Krock wrote:
Achilles wrote:Could the mod be adapted so that as soon as someone kills another it would appear on their notes screen?

Impossible.


Ah OK... Just an idea
The Ironic Thing About Common Sense Is That It Isn't Very Common
 

rommiekerova
Member
 
Posts: 93
Joined: Thu Nov 21, 2013 10:59
In-game: Andromeda

by rommiekerova » Sat Apr 12, 2014 15:34

Does this mod let the people see the notes on them or just the person with the priv who added it?

Is it possible for more than one player to see the notes or can anyone with the right priv see the notes? This would of course be useful for admins and mods on a server to keep track of people.
My Mods: Kerova - https://forum.minetest.net/viewtopic.php?id=8054
My Server: Kalisae - https://forum.minetest.net/viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!
 

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

by Krock » Sat Apr 12, 2014 16:52

rommiekerova wrote:Does this mod let the people see the notes on them or just the person with the priv who added it?

Is it possible for more than one player to see the notes or can anyone with the right priv see the notes?

Only people with the "player_notes" privilege can add/remove and view the notes.
rommiekerova wrote:This would of course be useful for admins and mods on a server to keep track of people.

Yup. This mod is useful for teamwork under moderators.
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>
 

rommiekerova
Member
 
Posts: 93
Joined: Thu Nov 21, 2013 10:59
In-game: Andromeda

by rommiekerova » Sat Apr 12, 2014 19:07

Awesome! This is definitely going to be added to my server.
My Mods: Kerova - https://forum.minetest.net/viewtopic.php?id=8054
My Server: Kalisae - https://forum.minetest.net/viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!
 

rommiekerova
Member
 
Posts: 93
Joined: Thu Nov 21, 2013 10:59
In-game: Andromeda

by rommiekerova » Sat Apr 12, 2014 21:18

There is a serious problem with this mod. I added it and when it came to using /add_note, it said the note got added but suddenly the server announced it was shutting down.

There is nothing printed in debug to show why it is happening.

After rebooting the server I checked if the note had added and it hadn't.
My Mods: Kerova - https://forum.minetest.net/viewtopic.php?id=8054
My Server: Kalisae - https://forum.minetest.net/viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!
 

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

by Krock » Sun Apr 13, 2014 07:31

Shame on me.
Last edited by Krock on Thu Oct 08, 2015 06:56, 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>
 

rommiekerova
Member
 
Posts: 93
Joined: Thu Nov 21, 2013 10:59
In-game: Andromeda

by rommiekerova » Sun Apr 13, 2014 07:45

There is absolutely nothing in the debug about the crashes or error.
I use windows XP.
Its easy to reproduce. Every time I type something like: /add_note rommie test note
it makes the server shut down.

/list_notes works fine but obviously returns the message stating the player has no notes.
My Mods: Kerova - https://forum.minetest.net/viewtopic.php?id=8054
My Server: Kalisae - https://forum.minetest.net/viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!
 

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

by Krock » Sun Apr 13, 2014 07:52

rommiekerova wrote:/add_note rommie test note

Ah my bad.. a typo, it should be "_note" instead of "_node".
Fixed in new v3 (even if it's not worth to add a version number)
Last edited by Krock on Sun Apr 13, 2014 07:53, 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>
 

rommiekerova
Member
 
Posts: 93
Joined: Thu Nov 21, 2013 10:59
In-game: Andromeda

by rommiekerova » Sun Apr 13, 2014 07:58

So its local note = string.gsub(_node, "|", "/")
that causes the issue?

Changing it to _note
fixes it?
My Mods: Kerova - https://forum.minetest.net/viewtopic.php?id=8054
My Server: Kalisae - https://forum.minetest.net/viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!
 

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

by Krock » Sun Apr 13, 2014 08:00

rommiekerova wrote:So its local note = string.gsub(_node, "|", "/")
that causes the issue?

Changing it to _note
fixes it?

Exactly.
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>
 

rommiekerova
Member
 
Posts: 93
Joined: Thu Nov 21, 2013 10:59
In-game: Andromeda

by rommiekerova » Sun Apr 13, 2014 08:08

Awesome. Altered the right bit and tested it. Works fine now.
My Mods: Kerova - https://forum.minetest.net/viewtopic.php?id=8054
My Server: Kalisae - https://forum.minetest.net/viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!
 

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

Re: [Mod] Player notes [v4] [player_notes]

by Krock » Sun Apr 20, 2014 18:26

New version with a GUI! (old chat commands are included in chatcommands.lua)

Image in the 1st post updated.
Download me!
Use the chatcommand "/notes" to see the GUI.

EDIT: fixed possible fails in the formspec, added "view-only" window.
Last edited by Krock on Mon Apr 21, 2014 14:05, edited 1 time in total.
 

User avatar
crazyginger72
Member
 
Posts: 69
Joined: Wed Jan 01, 2014 07:57
GitHub: crazyginger72
IRC: cg72
In-game: crazyginger72

Re: [Mod] Player notes [v4] [player_notes]

by crazyginger72 » Mon Apr 21, 2014 05:17

nice, cheapie will love this one, he was asking for it at one time :)

and it will be going on my server
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Player notes [v5] [player_notes]

by 4aiman » Tue Apr 22, 2014 08:18

Cool! Is it possible that the next version would have a combobox instead of simple edit field for username selection? You probably don't want to add notes on inexistent players..
 

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

Re: [Mod] Player notes [v5] [player_notes]

by Krock » Tue Apr 22, 2014 18:59

4aiman wrote:Cool! Is it possible that the next version would have a combobox instead of simple edit field for username selection? You probably don't want to add notes on inexistent players..

It'll throw errors if the user isn't registred on the server. It also should be possible to add note to an offline player, so is a textbox the best way at the moment.
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>
 

4aiman
Member
 
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

Re: [Mod] Player notes [v5] [player_notes]

by 4aiman » Wed Apr 23, 2014 08:12

Either one of us is confused...

If you were able to make your mod to "throw errors if the user isn't registred on the server" then what's the problem of adding a note for some player who went off-line ATM?

Edit->combobox replacement won't cause any harm, but would save you from checking whether a player is on~ or off-line every time someone adds a note.
 

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

Re: [Mod] Player notes [v5] [player_notes]

by Krock » Wed Apr 23, 2014 11:36

4aiman wrote:Either one of us is confused...
<snip>


It does not matter if a player is online or offline when you want to add a note about him.
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

Re: [Mod] Player notes [player_notes]

by rubenwardy » Wed Jan 06, 2016 16:44

Would it be possible to add xban2 support? So notes are shared between different usernames.
 

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

Re: [Mod] Player notes [player_notes]

by Krock » Sun Jan 10, 2016 09:39

Yes, it's possible to add new notes with some code changes.
The main problem there is the deletion: What if the player gets unbanned? Should it delete the note or create a new one about "Unbanned by <player>"?
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>
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 7 guests

cron