diff --git a/GroupHandler.cpp b/GroupHandler.cpp index 38c803c..121fc94 100644 --- a/GroupHandler.cpp +++ b/GroupHandler.cpp @@ -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 parms; parms.push_back(chn); parms.push_back(usr); - m_irc->sendSGSInfo(cmd, parms); } void CGroupHandler::sendToRepeaters(CHeaderData& header) const diff --git a/IRCDDB.h b/IRCDDB.h index 83d5742..129ea66 100644 --- a/IRCDDB.h +++ b/IRCDDB.h @@ -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 parms) = 0; - // The following functions are for processing received messages // Get the waiting message type diff --git a/IRCDDBApp.cpp b/IRCDDBApp.cpp index 96064a2..2ce7ec2 100644 --- a/IRCDDBApp.cpp +++ b/IRCDDBApp.cpp @@ -550,22 +550,6 @@ bool IRCDDBApp::findRepeater(const std::string& rptrCall) return true; } -void IRCDDBApp::sendSGSInfo(const std::string &subcommand, const std::vector &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) { diff --git a/IRCDDBApp.h b/IRCDDBApp.h index 8fc77cf..3368fb1 100644 --- a/IRCDDBApp.h +++ b/IRCDDBApp.h @@ -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 &pars); - int getConnectionState(); void rptrQRG(const std::string& callsign, double txFrequency, double duplexShift, double range, double agl); diff --git a/IRCDDBClient.cpp b/IRCDDBClient.cpp index a278905..bf216e3 100644 --- a/IRCDDBClient.cpp +++ b/IRCDDBClient.cpp @@ -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 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, diff --git a/IRCDDBClient.h b/IRCDDBClient.h index 12666be..0e21eb8 100644 --- a/IRCDDBClient.h +++ b/IRCDDBClient.h @@ -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 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; }; diff --git a/IRCDDBMultiClient.cpp b/IRCDDBMultiClient.cpp index 54856ae..69f299c 100644 --- a/IRCDDBMultiClient.cpp +++ b/IRCDDBMultiClient.cpp @@ -137,13 +137,6 @@ bool CIRCDDBMultiClient::sendHeardWithTXStats(const std::string & myCall, const return result; } -void CIRCDDBMultiClient::sendSGSInfo(const std::string subcommand, const std::vector 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)); diff --git a/IRCDDBMultiClient.h b/IRCDDBMultiClient.h index 7d7d99e..9c45f80 100644 --- a/IRCDDBMultiClient.h +++ b/IRCDDBMultiClient.h @@ -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 parms); virtual void close(); // diff --git a/SGSXLApp.cpp b/SGSXLApp.cpp index 5729bd5..5bb95a0 100644 --- a/SGSXLApp.cpp +++ b/SGSXLApp.cpp @@ -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); } diff --git a/SGSXLConfig.cpp b/SGSXLConfig.cpp index 3d0d9c0..ef902db 100644 --- a/SGSXLConfig.cpp +++ b/SGSXLConfig.cpp @@ -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 diff --git a/SGSXLConfig.h b/SGSXLConfig.h index 9b401ea..246d9cb 100644 --- a/SGSXLConfig.h +++ b/SGSXLConfig.h @@ -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;