Skip to content

Conversation

Fernando-A-Rocha
Copy link
Contributor

@Fernando-A-Rocha Fernando-A-Rocha commented Jan 16, 2023

List of changes

  • moved admin ip2c code to new resource "ip2c" inside [admin] (issue New ip2c resource #222)
  • left placeholder exported function getPlayerCountry in admin for BC (see comments below)
  • updated scoreboard setting "Country" data
  • updated scoreboard /setcountry to warn when ip2c resource is not running (enhancement)
  • ip2c exported function getPlayerCountry used in scoreboard, admin and admin2
  • admin and admin2 start/stop ip2c depending on resource setting "*useip2c"
  • admin and admin2 receive player country updates when ip2c is started/stopped
  • scoreboard receives player country updates when ip2c is started/stopped
  • deleted duplicated country flag images in admin2
  • removed admin2 implementation of ip2c
  • added ip2c getCountryName exported function (shared)
  • admin2 player data "countryname" is set correctly using the function mentioned above
  • all missing country flag images added, some fixed & others removed from meta.xml due to being invalid (issue Missing/wrong country flags #318)

Description

ip2c is an optional resource that, when running, will fetch player countries via IP using a list provided by MTA HQ.
It can also convert country code to country name using the ISO 3166 standard.
admin & admin2 are responsible for starting/stopping ip2c based on resource setting "*useip2c".
scoreboard detects when ip2c is started/stopped.

Note

MTA HQ IpToCountryCompact.csv (Direct download link) - used in ip2c/server.lua.

Thank you

@Fernando-A-Rocha
Copy link
Contributor Author

Let me know if you want anything changed, I'm all ears.

@Dutchman101 Dutchman101 self-requested a review January 21, 2023 21:22
Copy link
Member

@Dutchman101 Dutchman101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're awaiting feedback from this convo on development discord:
image
Either option has to be implemented, requesting input from @jlillis (AGENT_STEELMEAT)

@Fernando-A-Rocha Fernando-A-Rocha force-pushed the ip2c-standalone-resource branch from 4d48b98 to aeb79eb Compare January 21, 2023 21:26
This reverts commit aeb79eb.
Outputs server log deprecation warning if any external scripts call this function.
@Fernando-A-Rocha
Copy link
Contributor Author

We're awaiting feedback from this convo on development discord: image Either option has to be implemented, requesting input from @jlillis (AGENT_STEELMEAT)

After further discussion, option 2 (placeholder function in admin) has been implemented (see bd1e9c5).

Ready for review.

Copy link
Contributor

@jlillis jlillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only have a few minor things worth considering but this is great work and ready to merge as is. Unless anyone has further feedback I'll merge it in 3 days.

@jlillis jlillis dismissed Dutchman101’s stale review January 28, 2023 01:11

Requested changes implemented

@jlillis jlillis merged commit f64d657 into multitheftauto:master Jan 28, 2023
This was referenced Jan 28, 2023
@Fernando-A-Rocha Fernando-A-Rocha deleted the ip2c-standalone-resource branch February 1, 2023 10:56
@patrikjuvonen patrikjuvonen added this to the 1.6.0 milestone Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants