diff options
Diffstat (limited to 'Sluift/client.cpp')
| -rw-r--r-- | Sluift/client.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Sluift/client.cpp b/Sluift/client.cpp index ec208bc..24ece85 100644 --- a/Sluift/client.cpp +++ b/Sluift/client.cpp | |||
| @@ -599,6 +599,33 @@ static void pushEvent(lua_State* L, const SluiftClient::Event& event) { | |||
| 599 | Lua::registerTableToString(L, -1); | 599 | Lua::registerTableToString(L, -1); |
| 600 | break; | 600 | break; |
| 601 | } | 601 | } |
| 602 | case SluiftClient::Event::RosterAddType: { | ||
| 603 | Lua::Table result = boost::assign::map_list_of | ||
| 604 | ("type", std::make_shared<Lua::Value>(std::string("rosterpush"))) | ||
| 605 | ("jid", std::make_shared<Lua::Value>(event.item.toString())) | ||
| 606 | ("action", std::make_shared<Lua::Value>(std::string("added"))); | ||
| 607 | Lua::pushValue(L, result); | ||
| 608 | Lua::registerTableToString(L, -1); | ||
| 609 | break; | ||
| 610 | } | ||
| 611 | case SluiftClient::Event::RosterRemoveType: { | ||
| 612 | Lua::Table result = boost::assign::map_list_of | ||
| 613 | ("type", std::make_shared<Lua::Value>(std::string("rosterpush"))) | ||
| 614 | ("jid", std::make_shared<Lua::Value>(event.item.toString())) | ||
| 615 | ("action", std::make_shared<Lua::Value>(std::string("removed"))); | ||
| 616 | Lua::pushValue(L, result); | ||
| 617 | Lua::registerTableToString(L, -1); | ||
| 618 | break; | ||
| 619 | } | ||
| 620 | case SluiftClient::Event::RosterUpdateType: { | ||
| 621 | Lua::Table result = boost::assign::map_list_of | ||
| 622 | ("type", std::make_shared<Lua::Value>(std::string("rosterpush"))) | ||
| 623 | ("jid", std::make_shared<Lua::Value>(event.item.toString())) | ||
| 624 | ("action", std::make_shared<Lua::Value>(std::string("updated"))); | ||
| 625 | Lua::pushValue(L, result); | ||
| 626 | Lua::registerTableToString(L, -1); | ||
| 627 | break; | ||
| 628 | } | ||
| 602 | } | 629 | } |
| 603 | } | 630 | } |
| 604 | 631 | ||
Swift