[Mod] Player notes [player_notes]

Post Reply
User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

[Mod] Player notes [player_notes]

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
CraigyDavi
Member
Posts: 582
Joined: Sat Aug 10, 2013 13:08
GitHub: davisonio
IRC: davisonio
In-game: CraigyDavi
Location: Hampshire, UK
Contact:

by CraigyDavi » Post

Nice mod!

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

by Achilles » Post

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: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

by Achilles » Post

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: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

by Achilles » Post

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
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

Achilles wrote:Could the mod be adapted so that as soon as someone kills another it would appear on their notes screen?
Impossible.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Achilles
Member
Posts: 247
Joined: Sun Dec 15, 2013 11:55
In-game: Achilles
Location: Excuse Me???? -_-

by Achilles » Post

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
Location: United Kingdom

by rommiekerova » Post

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 - viewtopic.php?id=8054
My Server: Kalisae - viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!

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

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

by rommiekerova » Post

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

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

by rommiekerova » Post

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 - viewtopic.php?id=8054
My Server: Kalisae - viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!

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

by Krock » Post

Shame on me.
Last edited by Krock on Thu Oct 08, 2015 06:56, edited 1 time in total.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

by rommiekerova » Post

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 - viewtopic.php?id=8054
My Server: Kalisae - viewtopic.php?id=9040 <--CLOSED UNTIL FURTHER NOTICE!

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

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

by rommiekerova » Post

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

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

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

by Krock » Post

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

Changing it to _note
fixes it?
Exactly.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

by rommiekerova » Post

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

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

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

by Krock » Post

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
Location: gone to lunch

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

by crazyginger72 » Post

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

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
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

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

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

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

by 4aiman » Post

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
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

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

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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:

Re: [Mod] Player notes [player_notes]

by rubenwardy » Post

Would it be possible to add xban2 support? So notes are shared between different usernames.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

Re: [Mod] Player notes [player_notes]

by Krock » Post

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>"?
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests