add Instance setting
This commit is contained in:
parent
2bc3e27906
commit
8880762ff3
1 changed files with 5 additions and 1 deletions
|
@ -33,7 +33,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QCoreApplication app(argc, argv);
|
QCoreApplication app(argc, argv);
|
||||||
app.setApplicationName("xmppbot");
|
app.setApplicationName("xmppbot");
|
||||||
app.setApplicationVersion("0.1");
|
app.setApplicationVersion("0.2");
|
||||||
|
|
||||||
QCommandLineParser commandLineParser;
|
QCommandLineParser commandLineParser;
|
||||||
commandLineParser.addPositionalArgument("config", QCoreApplication::translate("xmppbot", "Configuration file."));
|
commandLineParser.addPositionalArgument("config", QCoreApplication::translate("xmppbot", "Configuration file."));
|
||||||
|
@ -68,6 +68,10 @@ int main(int argc, char *argv[])
|
||||||
if (key == "Password") {
|
if (key == "Password") {
|
||||||
if (!loginSet) {
|
if (!loginSet) {
|
||||||
jid = group;
|
jid = group;
|
||||||
|
const QString instance = settings.value("Instance", QString()).toString();
|
||||||
|
if (!instance.isEmpty()) {
|
||||||
|
jid += QLatin1String("/") + instance;
|
||||||
|
}
|
||||||
jpw = settings.value(key, QString()).toString();
|
jpw = settings.value(key, QString()).toString();
|
||||||
loginSet = true;
|
loginSet = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue