summaryrefslogtreecommitdiff
path: root/swat/scripting/general_calls.esp
diff options
context:
space:
mode:
Diffstat (limited to 'swat/scripting/general_calls.esp')
-rw-r--r--swat/scripting/general_calls.esp26
1 files changed, 26 insertions, 0 deletions
diff --git a/swat/scripting/general_calls.esp b/swat/scripting/general_calls.esp
new file mode 100644
index 0000000000..3a78ff6bbb
--- /dev/null
+++ b/swat/scripting/general_calls.esp
@@ -0,0 +1,26 @@
+<%
+/*
+ used for general purpose calls
+*/
+libinclude("server_call.js");
+
+/* register a call for clients to make */
+var call = servCallObj();
+
+/*
+ a remote printf, for displaying stuff on smbd stdout
+*/
+function srv_printf()
+{
+ println("in srv_printf");
+ var s = string_init();
+ print(s.vsprintf(arguments));
+ return undefined;
+}
+
+/* add some basic calls */
+call.add('srv_printf', srv_printf);
+
+/* run the function that was asked for */
+call.run();
+%>