亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? message.c

?? 打魔獸戰(zhàn)網(wǎng)的都知道他是什么
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* * Copyright (C) 1998  Mark Baysinger (mbaysing@ucsd.edu) * Copyright (C) 1998,1999,2001,2002  Ross Combs (rocombs@cs.nmsu.edu) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */#define MESSAGE_INTERNAL_ACCESS#include "common/setup_before.h"#include <stdio.h>#ifdef HAVE_STDDEF_H# include <stddef.h>#else# ifndef NULL#  define NULL ((void *)0)# endif#endif#ifdef STDC_HEADERS# include <stdlib.h>#else# ifdef HAVE_MALLOC_H#  include <malloc.h># endif#endif#ifdef HAVE_STRING_H# include <string.h>#else# ifdef HAVE_STRINGS_H#  include <strings.h># endif#endif#include "compat/strdup.h"#ifdef HAVE_UNISTD_H# include <unistd.h>#endif#include "compat/gethostname.h"#include <errno.h>#include "compat/strerror.h"#include "connection.h"#include "common/bn_type.h"#include "common/queue.h"#include "common/packet.h"#include "common/bot_protocol.h"#include "common/bnet_protocol.h"#include "common/field_sizes.h"#include "common/eventlog.h"#include "common/list.h"#include "common/util.h"#include "common/version.h"#include "common/addr.h"#include "account.h"#include "account_wrap.h"#include "game.h"#include "channel.h"#include "channel_conv.h"#include "command.h"#include "irc.h"#include "message.h"#include "mail.h"#include "prefs.h"#include "common/tag.h"#include "common/xalloc.h"#include "common/setup_after.h"static int message_telnet_format(t_packet * packet, t_message_type type, t_connection * me, t_connection * dst, char const * text, unsigned int dstflags);static int message_bot_format(t_packet * packet, t_message_type type, t_connection * me, t_connection * dst, char const * text, unsigned int dstflags);static int message_bnet_format(t_packet * packet, t_message_type type, t_connection * me, t_connection * dst, char const * text, unsigned int dstflags);static t_packet * message_cache_lookup(t_message * message, t_connection *dst, unsigned int flags);static char const * message_type_get_str(t_message_type type){    switch (type)    {    case message_type_adduser:        return "adduser";    case message_type_join:        return "join";    case message_type_part:        return "part";    case message_type_whisper:        return "whisper";    case message_type_talk:        return "talk";    case message_type_broadcast:        return "broadcast";    case message_type_channel:        return "channel";    case message_type_userflags:        return "userflags";    case message_type_whisperack:        return "whisperack";    case message_type_friendwhisperack:  //[zap-zero] 20020518        return "friendwhisperack";      case message_type_channelfull:        return "channelfull";    case message_type_channeldoesnotexist:        return "channeldoesnotexist";    case message_type_channelrestricted:        return "channelrestricted";    case message_type_info:        return "info";    case message_type_error:        return "error";    case message_type_emote:        return "emote";    case message_type_uniqueid:        return "uniqueid";    case message_type_mode:	return "mode";    case message_type_null:        return "null";    default:        return "UNKNOWN";    }}/* make sure none of the expanded format symbols is longer than this (with null) */#define MAX_INC 64extern char * message_format_line(t_connection const * c, char const * in){    char *       out;    unsigned int inpos;    unsigned int outpos;    unsigned int outlen=MAX_INC;    unsigned int inlen;    char         clienttag_str[5];        out = xmalloc(outlen+1);        inlen = strlen(in);    out[0] = 'I';    for (inpos=0,outpos=1; inpos<inlen; inpos++)    {        if (in[inpos]!='%')	{	    out[outpos] = in[inpos];	    outpos += 1;	}        else	    switch (in[++inpos])	    {	    case '%':		out[outpos++] = '%';		break;			    case 'a':		sprintf(&out[outpos],"%u",accountlist_get_length());		outpos += strlen(&out[outpos]);		break;			    case 'c':		sprintf(&out[outpos],"%d",channellist_get_length());		outpos += strlen(&out[outpos]);		break;			    case 'g':		sprintf(&out[outpos],"%d",gamelist_get_length());		outpos += strlen(&out[outpos]);		break;			    case 'h':    		if (gethostname(&out[outpos],MAX_INC)<0)    		{		    eventlog(eventlog_level_error,__FUNCTION__,"could not get hostname (gethostname: %s)",pstrerror(errno));		    strcpy(&out[outpos],"localhost"); /* not much else you can do */    		}		outpos += strlen(&out[outpos]);		break;			    case 'i':		sprintf(&out[outpos],UID_FORMAT,conn_get_userid(c));		outpos += strlen(&out[outpos]);		break;			    case 'l':	        {		    char const * tname;		    		    strncpy(&out[outpos],(tname = (conn_get_chatname(c)?conn_get_chatname(c):conn_get_loggeduser(c))),USER_NAME_MAX-1);		    conn_unget_chatname(c,tname);		}		out[outpos+USER_NAME_MAX-1] = '\0';		outpos += strlen(&out[outpos]);		break;            case 'm':	    	sprintf(&out[outpos],"%s",check_mail(c));		outpos += strlen(&out[outpos]);                break;			    case 'r':		strncpy(&out[outpos],addr_num_to_ip_str(conn_get_addr(c)),MAX_INC-1);		out[outpos+MAX_INC-1] = '\0';		outpos += strlen(&out[outpos]);		break;	    case 's':		sprintf(&out[outpos],"%s",prefs_get_servername());		outpos += strlen(&out[outpos]);		break;			    case 't':		sprintf(&out[outpos],"%s",tag_uint_to_str(clienttag_str,conn_get_clienttag(c)));		outpos += strlen(&out[outpos]);		break;			    case 'u':		sprintf(&out[outpos],"%d",connlist_login_get_length());		outpos += strlen(&out[outpos]);		break;			    case 'v':		strcpy(&out[outpos],PVPGN_SOFTWARE" "PVPGN_VERSION);		outpos += strlen(&out[outpos]);		break;			    case 'C': /* simulated command */		out[0] = 'C';		break;			    case 'B': /* BROADCAST */		out[0] = 'B';		break;			    case 'E': /* ERROR */		out[0] = 'E';		break;	    case 'G':	    	sprintf(&out[outpos],"%d",game_get_count_by_clienttag(conn_get_clienttag(c)));		outpos += strlen(&out[outpos]);		break;			    case 'H':		strcpy(&out[outpos],prefs_get_contact_name());		outpos += strlen(&out[outpos]);		break;			    case 'I': /* INFO */		out[0] = 'I';		break;			    case 'M': /* MESSAGE */		out[0] = 'M';		break;	    case 'N':	    	strcpy(&out[outpos],clienttag_get_title(conn_get_clienttag(c)));		outpos += strlen(&out[outpos]);		break;			    case 'T': /* EMOTE */		out[0] = 'T';		break;	    case 'U':	    	sprintf(&out[outpos],"%d",conn_get_user_count_by_clienttag(conn_get_clienttag(c)));		outpos += strlen(&out[outpos]);		break;			    case 'W': /* INFO */		out[0] = 'W';		break;			    default:		eventlog(eventlog_level_warn,__FUNCTION__,"bad formatter \"%%%c\"",in[inpos-1]);	    }		if ((outpos+MAX_INC)>=outlen)	{	    char * newout;	    	    outlen += MAX_INC;	    newout = xrealloc(out,outlen);	    out = newout;	}    }    out[outpos] = '\0';        return out;}static int message_telnet_format(t_packet * packet, t_message_type type, t_connection * me, t_connection * dst, char const * text, unsigned int dstflags){    char * msgtemp;        if (!packet)    {	eventlog(eventlog_level_error,__FUNCTION__,"got NULL packet");	return -1;    }        switch (type)    {    case message_type_uniqueid:	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	msgtemp = xmalloc(strlen(text)+32);        sprintf(msgtemp,"Your unique name: %s\r\n",text);	break;    case message_type_adduser:	if (!me)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection for %s",message_type_get_str(type));	    return -1;	}	{	    char const * tname;	    	    tname = conn_get_chatcharname(me, dst);	    msgtemp = xmalloc(strlen(tname)+32);	    sprintf(msgtemp,"[%s is here]\r\n",tname);	    conn_unget_chatcharname(me,tname);	}	break;    case message_type_join:	if (!me)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection for %s",message_type_get_str(type));	    return -1;	}	{	    char const * tname;	    	    tname = conn_get_chatcharname(me, dst);	    msgtemp = xmalloc(strlen(tname)+32);	    sprintf(msgtemp,"[%s enters]\r\n",tname);	    conn_unget_chatcharname(me,tname);	}	break;    case message_type_part:	if (!me)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection for %s",message_type_get_str(type));	    return -1;	}	{	    char const * tname;	    	    tname = conn_get_chatcharname(me, dst);	    msgtemp = xmalloc(strlen(tname)+32);	    sprintf(msgtemp,"[%s leaves]\r\n",tname);	    conn_unget_chatcharname(me,tname);	}	break;    case message_type_whisper:	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	if (dstflags&MF_X)	    return -1; /* player is ignored */	{	    char const * tname;	    char const * newtext;	    	    if (me)		tname = conn_get_chatcharname(me, dst);	    else		tname = prefs_get_servername();	    	    if ((newtext = escape_chars(text,strlen(text))))	    {		msgtemp = xmalloc(strlen(tname)+8+strlen(newtext)+4);		sprintf(msgtemp,"<from %s> %s\r\n",tname,newtext);		xfree((void *)newtext); /* avoid warning */	    }	    else	    {		msgtemp = xmalloc(16+strlen(tname));		sprintf(msgtemp,"<from %s> \r\n",tname);	    }	    if (me)	        conn_unget_chatcharname(me,tname);	}	break;    case message_type_talk:	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	if (dstflags&MF_X)	    return -1; /* player is ignored */	{	    char const * tname;	    char const * newtext;	    	    if (me)	        tname = conn_get_chatcharname(me, dst);	    else		tname = prefs_get_servername();	    	    if ((newtext = escape_chars(text,strlen(text))))	    {		msgtemp = xmalloc(strlen(tname)+4+strlen(newtext)+4);		sprintf(msgtemp,"<%s> %s\r\n",tname,newtext);		xfree((void *)newtext); /* avoid warning */	    }	    else	    {		msgtemp = xmalloc(strlen(tname)+8);		sprintf(msgtemp,"<%s> \r\n",tname);	    }	    if (me)	        conn_unget_chatcharname(me,tname);	}	break;    case message_type_broadcast:	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	if (dstflags&MF_X)	    return -1; /* player is ignored */	{	    char const * newtext;	    	    if ((newtext = escape_chars(text,strlen(text))))	    {		msgtemp = xmalloc(16+strlen(newtext)+4);		sprintf(msgtemp,"Broadcast: %s\r\n",newtext); /* FIXME: show source? */		xfree((void *)newtext); /* avoid warning */	    }	    else	    {		msgtemp = xmalloc(16);		sprintf(msgtemp,"Broadcast: \r\n"); /* FIXME: show source? */	    }	}	break;    case message_type_channel:	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	msgtemp = xmalloc(strlen(text)+32);	sprintf(msgtemp,"Joining channel: \"%s\"\r\n",text);	break;    case message_type_userflags:	if (!me)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection for %s",message_type_get_str(type));	    return -1;	}	msgtemp = xstrdup("");	break;    case message_type_whisperack:	if (!me)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection for %s",message_type_get_str(type));	    return -1;	}	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	{	    char const * tname;	    char const * newtext;	    	    tname = conn_get_chatcharname(me, dst);	    if ((newtext = escape_chars(text,strlen(text))))	    {		msgtemp = xmalloc(strlen(tname)+8+strlen(newtext)+4);		sprintf(msgtemp,"<to %s> %s\r\n",tname,newtext);		xfree((void *)newtext); /* avoid warning */	    }	    else	    {		msgtemp = xmalloc(strlen(tname)+8+strlen(text)+4);		sprintf(msgtemp,"<to %s> %s\r\n",tname,text);	    }	    conn_unget_chatcharname(me,tname);	}	break;    case message_type_friendwhisperack:   // [zap-zero] 20020518	if (!me)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection for %s",message_type_get_str(type));	    return -1;	}	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	{	    char const * newtext;	    	    if ((newtext = escape_chars(text,strlen(text))))	    {		msgtemp = xmalloc(14+8+strlen(newtext)+4);		sprintf(msgtemp,"<to your friends> %s\r\n",newtext);		xfree((void *)newtext); /* avoid warning */	    }	    else	    {		msgtemp = xmalloc(14+8+strlen(text)+4);		sprintf(msgtemp,"<to your friends> %s\r\n",text);	    }	}	break;    case message_type_channelfull:	/* FIXME */	msgtemp = xstrdup("");	break;    case message_type_channeldoesnotexist:	/* FIXME */	msgtemp = xstrdup("");	break;    case message_type_channelrestricted:	/* FIXME */	msgtemp = xstrdup("");	break;    case message_type_info:	if (!text)	{	    eventlog(eventlog_level_error,__FUNCTION__,"got NULL text for %s",message_type_get_str(type));	    return -1;	}	{	    char const * newtext;	    	    if ((newtext = escape_chars(text,strlen(text))))

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线不卡一区| 日韩欧美三级在线| 久久精品国产免费| 亚洲摸摸操操av| 久久久久久久久久久久电影| 欧美亚洲动漫精品| 国产ts人妖一区二区| 蜜桃在线一区二区三区| 一区二区三区**美女毛片| 国产亚洲欧美一级| 日韩欧美另类在线| 欧美精品九九99久久| 一本大道综合伊人精品热热| 国产高清久久久久| 激情亚洲综合在线| 另类小说色综合网站| 亚洲成在人线在线播放| 亚洲伦理在线精品| 中文字幕制服丝袜成人av| 久久久久一区二区三区四区| 日韩色在线观看| 日韩一区二区三区电影在线观看| 欧美视频第二页| 日本高清不卡一区| 色综合久久中文综合久久97 | 色成年激情久久综合| 国产精品18久久久| 国产精品一区二区在线观看网站 | 91免费看视频| 成人夜色视频网站在线观看| 激情综合色综合久久| 精品影院一区二区久久久| 蜜桃视频在线观看一区| 免费一级片91| 奇米色777欧美一区二区| 奇米精品一区二区三区在线观看一 | 青娱乐精品视频| 日韩不卡手机在线v区| 午夜欧美大尺度福利影院在线看 | 成人一区在线看| 顶级嫩模精品视频在线看| 国产成人福利片| 波多野结衣欧美| 一本到三区不卡视频| 欧美性猛交xxxxxxxx| 欧美精品tushy高清| 欧美不卡视频一区| 精品欧美乱码久久久久久| 久久久精品免费免费| 亚洲国产高清在线观看视频| 亚洲婷婷综合色高清在线| 一区二区三区四区蜜桃| 亚洲综合丁香婷婷六月香| 亚洲一区二区综合| 视频一区中文字幕国产| 韩国欧美国产1区| 成人av电影在线网| 在线观看免费一区| 91精品欧美久久久久久动漫| 久久综合狠狠综合久久激情 | 国产精品免费av| 亚洲人成亚洲人成在线观看图片| 一二三区精品视频| 亚洲午夜日本在线观看| 久久电影国产免费久久电影| 成人黄色在线视频| 欧美性大战久久久久久久| 精品美女被调教视频大全网站| 久久久久亚洲综合| 亚洲一区在线视频| 久热成人在线视频| www.日韩av| 欧美美女直播网站| 男人的j进女人的j一区| 国产一区二区三区免费播放 | 日韩视频在线观看一区二区| 国产女人aaa级久久久级| 亚洲第一在线综合网站| 国产在线精品不卡| 色一情一乱一乱一91av| 欧美成人一区二区三区| 最新热久久免费视频| 婷婷综合另类小说色区| 国产成人av电影免费在线观看| 欧美性大战xxxxx久久久| 国产人妖乱国产精品人妖| 亚洲国产一区视频| 成人免费黄色大片| 91麻豆精品国产自产在线| 亚洲欧美日韩在线| 精品一区二区三区香蕉蜜桃 | 亚洲精品国产a| 九九九久久久精品| 欧美综合在线视频| 欧美国产亚洲另类动漫| 美女一区二区久久| 在线观看免费成人| 亚洲国产精品国自产拍av| 蜜桃av一区二区在线观看| 色94色欧美sute亚洲线路一ni| 久久影院电视剧免费观看| 一个色在线综合| 91视频精品在这里| 欧美激情自拍偷拍| 久久99久久久久久久久久久| 欧美色综合天天久久综合精品| 国产精品剧情在线亚洲| 国产高清不卡二三区| 日韩久久精品一区| 日本网站在线观看一区二区三区 | 麻豆成人综合网| 欧美日韩国产天堂| 一区二区成人在线视频| voyeur盗摄精品| 国产人妖乱国产精品人妖| 久久99精品久久久久久| 欧美日韩的一区二区| 自拍偷拍亚洲综合| 成人v精品蜜桃久久一区| 国产日韩欧美综合一区| 国产美女在线精品| ww亚洲ww在线观看国产| 久久精品国产久精国产爱| 7777精品伊人久久久大香线蕉完整版| 亚洲综合丝袜美腿| 91麻豆国产香蕉久久精品| 日韩一区在线看| 99免费精品在线| 18成人在线视频| 91免费版pro下载短视频| 亚洲欧美aⅴ...| 91色综合久久久久婷婷| 亚洲裸体xxx| 色婷婷综合久久久| 亚洲精品日产精品乱码不卡| 91福利精品视频| 视频一区欧美精品| 日韩欧美国产午夜精品| 玖玖九九国产精品| 久久青草国产手机看片福利盒子| 国产在线观看一区二区| 国产女人18毛片水真多成人如厕 | 亚洲欧洲精品一区二区三区| a在线欧美一区| 亚洲乱码国产乱码精品精可以看| 91日韩一区二区三区| 一区二区三区中文字幕精品精品 | 精品国产乱码久久久久久牛牛| 精品系列免费在线观看| 久久香蕉国产线看观看99| 国产高清无密码一区二区三区| 欧美激情在线看| 99re热这里只有精品免费视频 | 国产精品正在播放| 国产精品短视频| 欧美色图免费看| 久久www免费人成看片高清| 国产欧美一区二区三区沐欲 | 91视频www| 天天亚洲美女在线视频| 精品国产精品网麻豆系列 | 国内不卡的二区三区中文字幕| 久久久亚洲国产美女国产盗摄| 99久久国产免费看| 五月婷婷欧美视频| 精品av久久707| 99久久99精品久久久久久| 五月综合激情婷婷六月色窝| 精品国产91亚洲一区二区三区婷婷| 成人永久看片免费视频天堂| 亚洲综合久久av| 久久久久亚洲综合| 91九色02白丝porn| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲少妇最新在线视频| 91精品免费观看| 成人avav影音| 美腿丝袜亚洲一区| 亚洲男人天堂av| 精品国产乱码久久久久久图片| 99精品视频一区二区| 久久99蜜桃精品| 亚洲国产另类av| 国产精品无人区| 日韩精品中文字幕在线一区| 色婷婷综合久久久久中文一区二区 | 国产一区二区剧情av在线| 亚洲男女一区二区三区| 久久人人爽爽爽人久久久| 欧美日本精品一区二区三区| 成人中文字幕电影| 看电视剧不卡顿的网站| 亚洲一区二区三区四区在线观看| 久久蜜桃av一区精品变态类天堂 | 欧美日韩国产一二三| 成人毛片在线观看| 欧美bbbbb| 亚洲a一区二区| 一区二区三区资源| 中文字幕av一区二区三区高|