1st version that works

This commit is contained in:
2022-03-14 11:53:00 +02:00
parent ee2884b2ff
commit 3806d2c80d
617 changed files with 17293 additions and 4470 deletions

View File

@ -0,0 +1,42 @@
package com.safemobile.lib;
import java.util.ArrayList;
import com.safemobile.lib.User;
public class LoginMSG extends TCPmsg{
public ArrayList<User> userList;
public LoginMSG(TCPmsg m) {
super(m);
userList = new ArrayList<User>();
String date4parsing = super.data;
//SM.Debug("date4parsing:"+date4parsing);
String[] tempArr = date4parsing.split(";");
for(int i =0; i<tempArr.length;i++)
{
//SM.Debug("i:" + i+"Data :"+tempArr[i]);
String[] tempUser = tempArr[i].split("&");
//SM.Debug("split len:"+tempUser.length);
if(tempUser.length<3)
continue;
int ID = Integer.parseInt(tempUser[1]);
String logName = tempUser[0];
String pass = tempUser[2];
User usr= new User(ID, "", "", logName, pass, 0, 0);
userList.add(usr);
//SM.Debug("added user to list:" +logName);
//SM.Debug("LoginMSG new size:" +this.userList.size());
}
//SM.Debug("LoginMSG userList:" +this.userList.size());
}
}