summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-28 13:26:35 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-28 13:26:35 +0000
commit296cc8b832aeed7932327017c4489874725f82f1 (patch)
tree4a8df020ea14f4f18cd3d7429496381420e675e8
parent2b36c1771884ccfa13e1df460fb7f6c6c5a04d12 (diff)
downloadhercules-296cc8b832aeed7932327017c4489874725f82f1.tar.gz
hercules-296cc8b832aeed7932327017c4489874725f82f1.tar.bz2
hercules-296cc8b832aeed7932327017c4489874725f82f1.tar.xz
hercules-296cc8b832aeed7932327017c4489874725f82f1.zip
* Removed unmaintained and broken 'adduser' tool (topic:262284).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14636 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--readme/setup.html2
-rw-r--r--src/tool/Makefile.in12
-rw-r--r--src/tool/adduser.c103
4 files changed, 9 insertions, 113 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 237805ca3..0ca19ac69 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,7 +1,10 @@
Date Added
-2010/12/26
+2010/12/28
+ * Removed unmaintained and broken 'adduser' tool (topic:262284). [Ai4rei]
+2010/12/27
* Fixed skill_can_produce_mix not checking, whether or not the produced goods can actually be stored (bugreport:4674). [Ai4rei]
+2010/12/26
* Reverted r14565, as the database version is already properly commented in source and is overwritten upon first sync of account.txt anyway. [Ai4rei]
* Cleaned up script command checkweight. [Ai4rei]
- Replaced some code parts with calls to pc_checkadditem and pc_inventoryblank (follow up to r13735).
diff --git a/readme/setup.html b/readme/setup.html
index 72b06c40e..c4463ef89 100644
--- a/readme/setup.html
+++ b/readme/setup.html
@@ -92,7 +92,7 @@
It's extremely easy to set up eAthena, just follow these simple steps.
<ol>
<li>Edit motd.txt, grf-files.txt and the .conf files in your /conf/ folder as you see fit</li>
- <li>If you want to add a user, run adduser.exe in the main eAthena directory before starting the server.</li>
+ <li>If you want to add a user, edit save/account.txt in the main eAthena directory before starting the server.</li>
<li>Run runserver.bat or runserver-sql.bat (depending on which storage system you're using, or you could run login-server.exe, char-server.exe, and map-server.exe manually)</li>
<li>Give people your IP address (can be found at <a href="http://www.whatismyip.com">http://www.whatismyip.com</a>) to people to add in their sclientinfo.xml</li>
<li>You're done!</li>
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index 78300a68c..61a54709d 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -2,22 +2,18 @@
@SET_MAKE@
#####################################################################
-.PHONY : all adduser mapcache clean help
+.PHONY : all mapcache clean help
-all: adduser mapcache
-
-adduser:
- @CC@ -o ../../tools/adduser@EXEEXT@ adduser.c
+all: mapcache
mapcache:
@CC@ -o ../../mapcache@EXEEXT@ mapcache.c grfio.c -lz
clean:
- rm -rf *.o ../../tools/adduser@EXEEXT@ ../../mapcache@EXEEXT@
+ rm -rf *.o ../../mapcache@EXEEXT@
help:
- @echo "possible targets are 'adduser' 'mapcache' 'all' 'clean' 'help'"
- @echo "'adduser' - ???"
+ @echo "possible targets are 'mapcache' 'all' 'clean' 'help'"
@echo "'mapcache' - mapcache generator"
@echo "'all' - builds all above targets"
@echo "'clean' - cleans builds and objects"
diff --git a/src/tool/adduser.c b/src/tool/adduser.c
deleted file mode 100644
index 5f4dfb6a5..000000000
--- a/src/tool/adduser.c
+++ /dev/null
@@ -1,103 +0,0 @@
-// (c) eAthena Dev Team - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
-/*
- This program adds an user to account.txt
- Don't usr it When login-sever is working.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-char *account_txt = "../save/account.txt";
-
-//-----------------------------------------------------
-// Function to suppress control characters in a string.
-//-----------------------------------------------------
-int remove_control_chars(char* str)
-{
- int i;
- int change = 0;
-
- for(i = 0; str[i]; i++) {
- if (iscntrl((unsigned char)(str[i]))) {
- str[i] = '_';
- change = 1;
- }
- }
-
- return change;
-}
-
-int main(int argc, char *argv[])
-{
- char username[24];
- char password[24];
- char sex[2];
-
- int next_id, id;
- char line[1024];
- FILE *FPaccin,*FPaccout;
-
- // Check to see if account.txt exists.
- printf("Checking if '%s' file exists...\n", account_txt);
- FPaccin = fopen(account_txt, "r");
- if (FPaccin == NULL) {
- printf("'%s' file not found!\n", account_txt);
- printf("Run the setup wizard please.\n");
- exit(EXIT_SUCCESS);
- }
-
- next_id = 2000000;
- while(fgets(line, sizeof(line), FPaccin))
- {
- if (line[0] == '/' && line[1] == '/') { continue; }
- if (sscanf(line, "%d\t%%newid%%\n", &id) == 1) {
- if (next_id < id) {
- next_id = id;
- }
- } else {
- sscanf(line,"%i%[^ ]", &id);
- if (next_id <= id) {
- next_id = id +1;
- }
- }
- }
- fclose(FPaccin);
- printf("File exists.\n");
-
- printf("Don't create an account if the login-server is online!!!\n");
- printf("If the login-server is online, press ctrl+C now to stop this software.\n");
- printf("\n");
-
- strcpy(username, "");
- while (strlen(username) < 4 || strlen(username) > 23) {
- printf("Enter an username (4-23 characters): ");
- scanf("%s", username);
- username[23] = 0;
- remove_control_chars(username);
- }
-
- strcpy(password, "");
- while (strlen(password) < 4 || strlen(password) > 23) {
- printf("Enter a password (4-23 characters): ");
- scanf("%s", password);
- password[23] = 0;
- remove_control_chars(password);
- }
-
- strcpy(sex, "");
- while (strcmp(sex, "F") != 0 && strcmp(sex, "M") != 0) {
- printf("Enter a gender (M for male, F for female): ");
- scanf("%s", sex);
- }
-
- FPaccout = fopen(account_txt, "r+");
- fseek(FPaccout, 0, SEEK_END);
- fprintf(FPaccout, "%i %s %s - %s -\r\n", next_id, username, password, sex);
- fclose(FPaccout);
-
- printf("Account added.\n");
-}