Module ctr.cfgu
The cfgu module.
Used to get some user config.
Usage:
local cfgu = require("ctr.cfgu")
Functions
init () | Initialize the CFGU module. |
shutdown () | Disable the CFGU module. |
getRegion () | Return the console region. |
getModel () | Return the system model. |
getLanguage () | Return the system language. |
genHash (salt) | Generate an unique hash from the console ID. |
getUsername () | Return the username. |
getBirthday () | Return the user birthday. |
Fields
REGION_JPN | Constant returned by getRegion if the console is from Japan. |
REGION_USA | Constant returned by getRegion if the console is from USA. |
REGION_EUR | Constant returned by getRegion if the console is from Europe. |
REGION_AUS | Constant returned by getRegion if the console is from Australia. |
REGION_CHN | Constant returned by getRegion if the console is from China. |
REGION_KOR | Constant returned by getRegion if the console is from Korea. |
REGION_TWN | Constant returned by getRegion if the console is from Taiwan. |
LANGUAGE_JP | Constant returned by getLanguage if the language is Japanese. |
LANGUAGE_EN | Constant returned by getLanguage if the language is English. |
LANGUAGE_FR | Constant returned by getLanguage if the language is French. |
LANGUAGE_DE | Constant returned by getLanguage if the language is German. |
LANGUAGE_IT | Constant returned by getLanguage if the language is Italian. |
LANGUAGE_ES | Constant returned by getLanguage if the language is Spanish. |
LANGUAGE_ZH | Constant returned by getLanguage if the language is Chinese. |
LANGUAGE_KO | Constant returned by getLanguage if the language is Korean. |
LANGUAGE_NL | Constant returned by getLanguage if the language is Dutch. |
LANGUAGE_PT | Constant returned by getLanguage if the language is Portuguese. |
LANGUAGE_RU | Constant returned by getLanguage if the language is Russian. |
LANGUAGE_TW | Constant returned by getLanguage if the language is Taiwanese. |
MODEL_3DS | Constant returned by getModel if the console is a 3DS. |
MODEL_3DSXL | Constant returned by getModel if the console is a 3DS XL. |
MODEL_N3DS | Constant returned by getModel if the console is a New 3DS. |
MODEL_2DS | Constant returned by getModel if the console is a 2DS. |
MODEL_N3DSXL | Constant returned by getModel if the console is a New 3DS XL. |
Functions
- init ()
- Initialize the CFGU module.
- shutdown ()
- Disable the CFGU module.
- getRegion ()
-
Return the console region.
Returns:
-
number
region
- getModel ()
-
Return the system model.
Returns:
-
number
model
- getLanguage ()
-
Return the system language.
Returns:
-
number
language
- genHash (salt)
-
Generate an unique hash from the console ID.
Parameters:
- salt number 20-bits salt
Returns:
-
number
64-bits hash
- getUsername ()
-
Return the username.
Returns:
-
string
username
- getBirthday ()
-
Return the user birthday.
Returns:
- number month
- number day
Fields
- REGION_JPN
-
Constant returned by getRegion if the console is from Japan.
It is equal to
0
.- REGION_JPN
- REGION_USA
-
Constant returned by getRegion if the console is from USA.
It is equal to
1
.- REGION_USA
- REGION_EUR
-
Constant returned by getRegion if the console is from Europe.
It is equal to
2
.- REGION_EUR
- REGION_AUS
-
Constant returned by getRegion if the console is from Australia.
It is equal to
3
.- REGION_AUS
- REGION_CHN
-
Constant returned by getRegion if the console is from China.
It is equal to
4
.- REGION_CHN
- REGION_KOR
-
Constant returned by getRegion if the console is from Korea.
It is equal to
5
.- REGION_KOR
- REGION_TWN
-
Constant returned by getRegion if the console is from Taiwan.
It is equal to
6
.- REGION_TWN
- LANGUAGE_JP
-
Constant returned by getLanguage if the language is Japanese.
It is equal to
0
.- LANGUAGE_JP
- LANGUAGE_EN
-
Constant returned by getLanguage if the language is English.
It is equal to
1
.- LANGUAGE_EN
- LANGUAGE_FR
-
Constant returned by getLanguage if the language is French.
It is equal to
2
.- LANGUAGE_FR
- LANGUAGE_DE
-
Constant returned by getLanguage if the language is German.
It is equal to
3
.- LANGUAGE_DE
- LANGUAGE_IT
-
Constant returned by getLanguage if the language is Italian.
It is equal to
4
.- LANGUAGE_IT
- LANGUAGE_ES
-
Constant returned by getLanguage if the language is Spanish.
It is equal to
5
.- LANGUAGE_ES
- LANGUAGE_ZH
-
Constant returned by getLanguage if the language is Chinese.
It is equal to
6
.- LANGUAGE_ZH
- LANGUAGE_KO
-
Constant returned by getLanguage if the language is Korean.
It is equal to
7
.- LANGUAGE_KO
- LANGUAGE_NL
-
Constant returned by getLanguage if the language is Dutch.
It is equal to
8
.- LANGUAGE_NL
- LANGUAGE_PT
-
Constant returned by getLanguage if the language is Portuguese.
It is equal to
9
.- LANGUAGE_PT
- LANGUAGE_RU
-
Constant returned by getLanguage if the language is Russian.
It is equal to
10
.- LANGUAGE_RU
- LANGUAGE_TW
-
Constant returned by getLanguage if the language is Taiwanese.
It is equal to
11
.- LANGUAGE_TW
- MODEL_3DS
-
Constant returned by getModel if the console is a 3DS.
It is equal to
0
.- MODEL_3DS
- MODEL_3DSXL
-
Constant returned by getModel if the console is a 3DS XL.
It is equal to
1
.- MODEL_3DSXL
- MODEL_N3DS
-
Constant returned by getModel if the console is a New 3DS.
It is equal to
2
.- MODEL_N3DS
- MODEL_2DS
-
Constant returned by getModel if the console is a 2DS.
It is equal to
3
.- MODEL_2DS
- MODEL_N3DSXL
-
Constant returned by getModel if the console is a New 3DS XL.
It is equal to
4
.- MODEL_N3DSXL