summaryrefslogtreecommitdiff
path: root/mods/commands/yc_q.cpp
blob: 57765220126b9e32c2ffb625ee80b49b4bd61dd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <iostream>
#include "../../user.h"

/*
 gcc -shared -o yc_name.so yc_name.cpp
*/

using namespace std;


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];
	user *p_user = (user*)c->elem[1];

  	string *quitstring=new string("<script language=JavaScript>top.location.href='/index.html';</script>");
	p_user->msg_post( quitstring );
        p_user->set_online(false);
 }
}