diff options
Diffstat (limited to 'src/mods/commands/yc_template.cpp')
| -rwxr-xr-x | src/mods/commands/yc_template.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mods/commands/yc_template.cpp b/src/mods/commands/yc_template.cpp new file mode 100755 index 0000000..e0aa009 --- /dev/null +++ b/src/mods/commands/yc_template.cpp @@ -0,0 +1,24 @@ +#include <iostream> +#include "../../chat/user.h" + +/* + gcc -shared -o yc_name.so yc_name.cpp +*/ + +using namespace std; + +extern "C" { + int extern_function(void *v_arg) + { + container *c=(container *)v_arg; + + user *p_user = (user*)c->elem[1]; // the corresponding user + vector<string> *params=(vector<string>*)c->elem[2]; // param array + + string *quitstring=new string("Text to send<br>"); + p_user->msg_post( quitstring ); + + return 0; + } +} + |
