[Mod] Advanced Ranks [ranks]

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

[Mod] Advanced Ranks [ranks]

by octacian » Fri May 19, 2017 15:43

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)
 

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

Re: [Mod] Advanced Ranks [ranks]

by CraigyDavi » Fri May 19, 2017 20:19

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

User avatar
GreenDimond
Member
 
Posts: 1196
Joined: Wed Oct 28, 2015 01:26
Location: A place
GitHub: GreenXenith
IRC: GreenDimond
In-game: GreenDimond

Re: [Mod] Advanced Ranks [ranks]

by GreenDimond » Sat May 20, 2017 06:12

This is cool! Maybe put [ ] around the rank? And maybe put it above or below the playername (if possible)?
My YuTube channel | I moderate the HOMETOWN Server. | Click here to see my (5) mods!
 

Sokomine
Member
 
Posts: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Advanced Ranks [ranks]

by Sokomine » Wed May 24, 2017 12:45

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: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Advanced Ranks [ranks]

by azekill_DIABLO » Fri May 26, 2017 12:50

very useful! i suggest that the name were coloured in funstion of the rank, using the same variation as forum for example!
 

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

User avatar
Lone_Wolf
Member
 
Posts: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf
 

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

Re: [Mod] Advanced Ranks [ranks]

by azekill_DIABLO » Fri Jun 16, 2017 16:25

CraigyDavi wrote:This mod doesn't work with the IRC mod.

answer:
Lone_Wolf wrote:Nice!
 

User avatar
Lone_Wolf
Member
 
Posts: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Fri Jun 16, 2017 21:10

CraigyDavi wrote:This mod doesn't work with the IRC mod.


Answer wrote:Go complain to someone else you baby! -_-

No offense :P
 

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

Re: [Mod] Advanced Ranks [ranks]

by octacian » Wed Jun 28, 2017 01:26

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)
 

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

Re: [Mod] Advanced Ranks [ranks]

by octacian » Fri Jun 30, 2017 03:13

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)
 

User avatar
Lone_Wolf
Member
 
Posts: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf
 

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

Re: [Mod] Advanced Ranks [ranks]

by octacian » Sun Sep 17, 2017 14:15

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)
 

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

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

Re: [Mod] Advanced Ranks [ranks]

by octacian » Sun Sep 17, 2017 16:49

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)
 

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

Re: [Mod] Advanced Ranks [ranks]

by azekill_DIABLO » Sun Sep 17, 2017 17:37

octacian wrote:Although it wouldn't be such a bad idea...

I imagine the mess on the server! no more admin or moderators xD
 

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

Re: [Mod] Advanced Ranks [ranks]

by octacian » Sun Sep 17, 2017 17:48

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)
 

User avatar
Lone_Wolf
Member
 
Posts: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Sun Sep 17, 2017 18:58

You need to shorten the rank names a little bit.
Ideas:
Guard, Mod
 

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

Re: [Mod] Advanced Ranks [ranks]

by Aerozoic » Mon Jan 08, 2018 01:23

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: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] Advanced Ranks [ranks]

by octacian » Thu Jan 11, 2018 22:32

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)
 

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

Re: [Mod] Advanced Ranks [ranks]

by Darkwar » Sun Sep 16, 2018 04:21

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

User avatar
Lone_Wolf
Member
 
Posts: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Sun Sep 16, 2018 16:01

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 ;)
 

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

Re: [Mod] Advanced Ranks [ranks]

by Darkwar » Mon Sep 17, 2018 22:11

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: 1979
Joined: Sun Apr 09, 2017 05:50
Location: Hopefully very far from yours, snoop :P
GitHub: LoneWolfHT
IRC: Lone_Wolf
In-game: Lone_Wolf

Re: [Mod] Advanced Ranks [ranks]

by Lone_Wolf » Tue Sep 18, 2018 01:15

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
 

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

Re: [Mod] Advanced Ranks [ranks]

by ManElevation » Tue Sep 18, 2018 13:07

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


Return to WIP Mods



Who is online

Users browsing this forum: gpcf, Pyrollo and 3 guests