summaryrefslogtreecommitdiff
path: root/server/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2008-06-03 08:13:20 +0000
committerdeva <deva>2008-06-03 08:13:20 +0000
commitbb3fad646f94739a876869464a484c99795bce61 (patch)
tree1894d6b43055b654150bf9e56cc1baefce34dcad /server/src/server.cc
parent13b9aa0c0ab5a7b66c08f7a7e02c193530640ed3 (diff)
Added support for lua validator programs.
Diffstat (limited to 'server/src/server.cc')
-rw-r--r--server/src/server.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/src/server.cc b/server/src/server.cc
index e85c35c..f74c2b0 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -150,6 +150,26 @@ static void connection(TCPSocket &socket)
socket.write("\">\n");
if(macro.attributes["name"] == request.macro) {
+ // Handle lua programs
+ if(macro.luaprograms.size()) {
+ socket.write(" <luaprograms>\n");
+
+ std::vector< LUAProgram >::iterator lpi = macro.luaprograms.begin();
+ while(lpi != macro.luaprograms.end()) {
+ socket.write(" <luaprogram name=\"");
+ socket.write(lpi->attributes["name"]);
+ socket.write("\">\n");
+
+ socket.write(lpi->attributes["lua"]);
+
+ socket.write("\n </luaprogram>\n");
+
+ lpi++;
+ }
+
+ socket.write(" </luaprograms>\n");
+ }
+
widgetgenerator(socket, macro, lqm, db);
}