Remove Quadnet specific messages

develop^2
Geoffrey Merck 5 years ago
parent 1ee39161ed
commit 8001a7b2ba

@ -974,8 +974,6 @@ void CGroupHandler::updateReflectorInfo()
info.resize(20, '_');
CUtils::ReplaceChar(info, ' ', '_');
parms.push_back(info);
m_irc->sendSGSInfo(subcommand, parms);
}
void CGroupHandler::logUser(LOGUSER lu, const std::string channel, const std::string user)
@ -988,7 +986,6 @@ void CGroupHandler::logUser(LOGUSER lu, const std::string channel, const std::st
std::vector<std::string> parms;
parms.push_back(chn);
parms.push_back(usr);
m_irc->sendSGSInfo(cmd, parms);
}
void CGroupHandler::sendToRepeaters(CHeaderData& header) const

@ -111,9 +111,6 @@ public:
// Send query for a user, a false return implies a network error
virtual bool findUser(const std::string& userCallsign) = 0;
// Support for the Smart Group Server
virtual void sendSGSInfo(const std::string subcommand, const std::vector<std::string> parms) = 0;
// The following functions are for processing received messages
// Get the waiting message type

@ -550,22 +550,6 @@ bool IRCDDBApp::findRepeater(const std::string& rptrCall)
return true;
}
void IRCDDBApp::sendSGSInfo(const std::string &subcommand, const std::vector<std::string> &pars)
{
IRCMessageQueue *q = getSendQ();
std::string srv(d->currentServer);
if (srv.size() && d->state>=6 && q) {
std::string command("SGS ");
command.append(subcommand);
for (auto it=pars.begin(); it!=pars.end(); it++) {
command.push_back(' ');
command.append(*it);
}
IRCMessage *m = new IRCMessage(srv, command);
q->putMessage(m);
}
}
bool IRCDDBApp::sendHeard(const std::string& myCall, const std::string& myCallExt, const std::string& yourCall, const std::string& rpt1, const std::string& rpt2, unsigned char flag1,
unsigned char flag2, unsigned char flag3, const std::string& destination, const std::string& tx_msg, const std::string& tx_stats)
{

@ -70,8 +70,6 @@ public:
bool sendHeard(const std::string& myCall, const std::string& myCallExt, const std::string& yourCall, const std::string& rpt1, const std::string& rpt2, unsigned char flag1,
unsigned char flag2, unsigned char flag3, const std::string& destination, const std::string& tx_msg, const std::string& tx_stats);
void sendSGSInfo(const std::string &subcommand, const std::vector<std::string> &pars);
int getConnectionState();
void rptrQRG(const std::string& callsign, double txFrequency, double duplexShift, double range, double agl);

@ -30,9 +30,8 @@ struct CIRCDDBClientPrivate
IRCDDBApp *app;
};
CIRCDDBClient::CIRCDDBClient(const std::string& hostName, unsigned int port, const std::string& callsign, const std::string& password, const std::string& versionInfo, const std::string& localAddr, bool isQuadNet ) :
d(new CIRCDDBClientPrivate),
m_isQuadNet(isQuadNet)
CIRCDDBClient::CIRCDDBClient(const std::string& hostName, unsigned int port, const std::string& callsign, const std::string& password, const std::string& versionInfo, const std::string& localAddr) :
d(new CIRCDDBClientPrivate)
{
std::string update_channel("#dstar");
d->app = new IRCDDBApp(update_channel);
@ -114,17 +113,6 @@ bool CIRCDDBClient::sendHeard( const std::string& myCall, const std::string& myC
return d->app->sendHeard(myCall, myCallExt, yourCall, rpt1, rpt2, flag1, flag2, flag3, std::string(" "), std::string(""), std::string(""));
}
void CIRCDDBClient::sendSGSInfo(const std::string subcommand, const std::vector<std::string> parms)
{
printf("CIRCDDBClient::sendSGSInfo subcommand %s parms", subcommand.c_str());
for(unsigned int i=0; i < parms.size();i++)
printf(" %s", parms[i].c_str());
printf("\n");
if(m_isQuadNet) {
d->app->sendSGSInfo(subcommand, parms);
}
}
// Send heard data, a false return implies a network error
bool CIRCDDBClient::sendHeardWithTXMsg(const std::string& myCall, const std::string& myCallExt, const std::string& yourCall, const std::string& rpt1,

@ -33,7 +33,7 @@ struct CIRCDDBPrivate;
class CIRCDDBClient : public CIRCDDB{
public:
CIRCDDBClient(const std::string& hostName, unsigned int port, const std::string& callsign, const std::string& password, const std::string& versionInfo,
const std::string& localAddr = std::string(""), bool isQuadNet = false);
const std::string& localAddr = std::string(""));
~CIRCDDBClient();
// A false return implies a network error, or unable to log in
@ -106,9 +106,6 @@ public:
// Send query for a user, a false return implies a network error
bool findUser(const std::string& userCallsign);
// Support for the Smart Group Server
void sendSGSInfo(const std::string subcommand, const std::vector<std::string> parms);
// The following functions are for processing received messages
// Get the waiting message type
@ -132,7 +129,6 @@ public:
private:
struct CIRCDDBClientPrivate * const d;
bool m_isQuadNet;
};

@ -137,13 +137,6 @@ bool CIRCDDBMultiClient::sendHeardWithTXStats(const std::string & myCall, const
return result;
}
void CIRCDDBMultiClient::sendSGSInfo(const std::string subcommand, const std::vector<std::string> parms)
{
for (unsigned int i = 0; i < m_clients.size(); i++) {
m_clients[i]->sendSGSInfo(subcommand, parms);
}
}
bool CIRCDDBMultiClient::findGateway(const std::string & gatewayCallsign)
{
pushQuery(IDRT_GATEWAY, gatewayCallsign, new CIRCDDBMultiClientQuery("", "", gatewayCallsign, "", "", IDRT_GATEWAY));

@ -154,7 +154,6 @@ public:
virtual bool receiveGateway(std::string & gatewayCallsign, std::string & address);
virtual bool receiveUser(std::string & userCallsign, std::string & repeaterCallsign, std::string & gatewayCallsign, std::string & address);
virtual bool receiveUser(std::string & userCallsign, std::string & repeaterCallsign, std::string & gatewayCallsign, std::string & address, std::string & timeStamp);
virtual void sendSGSInfo(const std::string subcommand, const std::vector<std::string> parms);
virtual void close();
//

@ -109,10 +109,9 @@ bool CSGSXLApp::createThread()
CIRCDDB_Array clients;
for(unsigned int i=0; i < config.getIrcDDBCount(); i++) {
std::string hostname, username, password;
bool isQuadNet;
config.getIrcDDB(i, hostname, username, password, isQuadNet);
std::cout << "ircDDB " << i + 1 << " set to " << hostname << " username set to " << username << " QuadNet " << isQuadNet << std::endl;
CIRCDDB *ircDDB = new CIRCDDBClient(hostname, 9007U, username, password, std::string("linux_SmartGroupServerXL-") + VERSION, address, isQuadNet);
config.getIrcDDB(i, hostname, username, password);
std::cout << "ircDDB " << i + 1 << " set to " << hostname << " username set to " << username << std::endl;
CIRCDDB *ircDDB = new CIRCDDBClient(hostname, 9007U, username, password, std::string("linux_SmartGroupServerXL-") + VERSION, address);
clients.push_back(ircDDB);
}

@ -85,7 +85,6 @@ CSGSXLConfig::CSGSXLConfig(const std::string &pathname)
continue;
}
ircddb->isQuadNet = ircddb->hostname.find("openquad.net") != std::string::npos;
this->m_ircDDB.push_back(ircddb);
std::cout << "IRCDDB: host=" << ircddb->hostname << " user=" << ircddb->username << " password=" << ircddb->password << "\n";
}
@ -95,7 +94,6 @@ CSGSXLConfig::CSGSXLConfig(const std::string &pathname)
ircddb->hostname = "rr.openquad.net";
ircddb->password = "";
ircddb->username = m_callsign;
ircddb->isQuadNet = true;
this->m_ircDDB.push_back(ircddb);
std::cout << "No ircDDB networks configure'd, defaulting to IRCDDB: host=" << ircddb->hostname << " user=" << ircddb->username << " password=" << ircddb->password << "\n";
}
@ -362,12 +360,11 @@ void CSGSXLConfig::getGateway(std::string& callsign, std::string& address) const
address = m_address;
}
void CSGSXLConfig::getIrcDDB(unsigned int ircddb, std::string& hostname, std::string& username, std::string& password, bool &isQuadNet) const
void CSGSXLConfig::getIrcDDB(unsigned int ircddb, std::string& hostname, std::string& username, std::string& password) const
{
hostname = m_ircDDB[ircddb]->hostname;
username = m_ircDDB[ircddb]->username;
password = m_ircDDB[ircddb]->password;
isQuadNet = m_ircDDB[ircddb]->isQuadNet;
}
void CSGSXLConfig::getGroup(unsigned int mod, std::string& band, std::string& callsign, std::string& logoff, std::string& info, std::string& permanent, unsigned int& userTimeout, CALLSIGN_SWITCH& callsignSwitch, bool& txMsgSwitch, std::string& reflector) const

@ -40,7 +40,6 @@ struct SircDDB {
std::string hostname;
std::string username;
std::string password;
bool isQuadNet;
};
class CSGSXLConfig {
@ -50,7 +49,7 @@ public:
void getGateway(std::string &callsign, std::string &address) const;
void getIrcDDB(unsigned int ircddb, std::string &hostname, std::string &username, std::string &password, bool &isQuadNet) const;
void getIrcDDB(unsigned int ircddb, std::string &hostname, std::string &username, std::string &password) const;
void getGroup(unsigned int mod, std::string &band, std::string &callsign, std::string &logoff, std::string &info, std::string &permanent, unsigned int &userTimeout, CALLSIGN_SWITCH &callsignSwitch, bool &txMsgSwitch, std::string &reflector) const;

Loading…
Cancel
Save

Powered by TurnKey Linux.