diff --git a/YSFGateway/Conf.cpp b/YSFGateway/Conf.cpp index 2cb7413..2b60018 100644 --- a/YSFGateway/Conf.cpp +++ b/YSFGateway/Conf.cpp @@ -48,7 +48,6 @@ m_rptAddress(), m_rptPort(0U), m_myAddress(), m_myPort(0U), -m_wiresXMakeUpper(true), m_wiresXCommandPassthrough(false), m_debug(false), m_daemon(false), @@ -190,8 +189,6 @@ bool CConf::read() m_myAddress = value; else if (::strcmp(key, "LocalPort") == 0) m_myPort = (unsigned short)::atoi(value); - else if (::strcmp(key, "WiresXMakeUpper") == 0) - m_wiresXMakeUpper = ::atoi(value) == 1; else if (::strcmp(key, "WiresXCommandPassthrough") == 0) m_wiresXCommandPassthrough = ::atoi(value) == 1; else if (::strcmp(key, "Debug") == 0) @@ -339,11 +336,6 @@ unsigned short CConf::getMyPort() const return m_myPort; } -bool CConf::getWiresXMakeUpper() const -{ - return m_wiresXMakeUpper; -} - bool CConf::getWiresXCommandPassthrough() const { return m_wiresXCommandPassthrough; diff --git a/YSFGateway/Conf.h b/YSFGateway/Conf.h index 1d11e39..d91c118 100644 --- a/YSFGateway/Conf.h +++ b/YSFGateway/Conf.h @@ -37,7 +37,6 @@ public: unsigned short getRptPort() const; std::string getMyAddress() const; unsigned short getMyPort() const; - bool getWiresXMakeUpper() const; bool getWiresXCommandPassthrough() const; bool getDebug() const; bool getDaemon() const; @@ -112,7 +111,6 @@ private: unsigned short m_rptPort; std::string m_myAddress; unsigned short m_myPort; - bool m_wiresXMakeUpper; bool m_wiresXCommandPassthrough; bool m_debug; bool m_daemon; diff --git a/YSFGateway/YSFGateway.cpp b/YSFGateway/YSFGateway.cpp index 5d4097b..d51385d 100644 --- a/YSFGateway/YSFGateway.cpp +++ b/YSFGateway/YSFGateway.cpp @@ -279,9 +279,8 @@ int CYSFGateway::run() std::string fileName = m_conf.getYSFNetworkHosts(); unsigned int reloadTime = m_conf.getYSFNetworkReloadTime(); - bool wiresXMakeUpper = m_conf.getWiresXMakeUpper(); - m_reflectors = new CYSFReflectors(fileName, reloadTime, wiresXMakeUpper); + m_reflectors = new CYSFReflectors(fileName, reloadTime); m_reflectors->reload(); createWiresX(&rptNetwork); diff --git a/YSFGateway/YSFGateway.ini b/YSFGateway/YSFGateway.ini index 55132f9..0f4b7f8 100644 --- a/YSFGateway/YSFGateway.ini +++ b/YSFGateway/YSFGateway.ini @@ -7,7 +7,6 @@ RptAddress=127.0.0.1 RptPort=3200 LocalAddress=127.0.0.1 LocalPort=4200 -WiresXMakeUpper=1 WiresXCommandPassthrough=0 Debug=0 Daemon=0 diff --git a/YSFGateway/YSFReflectors.cpp b/YSFGateway/YSFReflectors.cpp index f7e5384..42ba1c9 100644 --- a/YSFGateway/YSFReflectors.cpp +++ b/YSFGateway/YSFReflectors.cpp @@ -26,7 +26,7 @@ #include #include -CYSFReflectors::CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime, bool makeUpper) : +CYSFReflectors::CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime) : m_hostsFile(hostsFile), m_parrotAddress(), m_parrotPort(0U), @@ -40,7 +40,6 @@ m_fcsRooms(), m_newReflectors(), m_currReflectors(), m_search(), -m_makeUpper(makeUpper), m_timer(1000U, reloadTime * 60U) { if (reloadTime > 0U) @@ -284,13 +283,6 @@ bool CYSFReflectors::load() if (size == 0U) return false; - if (m_makeUpper) { - for (std::vector::iterator it = m_newReflectors.begin(); it != m_newReflectors.end(); ++it) { - std::transform((*it)->m_name.begin(), (*it)->m_name.end(), (*it)->m_name.begin(), ::toupper); - std::transform((*it)->m_desc.begin(), (*it)->m_desc.end(), (*it)->m_desc.begin(), ::toupper); - } - } - std::sort(m_newReflectors.begin(), m_newReflectors.end(), refComparison); return true; @@ -324,9 +316,6 @@ bool CYSFReflectors::findById(unsigned int id) const CYSFReflector* CYSFReflectors::findByName(const std::string& name) { std::string fullName = name; - if (m_makeUpper) { - std::transform(fullName.begin(), fullName.end(), fullName.begin(), ::toupper); - } fullName.resize(16U, ' '); for (std::vector::const_iterator it = m_currReflectors.cbegin(); it != m_currReflectors.cend(); ++it) { diff --git a/YSFGateway/YSFReflectors.h b/YSFGateway/YSFReflectors.h index a0da0e1..3d1c42d 100644 --- a/YSFGateway/YSFReflectors.h +++ b/YSFGateway/YSFReflectors.h @@ -56,7 +56,7 @@ public: class CYSFReflectors { public: - CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime, bool makeUpper); + CYSFReflectors(const std::string& hostsFile, unsigned int reloadTime); ~CYSFReflectors(); void setParrot(const std::string& address, unsigned short port); @@ -92,7 +92,6 @@ private: std::vector m_newReflectors; std::vector m_currReflectors; std::vector m_search; - bool m_makeUpper; CTimer m_timer; bool findById(unsigned int id) const;