Beispiel #1
0
int	sample_privmsg (struct server *serv, char *from, char *ip, char *text, void *a, char c)
{
	struct	session	*sess;
	char	buf[512];
	
	sess = serv->front_session;
	snprintf(buf, 510, "PRIVMSG from: %s, ip: %s, text: %s\n", from, ip, text);
	PrintText(sess, buf);
	
	XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c);
}
Beispiel #2
0
int	autogb_privmsg (struct server *serv, char *from, char *ip, char *text, void *a, char c)
{
	int len;
	int msg_code;

	char * ps;
#ifdef DEBUG
	struct session *sess;
	char msg[512];

	sess= serv->front_session;
#endif
	len=strlen(text);

#ifdef DEBUG
	snprintf(msg,510, "String: %s, Len: %d",text,len);
	PrintText(sess, msg);
#endif
	msg_code=j_code(text,len);
	switch(msg_code){
		case GB_CODE:
#ifdef DEBUG
			PrintText(sess," GB\n");
#endif
			break;
		case BIG5_CODE:
			ps=big2gb(text,&len,0);
			strncpy(text,ps,len);
#ifdef DEBUG
			PrintText(sess," Big\n");
#endif
			break;
		default:
			;
	}

	XP_CALLNEXT(privmsg_next, serv, from, ip, text, a, c);
}
Beispiel #3
0
int	sample_test2 (struct session *sess, char *a, char *b, char *c, char *d,  char e)
{
	printf("CMD2: %s\n", a);
	
	XP_CALLNEXT(test2_next, sess, a, b, c, d, e);
}