summaryrefslogtreecommitdiff
path: root/mods/commands/yc_template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mods/commands/yc_template.cpp')
-rw-r--r--mods/commands/yc_template.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/mods/commands/yc_template.cpp b/mods/commands/yc_template.cpp
new file mode 100644
index 0000000..13be617
--- /dev/null
+++ b/mods/commands/yc_template.cpp
@@ -0,0 +1,29 @@
+#include <iostream>
+#include "../../user.h"
+
+/*
+ gcc -shared -o yc_name.so yc_name.cpp
+*/
+
+using namespace std;
+
+typedef vector<string> str_vector;
+
+extern "C" {
+ export int extern_function(void *v_arg);
+
+
+ int extern_function(void *v_arg)
+ {
+ container *c=(container *)v_arg;
+
+ string *sCommandLine=(string *)c->elem[0]; // contains the whole line
+ user *p_user = (user*)c->elem[1]; // the corresponding user
+ str_vector *params=(str_vector*)c->elem[2]; // param array
+
+
+ string *quitstring=new string("Text to send<br>");
+ p_user->msg_post( quitstring );
+ }
+}
+