diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
| commit | 98eac951f8087b213f5850bd126dcb279db360a8 (patch) | |
| tree | c121f5c4df1aab847defa539990c1315bd5ba4a8 /mods/commands/yc_template.cpp | |
| parent | 0537da9d1e0f593130fc3967befb71e673b016bc (diff) | |
tagging ychat-0.6ychat-0.6
Diffstat (limited to 'mods/commands/yc_template.cpp')
| -rw-r--r-- | mods/commands/yc_template.cpp | 29 |
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 ); + } +} + |
