void CreateNewAccountAndCharacter(char *name,char *password) { user_node *u; int account_id; if (ConfigBool(DEBUG_SMTP)) { dprintf("name = %s\n",name); dprintf("password = %s\n",password); } if (CreateAccount(name,password,ACCOUNT_NORMAL,&account_id) == False) { lprintf("CreateNewAccountAndCharacter tried to create account %s which already exists\n", name); return; } u = CreateNewUser(account_id,USER_CLASS); if (u == NULL) { eprintf("CreateNewAccountAndCharacter can't find just created user for account %i!\n", account_id); return; } lprintf("Created account %i (%s), object %i\n",account_id,name,u->object_id); }
void CreateUseronAccount(account_node *a) { CreateNewUser(a->account_id,USER_CLASS); }