mirror of
https://github.com/ShaYmez/xlxd.git
synced 2024-12-22 09:31:14 -05:00
allow YSF clients to change linked module by DG-ID
This commit is contained in:
parent
3c3367fee6
commit
32c9e0ce8f
@ -132,6 +132,19 @@ void CYsfProtocol::Task(void)
|
||||
//std::cout << "YSF DV header:" << std::endl << *Header << std::endl;
|
||||
//std::cout << "YSF DV header:" << std::endl;
|
||||
|
||||
// handle changing linked module by DG-ID
|
||||
if ( (Fich.getSQ() >= 1) && (Fich.getSQ() <= NB_OF_MODULES) ) {
|
||||
char cModule = 'A' + (char)(Fich.getSQ() - 1);
|
||||
CClient *client = g_Reflector.GetClients()->FindClient(Ip, PROTOCOL_YSF);
|
||||
if ( client != NULL ) {
|
||||
if ( client->GetReflectorModule() != cModule ) {
|
||||
std::cout << "YSF client " << client->GetCallsign() << " linking by DG-ID on module " << cModule << std::endl;
|
||||
client->SetReflectorModule(cModule);
|
||||
}
|
||||
}
|
||||
g_Reflector.ReleaseClients();
|
||||
}
|
||||
|
||||
// node linked and callsign muted?
|
||||
if ( g_GateKeeper.MayTransmit(Header->GetMyCallsign(), Ip, PROTOCOL_YSF, Header->GetRpt2Module()) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user