luc4r4t0r
New Member
Hello SinusBot users / developers,
I need your help, because I made a small mistake in my self-coded script ir even found a Bug.
First of all I will describe my script:
It's made for Registering clients TSUUID & an associating them with Groups, which are stored in their User account on my MariaDB/ MySQL server. To do that it sends a http-request to a website coded in php, which does the actual sql-work. To this website it sends as an argument in the url (?tsuid=...) the UUID of the user and gets in exchange users group(s). Not implemented yet:{After that it removes all of the users groups...} ... and associates the groups which are assigned to that user with it.
The actual problem is the the final step of association:
the Method addClientToServerGroup()
as an example the association of an admin:
Everytime the Code above is executet nothing except an error-message in the log happens.
this error-message says:
2016/11/05 17:43:42 8391d171 dc6a0699 DEBUG Found Callback PR:{a0c4e082-aac1-4167-8aeb-1e12d4a3348f}:261/SGRA
2016/11/05 17:43:42 8391d171 dc6a0699 DEBUG TS/ERR 2561 e'duplicate entry' x'' r'PR:{a0c4e082-aac1-4167-8aeb-1e12d4a3348f}:261/SGRA'
2016/11/05 17:43:42 8391d171 dc6a0699 INFO Could not add client to group: duplicate entry
2016/11/05 17:43:42 8391d171 dc6a0699 DEBUG Awaiting Callback (1): PR:{a0c4e082-aac1-4167-8aeb-1e12d4a3348f}:262/SGRA
And I think that is very strange not had any groups associated on join which should
exclude duplicate groups.
Sorry for my bad English and thank you beforehand.
LUC4R4T0R
I need your help, because I made a small mistake in my self-coded script ir even found a Bug.
First of all I will describe my script:
It's made for Registering clients TSUUID & an associating them with Groups, which are stored in their User account on my MariaDB/ MySQL server. To do that it sends a http-request to a website coded in php, which does the actual sql-work. To this website it sends as an argument in the url (?tsuid=...) the UUID of the user and gets in exchange users group(s). Not implemented yet:{After that it removes all of the users groups...} ... and associates the groups which are assigned to that user with it.
The actual problem is the the final step of association:
the Method addClientToServerGroup()
as an example the association of an admin:
Code:
if(res.data=='admin'){
addClientToServerGroup(ev.clientId, '6');
addClientToServerGroup(ev.clientId, '7');
addClientToServerGroup(ev.clientId, '19');
}
Everytime the Code above is executet nothing except an error-message in the log happens.
this error-message says:
2016/11/05 17:43:42 8391d171 dc6a0699 DEBUG Found Callback PR:{a0c4e082-aac1-4167-8aeb-1e12d4a3348f}:261/SGRA
2016/11/05 17:43:42 8391d171 dc6a0699 DEBUG TS/ERR 2561 e'duplicate entry' x'' r'PR:{a0c4e082-aac1-4167-8aeb-1e12d4a3348f}:261/SGRA'
2016/11/05 17:43:42 8391d171 dc6a0699 INFO Could not add client to group: duplicate entry
2016/11/05 17:43:42 8391d171 dc6a0699 DEBUG Awaiting Callback (1): PR:{a0c4e082-aac1-4167-8aeb-1e12d4a3348f}:262/SGRA
And I think that is very strange not had any groups associated on join which should
exclude duplicate groups.
Sorry for my bad English and thank you beforehand.
LUC4R4T0R