diff options
Diffstat (limited to 'src/modules/m_topiclock.cpp')
-rw-r--r-- | src/modules/m_topiclock.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp index b0d004b1c..b4fc8dedc 100644 --- a/src/modules/m_topiclock.cpp +++ b/src/modules/m_topiclock.cpp @@ -73,6 +73,7 @@ class CommandSVSTOPIC : public Command } }; +// TODO: add a BoolExtItem to replace this. class FlagExtItem : public ExtensionItem { public: @@ -86,15 +87,18 @@ class FlagExtItem : public ExtensionItem return (get_raw(container) != NULL); } - std::string serialize(SerializeFormat format, const Extensible* container, void* item) const CXX11_OVERRIDE + std::string ToHuman(const Extensible* container, void* item) const CXX11_OVERRIDE { - if (format == FORMAT_USER) - return "true"; + // Make the human version more readable. + return "true"; + } + std::string ToNetwork(const Extensible* container, void* item) const CXX11_OVERRIDE + { return "1"; } - void unserialize(SerializeFormat format, Extensible* container, const std::string& value) CXX11_OVERRIDE + void FromNetwork(Extensible* container, const std::string& value) CXX11_OVERRIDE { if (value == "1") set_raw(container, this); |