[Mod] Advanced Ranks [ranks]

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

[Mod] Advanced Ranks [ranks]

by octacian » Post

Advanced Ranks [ranks]
Image
GitHub: https://github.com/octacian/ranks
Download: https://github.com/octacian/ranks/archive/master.zip

Notice: Your experience with Ranks can be improved by using a development build of Minetest. In order to use Ranks at its full potential, you'll need to build Minetest yourself with this commit or newer (June 21st, 2017).

Ranks is an advanced ranks mod geared towards larger servers helps to both distiguish between players and make managing privileges much easier. With several ranks premade and a simplistic API, ranks is a good addition to any server, especially those with many players.

This mod was made in an effort to solve two problems. One of these is new players getting confused when they see moderators or administrators doing things that normal players cannot, resulting in repeated accusations of hacking. Ranks allows there to be no confusion between what a player should or should not be able to do, as their rank is displayed in both their nametag and as a prefix to chat messages sent by them.

Displaying the rank prefix on a player's nametag can be disabled by setting ranks.prefix_nametag = false in minetest.conf, while prefixes before chat messages can be disabled with ranks.prefix_chat = false.

Ranks also attempts to make privilege updates easier by allowing you to assign a set of privileges to each rank allowing a strict set of privileges for that rank, automatically granting missing privileges, and automatically revoking extra privileges (configurable per-rank). This means that when a player is given a rank with privilege definitions, they will automatically inherit the privileges specified. Whenever /grant, /grantme, or /revoke is called on a player, their privileges are updated according to rank and a warning is sent to the player who called the chatcommand if privileges are modified further.

Configuration

All of the features provided by ranks can be configured directly from the advanced settings menu in the ranks subsection of the top-level Mods section. You can also configure ranks directly from minetest.conf with the settings listed below.
  • ranks.prefix_chat - bool - true - Prefix chat messages
  • ranks.prefix_nametag - bool - true - Prefix nametags
Please view the README for more nicely formatted configuration information.

Packaged Ranks

By default, four ranks are included with the ranks mod, however, they are only for decoration purposes and do not modify any privileges as they should be configured by each server owner.

Admin (admin)
Moderator (moderator)
Guardian (guardian)
YouTube (youtube)

The above demonstrates that while ranks can be useful for managing privileges, it can also be a very nice form of progression/recognition.

Usage

Ranks introduces two chatcommands, /getrank and /rank. The first allows you to get a player's rank while the latter allows you to set a player's rank and requires the rank chatcommand. Note: the player whose username is the same as the administrator (defined by name in minetest.conf) will automatically be granted the rank privilege.

/rank Usage:

Code: Select all

Name or operation is either a player name, or "list" to list ranks
If the operation is "list", no new rank is needed
Setting new rank to "clear" causes all rank information to be removed from the player

/rank <name or operation> <new rank>
/getrank Usage:

Code: Select all

Name is the name of the player whose rank you wish to retrieve
If name is blank, your own rank is returned

/getrank <name>
Creating Ranks

You can create your own ranks and learn about privilege management in the API documentation. It explains how to manage privileges and register ranks with the ranks.register function. Registrations can be made either in the ranks.lua file of the mod itself (where default ranks or unregistered), or they can be preferrably placed in a ranks.lua file inside the world directory.

If you don't want one of the built in ranks, you can either register a new rank with the same name (effectively overriding the rank) or learn about ranks.unregister which can also be called from the world file.
Last edited by octacian on Fri Jun 30, 2017 14:24, edited 3 times in total.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

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

Re: [Mod] Advanced Ranks [ranks]

by CraigyDavi » Post

Great mod this is just what I've been looking for. Thanks!

User avatar
GreenXenith
Member
Posts: 1356
Joined: Wed Oct 28, 2015 01:26
GitHub: GreenXenith
Location: UTC-8:00
Contact:

Re: [Mod] Advanced Ranks [ranks]

by GreenXenith » Post

This is cool! Maybe put [ ] around the rank? And maybe put it above or below the playername (if possible)?
YouTube | Mods | Patreon | Minetest Discord @greenxenith

You should not be able to read this message.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Advanced Ranks [ranks]

by Sokomine » Post

Very good idea. There's always a lot of confusion amongst new players as to who might be admin on a server. This mod could help a lot there. No more need to check each player with /privs.
A list of my mods can be found here.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Advanced Ranks [ranks]

by azekill_DIABLO » Post

very useful! i suggest that the name were coloured in funstion of the rank, using the same variation as forum for example!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: [Mod] Advanced Ranks [ranks]

by CraigyDavi » Post

This mod doesn't work with the IRC mod.

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Post

Nice!
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Advanced Ranks [ranks]

by azekill_DIABLO » Post

CraigyDavi wrote:This mod doesn't work with the IRC mod.
answer:
Lone_Wolf wrote:Nice!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Post

CraigyDavi wrote:This mod doesn't work with the IRC mod.
Answer wrote:Go complain to someone else you baby! -_-
No offense :P
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Advanced Ranks [ranks]

by octacian » Post

Ranks now color only part of the nametag rather than the entire nametag. However, please note that unless using a 0.4.16 client, the new partially-coloured nametags may appear to be misaligned.

Messages colored when chat prefixing is enabled are also now properly logged.
GreenDimond wrote:This is cool! Maybe put [ ] around the rank? And maybe put it above or below the playername (if possible)?
I don't think it's worthwhile to put the rank above or below the name, it seems better to me to keep it all on the same line. Not sure if it's possible, BTW. I didn't put [ ] around the rank because I thought it made things appear a bit cluttered. However, if you use this and wish to have [ ] around the rank, just modify the rank definition and add brackets around the "prefix".
CraigyDavi wrote:This mod doesn't work with the IRC mod.
hmm, I'll see about adding optional support at some point, just because.

Speaking of this mod not working with other mods, ranks will not function properly with chat3. Until a better queuing system is implemented, using both mods side-by-side will result in weird colorization of chat. However, you can still use these mods together by simply disabling ranks' chat prefixing.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Advanced Ranks [ranks]

by octacian » Post

octacian wrote:Speaking of this mod not working with other mods, ranks will not function properly with chat3. Until a better queuing system is implemented, using both mods side-by-side will result in weird colorization of chat. However, you can still use these mods together by simply disabling ranks' chat prefixing.
Woot! Ranks + chat3 compatibility has been implemented even without the queuing system! For those of you who would like to use these two mods together, make sure you update your copy of both ranks and chat3 to make sure you have today's commits.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Post

How to remove a rank?
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Advanced Ranks [ranks]

by octacian » Post

Lone_Wolf wrote:How to remove a rank?

Code: Select all

/rank <name> clear
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Advanced Ranks [ranks]

by azekill_DIABLO » Post

/rank all clear
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Advanced Ranks [ranks]

by octacian » Post

azekill_DIABLO wrote:/rank all clear
You are suggesting that to remove everyone's rank? Cause that doesn't currently exist :P Although it wouldn't be such a bad idea...
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Advanced Ranks [ranks]

by azekill_DIABLO » Post

octacian wrote: Although it wouldn't be such a bad idea...
I imagine the mess on the server! no more admin or moderators xD
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Advanced Ranks [ranks]

by octacian » Post

azekill_DIABLO wrote:
octacian wrote: Although it wouldn't be such a bad idea...
I imagine the mess on the server! no more admin or moderators xD
The admin always maintains at least the ranks privilege allowing him to give himself back the rank.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Post

You need to shorten the rank names a little bit.
Ideas:
Guard, Mod
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
Aerozoic
Member
Posts: 55
Joined: Mon Jul 24, 2017 15:04
GitHub: aerozoic
IRC: aerozoic
In-game: aerozoic
Location: USA

Re: [Mod] Advanced Ranks [ranks]

by Aerozoic » Post

CraigyDavi wrote:This mod doesn't work with the IRC mod.
What exactly does this mean? It causes a server crash with both mods installed? Ranks mod simply doesn't function if IRC mod is installed? Or you just can't see ranks from IRC?
“For once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.”

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] Advanced Ranks [ranks]

by octacian » Post

Aerozoic wrote:
CraigyDavi wrote:This mod doesn't work with the IRC mod.
What exactly does this mean? It causes a server crash with both mods installed? Ranks mod simply doesn't function if IRC mod is installed? Or you just can't see ranks from IRC?
As far as I know, you just can't see ranks from IRC due to the way that the IRC mod works. There's also a chance now that I think about it that this mod prevents messages from displaying in IRC, I'll have to mess around when I have a chance though.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

Darkwar
Member
Posts: 41
Joined: Fri Aug 17, 2018 18:28
GitHub: Darkwar
IRC: Darkwar
In-game: cooljar10

Re: [Mod] Advanced Ranks [ranks]

by Darkwar » Post

ok soo how do i change there rank privs idk what file it is in

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Post

Darkwar wrote:ok soo how do i change there rank privs idk what file it is in
Read the following quote.
octacian wrote:Please view the README for more nicely formatted configuration information.

Creating Ranks

You can create your own ranks and learn about privilege management in the API documentation. It explains how to manage privileges and register ranks with the ranks.register function. Registrations can be made either in the ranks.lua file of the mod itself (where default ranks or unregistered), or they can be preferrably placed in a ranks.lua file inside the world directory.

If you don't want one of the built in ranks, you can either register a new rank with the same name (effectively overriding the rank) or learn about ranks.unregister which can also be called from the world file.
To create a new rank you need to know some lua and have at least some understanding of how the Minetest api works.

And you can find out how to register ranks in the API.md file ;)
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

Darkwar
Member
Posts: 41
Joined: Fri Aug 17, 2018 18:28
GitHub: Darkwar
IRC: Darkwar
In-game: cooljar10

Re: [Mod] Advanced Ranks [ranks]

by Darkwar » Post

Lone_Wolf wrote:
Darkwar wrote:ok soo how do i change there rank privs idk what file it is in
Read the following quote.
octacian wrote:Please view the README for more nicely formatted configuration information.

Creating Ranks

You can create your own ranks and learn about privilege management in the API documentation. It explains how to manage privileges and register ranks with the ranks.register function. Registrations can be made either in the ranks.lua file of the mod itself (where default ranks or unregistered), or they can be preferrably placed in a ranks.lua file inside the world directory.

If you don't want one of the built in ranks, you can either register a new rank with the same name (effectively overriding the rank) or learn about ranks.unregister which can also be called from the world file.
To create a new rank you need to know some lua and have at least some understanding of how the Minetest api works.

And you can find out how to register ranks in the API.md file ;)
soo ur saying to set the privs is in the API file

User avatar
Lone_Wolf
Member
Posts: 2575
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Post

Darkwar wrote:
Lone_Wolf wrote:
Darkwar wrote:ok soo how do i change there rank privs idk what file it is in
Read the following quote.
octacian wrote:Please view the README for more nicely formatted configuration information.

Creating Ranks

You can create your own ranks and learn about privilege management in the API documentation. It explains how to manage privileges and register ranks with the ranks.register function. Registrations can be made either in the ranks.lua file of the mod itself (where default ranks or unregistered), or they can be preferrably placed in a ranks.lua file inside the world directory.

If you don't want one of the built in ranks, you can either register a new rank with the same name (effectively overriding the rank) or learn about ranks.unregister which can also be called from the world file.
To create a new rank you need to know some lua and have at least some understanding of how the Minetest api works.

And you can find out how to register ranks in the API.md file ;)
soo ur saying to set the privs is in the API file
Not sure what you mean. The default ranks are registered in ranks.lua. If you want to set it so that the bearers of ranks also get privileges you will probably have to learn how to register a rank first :P
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

User avatar
ManElevation
Member
Posts: 896
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
Location: Madrid,Spain

Re: [Mod] Advanced Ranks [ranks]

by ManElevation » Post

oh wow this looks great
My Public Mods! Discord: Rottweiler Games#3368

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 10 guests