summaryrefslogtreecommitdiff
path: root/src/char/pincode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/pincode.c')
-rw-r--r--src/char/pincode.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/src/char/pincode.c b/src/char/pincode.c
index 18ad0ffc8..6034b5a0c 100644
--- a/src/char/pincode.c
+++ b/src/char/pincode.c
@@ -16,11 +16,12 @@
#include "../common/socket.h"
#include "../common/strlib.h"
-int enabled = PINCODE_OK;
-int changetime = 0;
-int maxtry = 3;
-int charselect = 0;
-unsigned int multiplier = 0x3498, baseSeed = 0x881234;
+int pincode_enabled = PINCODE_OK;
+int pincode_changetime = 0;
+int pincode_maxtry = 3;
+int pincode_charselect = 0;
+unsigned int pincode_multiplier = 0x3498;
+unsigned int pincode_baseSeed = 0x881234;
void pincode_handle ( int fd, struct char_session_data* sd ) {
struct online_char_data* character = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
@@ -155,23 +156,23 @@ bool pincode_config_read(char *w1, char *w2) {
while ( true ) {
if ( strcmpi(w1, "pincode_enabled") == 0 ) {
- enabled = atoi(w2);
+ pincode_enabled = atoi(w2);
#if PACKETVER < 20110309
- if( enabled ) {
+ if( pincode_enabled ) {
ShowWarning("pincode_enabled requires PACKETVER 20110309 or higher. disabling...\n");
- enabled = 0;
+ pincode_enabled = 0;
}
#endif
} else if ( strcmpi(w1, "pincode_changetime") == 0 ) {
- changetime = atoi(w2)*60;
+ pincode_changetime = atoi(w2)*60;
} else if ( strcmpi(w1, "pincode_maxtry") == 0 ) {
- maxtry = atoi(w2);
- if( maxtry > 3 ) {
- ShowWarning("pincode_maxtry is too high (%d); maximum allowed: 3! capping to 3...\n",maxtry);
- maxtry = 3;
+ pincode_maxtry = atoi(w2);
+ if( pincode_maxtry > 3 ) {
+ ShowWarning("pincode_maxtry is too high (%d); maximum allowed: 3! capping to 3...\n",pincode_maxtry);
+ pincode_maxtry = 3;
}
} else if ( strcmpi(w1, "pincode_charselect") == 0 ) {
- charselect = atoi(w2);
+ pincode_charselect = atoi(w2);
} else
return false;
@@ -184,12 +185,12 @@ bool pincode_config_read(char *w1, char *w2) {
void pincode_defaults(void) {
pincode = &pincode_s;
- pincode->enabled = &enabled;
- pincode->changetime = &changetime;
- pincode->maxtry = &maxtry;
- pincode->charselect = &charselect;
- pincode->multiplier = &multiplier;
- pincode->baseSeed = &baseSeed;
+ pincode->enabled = &pincode_enabled;
+ pincode->changetime = &pincode_changetime;
+ pincode->maxtry = &pincode_maxtry;
+ pincode->charselect = &pincode_charselect;
+ pincode->multiplier = &pincode_multiplier;
+ pincode->baseSeed = &pincode_baseSeed;
pincode->handle = pincode_handle;
pincode->decrypt = pincode_decrypt;