Luke aka SwissalpS
c68ccd6f44
kick: cleanup
...
- simplify and reduce calls of core.get_player_privs()
- update help text to standard syntax
- streamline duplicate code
- remove unnecessary param count checks
- remove explicit nil check where not needed
- don't call get_owner if is admin (until needed)
2024-09-15 06:09:33 +02:00
Luke aka SwissalpS
6efb00ec69
leave: cleanup
...
- update help text to standard syntax
- remove unnecessary param count checks
- simplify leave_faction() argument checking
2024-09-15 05:31:25 +02:00
Luke aka SwissalpS
d0520d2221
join: cleanup
...
- don't call get_player_factions() unless needed
- use get_player_factions() instead of depricated get_player_faction()
- truth check of password in valid_password() for easier understanding
of code
- remove explicit nil check where not needed
2024-09-15 05:14:11 +02:00
Luke aka SwissalpS
86ba332441
player_info: cleanup
...
- move depricated log entry to start of get_player_faction(), no point
in skipping warning.
- simplify get_player_factions()
- whitespace linebreaks for easier reading and consistancy
- loop members into table for consistant and easier to read code
- simplify get_owned_factions()
- make player_name param optional, default to caller (still need to
check as caller name can be missing)
- loop factions into table for consistant and easier to read code (also
presumpted faster)
2024-09-15 04:58:57 +02:00
Luke aka SwissalpS
9a646d213e
info: cleanup
...
- whitespace linebreaks for easier reading and consistancy
- update helptext signiture (also for disband) to reflect actual
requirements and standard
- loop members into table for consistant and easier to read code
2024-09-15 04:19:04 +02:00
Luke aka SwissalpS
f02f6d56e6
list: check for true first instead of using negation
...
- check for no factions first -> simpler code
- whitespace: linebreak for easier reading
2024-09-15 03:53:42 +02:00
Luke aka SwissalpS
fb8f7baf4f
disband: allow admin
...
- permit admin to disband a faction without having any factions himself
- permit admin to skip password check (he can supply any placeholder)
- permit admin to disband his own single faction
- don't call get_owner or valid_password if is admin
- streamline duplicate code
2024-09-15 03:47:50 +02:00
Luke aka SwissalpS
978861ae3e
add local is_admin
...
stash commit...
2024-09-15 02:32:21 +02:00
Luke aka SwissalpS
f021427f04
locale: some more de-Frenching
2024-09-15 02:18:21 +02:00
Luke aka SwissalpS
9e3276ad9e
locale: the player -> player x
2024-09-15 01:59:52 +02:00
Luke aka SwissalpS
4ed325039d
locale: faction x already exists
2024-09-15 01:53:36 +02:00
Luke aka SwissalpS
f5c68e3c5d
locale: reuse "faction x doesn't exist"
2024-09-15 01:50:53 +02:00
Luke aka SwissalpS
827751f562
locale: reuse "missing player name"
2024-09-15 01:35:25 +02:00
Luke aka SwissalpS
44d01cc834
locale: reuse string for missing name
...
besides, "nil" is a valid name. This way there is no confusion.
2024-09-15 01:22:41 +02:00
Luke aka SwissalpS
c28b0a0b04
locale: this -> that or better
...
also fixed a french mistake: player doesn't own these -> player owns
these
2024-09-15 01:21:48 +02:00
Luke aka SwissalpS
37e70987d0
locale: exists -> exist
2024-09-15 00:41:29 +02:00
Luke aka SwissalpS
bf9905e238
locale: tweak and add "No factions found."
2024-09-15 00:34:13 +02:00
Luke aka SwissalpS
116bc756e1
locale: ownership rephrasing
2024-09-15 00:33:37 +02:00
Luke aka SwissalpS
00f2643b2e
locale: remove unused entry
2024-09-15 00:22:28 +02:00
Luke aka SwissalpS
ea58047369
locale: many -> multiple
2024-09-15 00:17:45 +02:00
Luke aka SwissalpS
a87e59afee
wrap fixup code in do-block
...
variable save_needed is not used for anything else
2024-09-15 00:06:17 +02:00
Luke aka SwissalpS
e21bd17ace
proper admin priv listing in help for invite
2024-09-15 00:03:20 +02:00
Luke aka SwissalpS
27449b6534
chown: fix command signature
...
password is required
2024-09-14 23:57:57 +02:00
Luke aka SwissalpS
75ff73a45c
chown: reorder to first check if player has any factions at all
...
There is no point in checking other params if this part fails.
2024-09-14 23:33:49 +02:00
Luke aka SwissalpS
442c2c5209
remove code that is never reached
2024-09-14 23:27:22 +02:00
Luke aka SwissalpS
0063990b28
Don't show password, since we can't anymore
2024-09-14 14:20:04 +02:00
Luke aka SwissalpS
8f249e27cc
Properly use the configurable admin priv in output
2024-09-11 11:03:32 +02:00
Luke aka SwissalpS
d09b01a397
loaded message
2024-09-11 10:51:57 +02:00
Luke aka SwissalpS
0163900ce9
Depricate factions.get_password()
...
returns nil after first run
2024-09-11 10:50:52 +02:00
Luke aka SwissalpS
b864fcafe1
Store hashes of passwords
...
cleartext password storage is bad practice.
2024-09-11 10:49:17 +02:00
Niklp
755a780122
allow custom factions_admin priv ( #7 )
2023-04-14 18:35:31 +02:00
Luke aka SwissalpS
77fe095ac8
nil check patch ( #5 )
...
* nil check patch
2021-12-21 07:15:29 +02:00
BuckarooBanzay
19cb21ee1a
add luacheck, workflow and fix some issues
2021-05-16 18:52:10 +02:00
ulysse
0d19660379
fix error in case handling
2021-04-02 22:03:19 +02:00
ulysse
0c0e7548c1
changed command outcomes in chat message to return string
2021-04-02 22:03:19 +02:00
ulysse
83a63c1335
removed extra parameter
2021-04-02 22:03:19 +02:00
Buckaroo Banzai
18eef7c90e
Merge pull request #2 from IRI-Research/master
...
Add checks on command args to avoid server crashes
2021-04-01 19:55:13 +02:00
Yves-Marie Haussonne
0612afb338
Add checks on command args to avoid server crashes
2021-03-31 18:25:36 +02:00
BuckarooBanzay
639f5aa716
check if player faction is nil
2020-10-27 13:32:02 +01:00
Louis Royer
50335b7ceb
Add missing french translations I forgot in my last PR
...
because of the "exclude all files by default" policy in .gitignore.
2020-08-23 14:32:56 +02:00
Supergoat666
d77af6ecac
Fix grammar and add README
2020-08-22 23:58:18 +00:00
Supergoat666
cc0ae096d8
fix player name in /factions player_info
2020-08-22 23:58:18 +00:00
Supergoat666
44ffad45b9
Improve get_player_factions, get_owned_factions and get_administred_factions to return nil if there is no faction corresponding
2020-08-22 23:58:18 +00:00
Supergoat666
cac9740440
Add a command to see what faction a player is in, and what of them are owned by himself + improve get_player_factions, get_owned_factions and get_administred_factions to return nil if there is no faction corresponding
2020-08-22 23:58:18 +00:00
Supergoat666
d90a6d6dda
fix get_facts
2020-08-22 23:58:18 +00:00
Louis Royer
8b6730afe6
Port from intllib to builting MT5 client-side translation system
...
- Add french translations
2020-08-20 18:57:22 +02:00
Katherine Peeters
8d6d699f45
Updated credits
2020-08-20 11:19:16 -04:00
Supergoat666
fd8680b3f6
Change the way to configure : now using minetest.conf
2020-08-20 03:06:02 +02:00
Supergoat666
fa20136630
Remove test function 'ses' that I forget
2020-08-18 14:03:21 +02:00
Supergoat666
63485e4b7a
Improve settings reading
2020-08-18 13:55:55 +02:00