|
|
|
@ -96,6 +96,21 @@ const DefaultMap defaultLogging { |
|
|
|
|
{ "Path", "Path" } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* These won't follow the ordinary style of parameter names, |
|
|
|
|
* but rather the names of the various IRCv3 extensions. |
|
|
|
|
*/ |
|
|
|
|
const DefaultMap defaultIRCv3 { |
|
|
|
|
{ "account-notify", "1" }, |
|
|
|
|
{ "extended-join", "1" }, |
|
|
|
|
{ "away-notify", "1" }, |
|
|
|
|
{ "invite-notify", "1" }, |
|
|
|
|
{ "multi-prefix", "1" }, |
|
|
|
|
{ "userhost-in-names", "1" }, |
|
|
|
|
{ "message-tags", "1" }, |
|
|
|
|
{ "server-time", "1" } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const std::string& getDefault(const DefaultMap& map, const std::string& key) |
|
|
|
|
{ |
|
|
|
|
static const std::string empty; |
|
|
|
@ -215,6 +230,14 @@ QStringList ConfigMgr::scripts() const |
|
|
|
|
return ret; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QString ConfigMgr::IRCv3(const QString& key) const |
|
|
|
|
{ |
|
|
|
|
const auto keystdstr = key.toStdString(); |
|
|
|
|
const auto& defaultValue = getDefault(defaultColor, keystdstr); |
|
|
|
|
return QString::fromStdString( ini.read("IRCv3", keystdstr, defaultValue) ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ConfigMgr::setGeometry(const QString& key, const QString& value) |
|
|
|
|
{ |
|
|
|
|
ini.write("Geometry", key.toStdString(), value.toStdString()); |
|
|
|
@ -295,3 +318,8 @@ void ConfigMgr::delScript(const QString& path) |
|
|
|
|
if (!n.empty()) |
|
|
|
|
ini.remove("Scripts", n); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void ConfigMgr::setIRCv3(const QString& key, const QString& value) |
|
|
|
|
{ |
|
|
|
|
ini.write("IRCv3", key.toStdString(), value.toStdString()); |
|
|
|
|
} |
|
|
|
|