test-client-godot/assets/Scripts/Models/nel_login_message.gd

33 lines
949 B
GDScript3
Raw Normal View History

2018-10-04 15:14:22 +00:00
class nel_login_message:
var _cmd;
var _login;
var _password;
var _clientApplication;
var _cp;
var _lg;
func _init(cmd, login, password, clientApplication, cp, lg):
self._cmd = cmd;
self._login = login;
self._password = password;
self._clientApplication = clientApplication;
self._cp = cp;
self._lg = lg;
func get_request_string():
var request_string = "cmd=" + self._cmd;
if self._login != "":
request_string += "&login=" + self._login;
if self._password != "":
request_string += "&password=" + self._password;
if self._clientApplication != "":
2018-10-04 15:26:32 +00:00
request_string += "&clientApplication=" + self._clientApplication;
2018-10-04 15:14:22 +00:00
if self._cp != "":
2018-10-04 15:26:32 +00:00
request_string += "&cp=" + self._cp;
2018-10-04 15:14:22 +00:00
if self._lg != "":
2018-10-04 15:26:32 +00:00
request_string += "&lg=" + self._lg;
2018-10-04 15:14:22 +00:00
return request_string;