# HG changeset patch # User David Demelier # Date 1456434449 -3600 # Node ID a5f2d5d419949ec2ea02b6e0105bdab35e8f703a # Parent 909eb532ca9a93e55f063c477ec42b24eda749cd Irccd: use message property instead of notice for consistency on*Notice diff -r 909eb532ca9a -r a5f2d5d41994 irccd/irccd.cpp --- a/irccd/irccd.cpp Wed Feb 24 21:48:00 2016 +0100 +++ b/irccd/irccd.cpp Thu Feb 25 22:07:29 2016 +0100 @@ -49,6 +49,7 @@ { "event", "onChannelMode" }, { "server", server->info().name }, { "origin", origin }, + { "channel", channel }, { "mode", mode }, { "argument", arg } }); @@ -65,7 +66,7 @@ }); } -void Irccd::handleServerChannelNotice(std::weak_ptr ptr, std::string origin, std::string channel, std::string notice) +void Irccd::handleServerChannelNotice(std::weak_ptr ptr, std::string origin, std::string channel, std::string message) { std::shared_ptr server = ptr.lock(); @@ -75,14 +76,14 @@ log::debug() << "server " << server->info().name << ": event onChannelNotice:\n"; log::debug() << " origin: " << origin << "\n"; log::debug() << " channel: " << channel << "\n"; - log::debug() << " notice: " << notice << std::endl; + log::debug() << " message: " << message << std::endl; json::Value json = json::object({ { "event", "onChannelNotice" }, { "server", server->info().name }, { "origin", origin }, { "channel", channel }, - { "notice", notice } + { "message", message } }); postServerEvent({server->info().name, origin, channel, json.toJson(0) @@ -91,7 +92,7 @@ return "onChannelNotice"; } , [=] (Plugin &plugin) { - plugin.onChannelNotice(std::move(server), std::move(origin), std::move(channel), std::move(notice)); + plugin.onChannelNotice(std::move(server), std::move(origin), std::move(channel), std::move(message)); } #endif }); @@ -393,7 +394,7 @@ { "event", "onNotice" }, { "server", server->info().name }, { "origin", origin }, - { "notice", message } + { "message", message } }); postServerEvent({server->info().name, origin, /* channel */ "", json.toJson(0) @@ -526,8 +527,7 @@ { "nickname", whois.nick }, { "username", whois.user }, { "host", whois.host }, - { "realname", whois.realname }, - { "channels", "" } + { "realname", whois.realname } }); postServerEvent({server->info().name, /* origin */ "", /* channel */ "", object.toJson(-1) diff -r 909eb532ca9a -r a5f2d5d41994 irccdctl/command-watch.cpp --- a/irccdctl/command-watch.cpp Wed Feb 24 21:48:00 2016 +0100 +++ b/irccdctl/command-watch.cpp Thu Feb 25 22:07:29 2016 +0100 @@ -41,7 +41,7 @@ std::cout << "server: " << v.valueOr("server", "").toString() << "\n"; std::cout << "origin: " << v.valueOr("origin", "").toString() << "\n"; std::cout << "channel: " << v.valueOr("channel", "").toString() << "\n"; - std::cout << "notice: " << v.valueOr("notice", "").toString() << "\n"; + std::cout << "message: " << v.valueOr("message", "").toString() << "\n"; } void onConnect(const json::Value &v) @@ -123,7 +123,7 @@ std::cout << "event: onNotice\n"; std::cout << "server: " << v.valueOr("server", "").toString() << "\n"; std::cout << "origin: " << v.valueOr("origin", "").toString() << "\n"; - std::cout << "notice: " << v.valueOr("notice", "").toString() << "\n"; + std::cout << "message: " << v.valueOr("message", "").toString() << "\n"; } void onPart(const json::Value &v)