khanat-client/ressources/scripts/nel/nel_login_message.gd
2020-03-21 10:10:26 +01:00

30 lines
947 B
GDScript

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 != "":
request_string += "&clientApplication=" + self._clientApplication;
if self._cp != "":
request_string += "&cp=" + self._cp;
if self._lg != "":
request_string += "&lg=" + self._lg;
return request_string;