diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:41 +0200 |
| commit | 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 (patch) | |
| tree | 631c295a4a4a16b57502b847626763a279bf6df7 /ychat-0.6/mods/commands/yc_template.cpp | |
| parent | 13aaf70af703748fe096e0664c305cd202637ad2 (diff) | |
tagging tags
Diffstat (limited to 'ychat-0.6/mods/commands/yc_template.cpp')
| -rw-r--r-- | ychat-0.6/mods/commands/yc_template.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ychat-0.6/mods/commands/yc_template.cpp b/ychat-0.6/mods/commands/yc_template.cpp new file mode 100644 index 0000000..13be617 --- /dev/null +++ b/ychat-0.6/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 ); + } +} + |
