mirror of https://github.com/bvn13/JIrcBot.git
refactoring
parent
7a44a268b5
commit
38071b27e0
|
@ -48,6 +48,3 @@ yandex-search.txt
|
|||
|
||||
target
|
||||
|
||||
jircbot.sqlite
|
||||
|
||||
config.json
|
24
config.json
24
config.json
|
@ -5,26 +5,8 @@
|
|||
"enabled" : true,
|
||||
"server" : "irc.freenode.net",
|
||||
"port" : 6667,
|
||||
"channelsNames" : ["#voidforum", "#lor"],
|
||||
"botName" : "jircbot"
|
||||
"channelsNames" : ["#voidforum"],
|
||||
"botName" : "jircbot-test"
|
||||
}
|
||||
],
|
||||
"settings" : {
|
||||
"doodle" : {
|
||||
"mainUrl" : "https://www.google.com",
|
||||
"checkUrl" : "https://www.google.com/doodles",
|
||||
"linkSelector" : "li.latest-doodle.on .container a",
|
||||
"titleSelector" : "li.latest-doodle.on .container input.title",
|
||||
"dateSelector" : "li.latest-doodle.on .container input.tag"
|
||||
},
|
||||
"search" : {
|
||||
"uuid" : "YOUR_UUID",
|
||||
"appKey" : "YOUR_APP_KEY"
|
||||
},
|
||||
"yaSearch" : {
|
||||
"url" : "https://yandex.ru/search/xml?",
|
||||
"user" : "USER_NAME",
|
||||
"key" : "YOUR_KEY"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -59,10 +59,10 @@ public class JircBotConfiguration {
|
|||
this.connections.add(config);
|
||||
}
|
||||
|
||||
JSONObject lstnrSettings = (JSONObject) jsonObject.get("settings");
|
||||
this.listenersSettings.put(KEY_GOOGLE_DOODLE, this.readGoogleDoodleSettings(lstnrSettings));
|
||||
this.listenersSettings.put(KEY_GOOGLE_SEARCH, this.readGoogleSearchSettings(lstnrSettings));
|
||||
this.listenersSettings.put(KEY_YANDEX_SEARCH, this.readYandexSearchSettings(lstnrSettings));
|
||||
// JSONObject lstnrSettings = (JSONObject) jsonObject.get("settings");
|
||||
// this.listenersSettings.put(KEY_GOOGLE_DOODLE, this.readGoogleDoodleSettings(lstnrSettings));
|
||||
// this.listenersSettings.put(KEY_GOOGLE_SEARCH, this.readGoogleSearchSettings(lstnrSettings));
|
||||
// this.listenersSettings.put(KEY_YANDEX_SEARCH, this.readYandexSearchSettings(lstnrSettings));
|
||||
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue