mirror of https://notabug.org/acetone/ircabot.git
to release :)
parent
a1127b3139
commit
ecf00c67a6
28
ircbot.json
28
ircbot.json
|
@ -1,26 +1,28 @@
|
||||||
{
|
{
|
||||||
"socket":
|
"socket":
|
||||||
{
|
{
|
||||||
"address": "324:9de3:fea4:f6ac::41",
|
"address": "127.0.0.1",
|
||||||
"port": "6667",
|
"port": "6667",
|
||||||
"channel": "#ddd",
|
"channel": "#ircabot",
|
||||||
"nickname": "botbotbot",
|
"nickname": "ircabot",
|
||||||
"password": "x"
|
"password": ""
|
||||||
},
|
},
|
||||||
|
|
||||||
"handler":
|
"handler":
|
||||||
{
|
{
|
||||||
"logpath": "D:\\irc-log",
|
"help": "available functions: 'search' and 'test'.",
|
||||||
|
|
||||||
|
"logpath": "/var/www/irc-log",
|
||||||
"admin": "acetone",
|
"admin": "acetone",
|
||||||
"success": "успешно.",
|
"success": "success :)",
|
||||||
"error": "ошибка.",
|
"error": "error :(",
|
||||||
"trylater": "попробуйте позже.",
|
"trylater": "try later.",
|
||||||
|
|
||||||
"find": "поиск",
|
"find": "search",
|
||||||
"notfound": "ничего не найдено.",
|
"notfound": "not found.",
|
||||||
"findzero": "краткий поиск: 'поиск <слово>', расширенный поиск с выдачей результата в ЛС: 'поиск <ГГГГ-ММ-ДД> [слово]'.",
|
"findzero": "quick search: 'search <word>', detailed search with output to PM: 'search <YYYY-MM-DD> [word]'.",
|
||||||
"links": "http://acetone.i2p/doc/irc-log/ # http://[324:9de3:fea4:f6ac::ace]/doc/irc-log/ # http://acetonemadzhxzi2e5tomavam6xpucdfwn2g35vrsz6izgaxv5bmuhad.onion/doc/irc-log/",
|
"links": "http://example.domain/irc-log/",
|
||||||
|
|
||||||
"help": "доступные команды: 'поиск'."
|
"test": "it's work!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
14
main.cpp
14
main.cpp
|
@ -27,15 +27,15 @@ void log(std::string text)
|
||||||
|
|
||||||
std::map<std::string, std::string> conf =
|
std::map<std::string, std::string> conf =
|
||||||
{
|
{
|
||||||
{ "admin" , "acetone" }, // никнейм админа
|
{ "admin" , "" }, // никнейм админа
|
||||||
{ "error" , "error" }, // сообщение об ошибке
|
{ "error" , "" }, // сообщение об ошибке
|
||||||
{ "success" , "success" }, // сообщение об успехе
|
{ "success" , "" }, // сообщение об успехе
|
||||||
{ "logpath" , "" }, // директория с логами
|
{ "logpath" , "" }, // директория с логами
|
||||||
{ "find" , "search" }, // команда поиска
|
{ "find" , "" }, // команда поиска
|
||||||
{ "notfound", "not found" }, // поиск не увенчался успехом
|
{ "notfound", "" }, // поиск не увенчался успехом
|
||||||
{ "findzero", "what?.." }, // команда поиска без параметров
|
{ "findzero", "" }, // команда поиска без параметров
|
||||||
{ "links" , "" }, // ссылки на лог (в конце выдачи в ЛС)
|
{ "links" , "" }, // ссылки на лог (в конце выдачи в ЛС)
|
||||||
{ "trylater", "try later" } // "перегрузка, попробуйте позже"
|
{ "trylater", "" } // "перегрузка, попробуйте позже"
|
||||||
};
|
};
|
||||||
|
|
||||||
std::mutex mtx;
|
std::mutex mtx;
|
||||||
|
|
|
@ -65,8 +65,8 @@ private:
|
||||||
|
|
||||||
std::string m_config_file = "ircbot.json";
|
std::string m_config_file = "ircbot.json";
|
||||||
|
|
||||||
const std::string m_user = "acetonebot";
|
const std::string m_user = "ircabot";
|
||||||
const std::string m_realname = "IRC bot in C++";
|
const std::string m_realname = "https://notabug.org/acetone/ircabot";
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TCPSYNCCLIENT_H
|
#endif // TCPSYNCCLIENT_H
|
||||||
|
|
Loading…
Reference in New Issue