Commit bcb39585 authored by helene ortiz's avatar helene ortiz
Browse files

store user and instrumentname in SessionManager

parent b8b9a332
...@@ -80,7 +80,7 @@ public class ChatEvent { ...@@ -80,7 +80,7 @@ public class ChatEvent {
if (ConfigManager.getInstance().isMainClient()) { if (ConfigManager.getInstance().isMainClient()) {
return sender.equals(SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).getInstrumentName()); return sender.equals(SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).getInstrumentName());
} else { } else {
return sender.equals("toto"); return sender.equals(SessionManager.getInstance(CommandZoneWrapper.SERVER_ID).getUserName());
} }
} }
......
...@@ -38,7 +38,7 @@ public class SessionManager { ...@@ -38,7 +38,7 @@ public class SessionManager {
private int clientId = 0; private int clientId = 0;
// If remote access // If remote access
private String user; private String userName;
private String password; private String password;
private String instrumentName; private String instrumentName;
...@@ -310,13 +310,19 @@ public class SessionManager { ...@@ -310,13 +310,19 @@ public class SessionManager {
return clientId; return clientId;
} }
public void setRemoteAccessInformation(String user, String password, String instrumentName) { public void setSessionInformation(String userName, String password, String instrumentName) {
this.user = user; this.userName = userName;
this.password = password; this.password = password;
this.instrumentName = instrumentName; this.instrumentName = instrumentName;
} }
public String getInstrumentName() { public String getInstrumentName() {
return instrumentName; return instrumentName;
} }
public String getUserName() {
return userName;
}
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment