Comparison

doc/example_pep.lua @ 243:20842f98f9ff

doc/example_pep.lua: get_child_text()
author Kim Alvefur <zash@zash.se>
date Thu, 24 Nov 2011 07:02:27 +0100
parent 168:7285e04a4797
child 260:7f6df45a3d1f
comparison
equal deleted inserted replaced
232:5b49de3aa0f3 243:20842f98f9ff
46 c:hook_pep("http://jabber.org/protocol/mood", function (event) 46 c:hook_pep("http://jabber.org/protocol/mood", function (event)
47 print(event.from.." is "..event.item.tags[1].name); 47 print(event.from.." is "..event.item.tags[1].name);
48 end); 48 end);
49 49
50 c:hook_pep("http://jabber.org/protocol/tune", function (event) 50 c:hook_pep("http://jabber.org/protocol/tune", function (event)
51 print(event.from.." is listening to "..event.item:get_child("title"):get_text()); 51 print(event.from.." is listening to "..event.item:get_child_text("title"));
52 end); 52 end);
53 end); 53 end);
54 54
55 print("Starting loop...") 55 print("Starting loop...")
56 verse.loop() 56 verse.loop()