Add audio parameters to config

feature/AudioLoginLogoff
Geoffrey Merck 6 years ago
parent ff2a7a2683
commit 784b0f1f7c

@ -27,7 +27,6 @@
CSGSXLConfig::CSGSXLConfig(const std::string &pathname)
{
if (pathname.size() < 1) {
printf("Configuration filename too short!\n");
return;
@ -159,7 +158,7 @@ CSGSXLConfig::CSGSXLConfig(const std::string &pathname)
key.str("");key.clear();
key << "module.[" << i << "].info";
get_value(cfg, key.str(), pmod->info, 0, 20, "Smart Group Server");
get_value(cfg, key.str(), pmod->info, 0, 20, "Smart Group Server XL");
if (pmod->info.size())
pmod->info.resize(20, ' ');
@ -215,6 +214,16 @@ CSGSXLConfig::CSGSXLConfig(const std::string &pathname)
m_remotePassword.empty();
printf("Remote disabled\n");
}
//audio
get_value(cfg, "audio.enabled", m_audioEnabled, true);
get_value(cfg, "audio.directory", m_audioDirectory, 0, 2000, "");
m_audioDirectory = std::string(DATA_DIR) + "/" + m_audioDirectory;
if(m_audioEnabled) {
printf("Audio enabled, auudio directory : %s", m_audioDirectory.c_str());
} else {
printf("Audio disabled");
}
}
CSGSXLConfig::~CSGSXLConfig()

@ -56,6 +56,8 @@ public:
void getRemote(bool &enabled, std::string &password, unsigned int &port) const;
void getAudio(bool & enabled, std::string &audioDir) const;
unsigned int getModCount();
unsigned int getLinkCount(const char *type);
unsigned int getIrcDDBCount();
@ -74,5 +76,7 @@ private:
bool m_remoteEnabled;
std::string m_remotePassword;
unsigned int m_remotePort;
}
;
bool m_audioEnabled;
std::string m_audioDirectory;
};

@ -7,8 +7,14 @@ gateway = {
# address = "" # this is the computer interface for the outgoing connection. Usually leave it blank and it will use whatever is avaiable.
}
# NOTHING usually needs to be specified in the ircddb section
audio = {
enabled = true
# The directory containing audio files for announcement. This is relative to DATADIR (see Makefile). It is case senstitive
directory = "en_GB"
}
# NOTHING usually needs to be specified in the ircddb section, quadnet is the default network. To make you groups available on more than Quadnet
# you have to specify all the networks you want including QuadNet
ircddb = ( #ircddb networks in paretheses
# {
# hostname = "rr.openquad.net"

Loading…
Cancel
Save

Powered by TurnKey Linux.