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

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

?? channel.c

?? 打魔獸戰(zhàn)網(wǎng)的都知道他是什么
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* * Copyright (C) 1998  Mark Baysinger (mbaysing@ucsd.edu) * Copyright (C) 1998,1999,2000  Ross Combs (rocombs@cs.nmsu.edu) * Copyright (C) 2000,2001  Marco Ziech (mmz@gmx.net) * * 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 CHANNEL_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/strrchr.h"#include "compat/strdup.h"#include "compat/strcasecmp.h"#include <errno.h>#include "compat/strerror.h"#ifdef TIME_WITH_SYS_TIME# include <sys/time.h># include <time.h>#else# ifdef HAVE_SYS_TIME_H#  include <sys/time.h># else#  include <time.h># endif#endif#ifdef HAVE_SYS_TYPES_H# include <sys/types.h>#endif#include "connection.h"#include "common/eventlog.h"#include "common/list.h"#include "message.h"#include "account.h"#include "account_wrap.h"#include "common/util.h"#include "prefs.h"#include "common/token.h"#include "channel.h"#include "irc.h"#include "common/tag.h"#include "common/xalloc.h"#include "common/setup_after.h"static t_list * channellist_head=NULL;static t_channelmember * memberlist_curr=NULL;static int totalcount=0;static int channellist_load_permanent(char const * filename);static t_channel * channellist_find_channel_by_fullname(char const * name);static char * channel_format_name(char const * sname, char const * country, char const * realmname, unsigned int id);extern int channel_set_userflags(t_connection * c);extern t_channel * channel_create(char const * fullname, char const * shortname, char const * clienttag, int permflag, int botflag, int operflag, int logflag, char const * country, char const * realmname, int maxmembers, int moderated, int clanflag, int autoname){    t_channel * channel;        if (!fullname)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL fullname");	return NULL;    }    if (fullname[0]=='\0')    {        eventlog(eventlog_level_error,__FUNCTION__,"got empty fullname");	return NULL;    }    if (shortname && shortname[0]=='\0')    {        eventlog(eventlog_level_error,__FUNCTION__,"got empty shortname");	return NULL;    }    if (clienttag && strlen(clienttag)!=4)    {	eventlog(eventlog_level_error,__FUNCTION__,"client tag has bad length (%u chars)",strlen(clienttag));	return NULL;    }        /* non-permanent already checks for this in conn_set_channel */    if (permflag)    {	if ((channel = channellist_find_channel_by_fullname(fullname)))	{	    if ((channel_get_clienttag(channel)) && (clienttag) && (strcmp(channel_get_clienttag(channel),clienttag)==0))	    {	      eventlog(eventlog_level_error,__FUNCTION__,"could not create duplicate permanent channel (fullname \"%s\")",fullname);	      return NULL;	    }	    else if (((channel->flags & channel_flags_allowbots)!=(botflag?channel_flags_allowbots:0)) || 		     ((channel->flags & channel_flags_allowopers)!=(operflag?channel_flags_allowopers:0)) || 		     (channel->maxmembers!=maxmembers) || 		     ((channel->flags & channel_flags_moderated)!=(moderated?channel_flags_moderated:0)) ||		     (channel->logname && logflag==0) || (!(channel->logname) && logflag ==1))	    {		eventlog(eventlog_level_error,__FUNCTION__,"channel parameters do not match for \"%s\" and \"%s\"",fullname,channel->name);		return NULL;	    }	}    }    channel = xmalloc(sizeof(t_channel));        if (permflag)    {	channel->flags = channel_flags_public;	if (clienttag && maxmembers!=-1) /* approximation.. we want things like "Starcraft USA-1" */	    channel->flags |= channel_flags_system;    } else	channel->flags = channel_flags_none;    if (moderated)	channel->flags |= channel_flags_moderated;    if(shortname && (!strcasecmp(shortname, CHANNEL_NAME_KICKED)       || !strcasecmp(shortname, CHANNEL_NAME_BANNED)))	channel->flags |= channel_flags_thevoid;        eventlog(eventlog_level_debug,__FUNCTION__,"creating new channel \"%s\" shortname=%s%s%s clienttag=%s%s%s country=%s%s%s realm=%s%s%s",fullname,	     shortname?"\"":"(", /* all this is doing is printing the name in quotes else "none" in parens */	     shortname?shortname:"none",	     shortname?"\"":")",	     clienttag?"\"":"(",	     clienttag?clienttag:"none",	     clienttag?"\"":")",	     country?"\"":"(",             country?country:"none",	     country?"\"":")",	     realmname?"\"":"(",             realmname?realmname:"none",             realmname?"\"":")");        channel->name = xstrdup(fullname);        if (!shortname)	channel->shortname = NULL;    else	channel->shortname = xstrdup(shortname);        if (clienttag)	channel->clienttag = xstrdup(clienttag);    else	channel->clienttag = NULL;    if (country)	channel->country = xstrdup(country);    else	channel->country = NULL;	    if (realmname)	channel->realmname = xstrdup(realmname);    else        channel->realmname=NULL;	    channel->banlist = list_create();        totalcount++;    if (totalcount==0) /* if we wrap (yeah right), don't use id 0 */	totalcount = 1;    channel->id = totalcount;    channel->maxmembers = maxmembers;    channel->currmembers = 0;    channel->memberlist = NULL;        if (permflag) channel->flags |= channel_flags_permanent;    if (botflag)  channel->flags |= channel_flags_allowbots;    if (operflag) channel->flags |= channel_flags_allowopers;    if (clanflag) channel->flags |= channel_flags_clan;    if (autoname) channel->flags |= channel_flags_autoname;        if (logflag)    {	time_t      now;	struct tm * tmnow;	char        dstr[64];	char        timetemp[CHANLOG_TIME_MAXLEN];		now = time(NULL);		if (!(tmnow = localtime(&now)))	    dstr[0] = '\0';	else	    sprintf(dstr,"%04d%02d%02d%02d%02d%02d",		    1900+tmnow->tm_year,		    tmnow->tm_mon+1,		    tmnow->tm_mday,		    tmnow->tm_hour,		    tmnow->tm_min,		    tmnow->tm_sec);	channel->logname = xmalloc(strlen(prefs_get_chanlogdir())+9+strlen(dstr)+1+6+1); /* dir + "/chanlog-" + dstr + "-" + id + NUL */	sprintf(channel->logname,"%s/chanlog-%s-%06u",prefs_get_chanlogdir(),dstr,channel->id);		if (!(channel->log = fopen(channel->logname,"w")))	    eventlog(eventlog_level_error,__FUNCTION__,"could not open channel log \"%s\" for writing (fopen: %s)",channel->logname,pstrerror(errno));	else	{	    fprintf(channel->log,"name=\"%s\"\n",channel->name);	    if (channel->shortname)		fprintf(channel->log,"shortname=\"%s\"\n",channel->shortname);	    else		fprintf(channel->log,"shortname=none\n");	    fprintf(channel->log,"permanent=\"%s\"\n",(channel->flags & channel_flags_permanent)?"true":"false");	    fprintf(channel->log,"allowbotse=\"%s\"\n",(channel->flags & channel_flags_allowbots)?"true":"false");	    fprintf(channel->log,"allowopers=\"%s\"\n",(channel->flags & channel_flags_allowopers)?"true":"false");	    if (channel->clienttag)		fprintf(channel->log,"clienttag=\"%s\"\n",channel->clienttag);	    else		fprintf(channel->log,"clienttag=none\n");	    	    if (tmnow)		strftime(timetemp,sizeof(timetemp),CHANLOG_TIME_FORMAT,tmnow);	    else		strcpy(timetemp,"?");	    fprintf(channel->log,"created=\"%s\"\n\n",timetemp);	    fflush(channel->log);	}    }    else    {	channel->logname = NULL;	channel->log = NULL;    }        channel->gameOwner = NULL;    channel->gameOwnerIP = 0;    channel->gameType = 0;    channel->gameTournament = 0;    channel->gameOptions = NULL;    list_append_data(channellist_head,channel);        eventlog(eventlog_level_debug,__FUNCTION__,"channel created successfully");    return channel;}extern int channel_destroy(t_channel * channel, t_elem ** curr){    t_elem * ban;        if (!channel)    {	eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return -1;    }        if (channel->memberlist)    {	eventlog(eventlog_level_debug,__FUNCTION__,"channel is not empty, deferring");        channel->flags &= ~channel_flags_permanent; /* make it go away when the last person leaves */	return -1;    }        if (list_remove_data(channellist_head,channel,curr)<0)    {        eventlog(eventlog_level_error,__FUNCTION__,"could not remove item from list");        return -1;    }        eventlog(eventlog_level_info,__FUNCTION__,"destroying channel \"%s\"",channel->name);        LIST_TRAVERSE(channel->banlist,ban)    {	char const * banned;		if (!(banned = elem_get_data(ban)))	    eventlog(eventlog_level_error,__FUNCTION__,"found NULL name in banlist");	else	    xfree((void *)banned); /* avoid warning */	if (list_remove_elem(channel->banlist,&ban)<0)	    eventlog(eventlog_level_error,__FUNCTION__,"unable to remove item from list");    }    list_destroy(channel->banlist);        if (channel->log)    {	time_t      now;	struct tm * tmnow;	char        timetemp[CHANLOG_TIME_MAXLEN];		now = time(NULL);	if ((!(tmnow = localtime(&now))))	    strcpy(timetemp,"?");	else	    strftime(timetemp,sizeof(timetemp),CHANLOG_TIME_FORMAT,tmnow);	fprintf(channel->log,"\ndestroyed=\"%s\"\n",timetemp);		if (fclose(channel->log)<0)	    eventlog(eventlog_level_error,__FUNCTION__,"could not close channel log \"%s\" after writing (fclose: %s)",channel->logname,pstrerror(errno));    }        if (channel->logname)	xfree((void *)channel->logname); /* avoid warning */        if (channel->country)	xfree((void *)channel->country); /* avoid warning */        if (channel->realmname)	xfree((void *)channel->realmname); /* avoid warning */    if (channel->clienttag)	xfree((void *)channel->clienttag); /* avoid warning */        if (channel->shortname)	xfree((void *)channel->shortname); /* avoid warning */    xfree((void *)channel->name); /* avoid warning */        xfree(channel);        return 0;}extern char const * channel_get_name(t_channel const * channel){    if (!channel)    {        eventlog(eventlog_level_warn,__FUNCTION__,"got NULL channel");	return "";    }        return channel->name;}extern char const * channel_get_clienttag(t_channel const * channel){    if (!channel)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return "";    }        return channel->clienttag;}extern t_channel_flags channel_get_flags(t_channel const * channel){    if (!channel)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return channel_flags_none;    }        return channel->flags;}extern int channel_set_flags(t_channel * channel, t_channel_flags flags){    if (!channel)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return -1;    }    channel->flags = flags;        return 0;}extern int channel_get_permanent(t_channel const * channel){    if (!channel)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return 0;    }        return (channel->flags & channel_flags_permanent);}extern unsigned int channel_get_channelid(t_channel const * channel){    if (!channel)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return 0;    }    return channel->id;}extern int channel_set_channelid(t_channel * channel, unsigned int channelid){    if (!channel)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return -1;    }    channel->id = channelid;    return 0;}extern int channel_rejoin(t_connection * conn){  t_channel const * channel;  char const * temp;  char const * chname;  if (!(channel = conn_get_channel(conn)))    return -1;  if (!(temp = channel_get_name(channel)))    return -1;  chname=xstrdup(temp);  conn_set_channel(conn, NULL);  if (conn_set_channel(conn,chname)<0)    conn_set_channel(conn,CHANNEL_NAME_BANNED);  xfree((void *)chname);  return 0;  }extern int channel_add_connection(t_channel * channel, t_connection * connection){    t_channelmember * member;    t_connection *    user;        if (!channel)    {	eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");	return -1;    }    if (!connection)    {	eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection");	return -1;    }        if (channel_check_banning(channel,connection))    {	channel_message_log(channel,connection,0,"JOIN FAILED (banned)");	return -1;    }    member = xmalloc(sizeof(t_channelmember));    member->connection = connection;    member->next = channel->memberlist;    channel->memberlist = member;    channel->currmembers++;    channel_message_log(channel,connection,0,"JOINED");        message_send_text(connection,message_type_channel,connection,channel_get_name(channel));    if ((!(channel->flags & channel_flags_permanent))         && (!(channel->flags & channel_flags_thevoid))         && (!(channel->flags & channel_flags_clan)) 	&& (channel->currmembers==1) 	&& (account_is_operator_or_admin(conn_get_account(connection),channel_get_name(channel))==0))    {	message_send_text(connection,message_type_info,connection,"you are now tempOP for this channel");	conn_set_tmpOP_channel(connection,(char *)channel_get_name(channel));	channel_update_userflags(connection);    }    if(!(channel_get_flags(channel) & channel_flags_thevoid))        for (user=channel_get_first(channel); user; user=channel_get_next())        {	    message_send_text(connection,message_type_adduser,user,NULL);    	    if (user!=connection)    		message_send_text(user,message_type_join,connection,NULL);        }        /* please don't remove this notice */    if (channel->log)	message_send_text(connection,message_type_info,connection,prefs_get_log_notice());        return 0;}extern int channel_del_connection(t_channel * channel, t_connection * connection){    t_channelmember * curr;    t_channelmember * temp;    t_elem * curr2;        if (!channel)    {	eventlog(eventlog_level_error,__FUNCTION__,"got NULL channel");        return -1;    }    if (!connection)    {	eventlog(eventlog_level_error,__FUNCTION__,"got NULL connection");        return -1;    }        channel_message_log(channel,connection,0,"PARTED");        channel_message_send(channel,message_type_part,connection,NULL);        curr = channel->memberlist;    if (curr->connection==connection)    {        channel->memberlist = channel->memberlist->next;        xfree(curr);    }    else    {        while (curr->next && curr->next->connection!=connection)            curr = curr->next;                if (curr->next)        {            temp = curr->next;            curr->next = curr->next->next;            xfree(temp);        }	else	{	    eventlog(eventlog_level_error,__FUNCTION__,"[%d] connection not in channel member list",conn_get_socket(connection));	    return -1;	}    }    channel->currmembers--;    if (conn_get_tmpOP_channel(connection) && 	strcmp(conn_get_tmpOP_channel(connection),channel_get_name(channel))==0)    {	conn_set_tmpOP_channel(connection,NULL);    }        if (!channel->memberlist && !(channel->flags & channel_flags_permanent)) /* if channel is empty, delete it unless it's a permanent channel */

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性欧美巨大黑白大战| 精品国产乱码久久久久久蜜臀| 亚洲午夜电影在线观看| 欧美精品一区视频| 欧美最新大片在线看| 激情小说欧美图片| 水蜜桃久久夜色精品一区的特点| 不卡一卡二卡三乱码免费网站 | av中文字幕一区| 亚洲欧美国产77777| 6080yy午夜一二三区久久| 成人免费av在线| 日本亚洲欧美天堂免费| 国产精品成人免费| 久久日韩精品一区二区五区| 欧美浪妇xxxx高跟鞋交| www.欧美日韩| 国产精品99久| 精品亚洲免费视频| 午夜伦欧美伦电影理论片| 亚洲婷婷在线视频| 7777精品伊人久久久大香线蕉超级流畅 | 激情小说欧美图片| 亚洲美女在线国产| 久久精品国产99| 亚洲丶国产丶欧美一区二区三区| 成人动漫一区二区三区| 日韩成人av影视| 亚洲一区二区三区不卡国产欧美| 久久久久国产免费免费| 欧美电视剧免费全集观看| 91精品国产一区二区三区蜜臀 | 三级亚洲高清视频| 亚洲综合小说图片| 亚洲国产精品麻豆| 亚洲自拍偷拍麻豆| 日本不卡免费在线视频| 精品一区二区三区香蕉蜜桃| 国产美女一区二区三区| 成人av电影在线观看| 色综合天天狠狠| 欧美一级高清片| 中文字幕国产一区| 亚洲高清视频在线| 国产麻豆一精品一av一免费 | 亚洲免费看黄网站| 午夜精彩视频在线观看不卡| 狠狠色丁香婷婷综合| av亚洲精华国产精华精华| 欧美日韩高清一区二区不卡| www激情久久| 亚洲最大成人综合| 狠狠色综合色综合网络| 色婷婷国产精品| 日韩一区二区三区免费观看| 国产网红主播福利一区二区| 亚洲高清中文字幕| 成人黄页在线观看| 欧美一级国产精品| ㊣最新国产の精品bt伙计久久| 日韩国产在线观看| 91免费国产在线观看| 精品88久久久久88久久久| 一区二区三区四区不卡视频| 国产伦精品一区二区三区免费| 在线视频国内一区二区| 国产日本一区二区| 九色综合国产一区二区三区| 欧美中文字幕久久| 亚洲天堂久久久久久久| 国产一区二区剧情av在线| 欧美久久久久久久久久| 一区二区在线观看免费视频播放| 丁香亚洲综合激情啪啪综合| 欧美大片顶级少妇| 日韩电影免费一区| 欧美欧美午夜aⅴ在线观看| 亚洲精品国产精品乱码不99| 风间由美中文字幕在线看视频国产欧美| 88在线观看91蜜桃国自产| 亚洲线精品一区二区三区八戒| www.爱久久.com| ㊣最新国产の精品bt伙计久久| 国产成人精品影视| 中文字幕第一页久久| 成人免费av在线| 国产精品区一区二区三区| 国产成人精品综合在线观看| 亚洲精品一区二区三区蜜桃下载| 久久66热偷产精品| 精品国产sm最大网站免费看| 九一九一国产精品| 久久免费电影网| 精品午夜久久福利影院 | 亚洲国产aⅴ成人精品无吗| 欧日韩精品视频| 日韩精品免费专区| 精品三级av在线| 懂色av一区二区三区蜜臀 | 国产福利一区二区三区| 国产免费成人在线视频| 99亚偷拍自图区亚洲| 一区二区在线电影| 日韩视频免费观看高清完整版 | 国产精品综合二区| 亚洲色图制服丝袜| 欧美一卡在线观看| 福利一区在线观看| 香蕉影视欧美成人| 久久蜜桃一区二区| 在线观看日韩av先锋影音电影院| 丝袜诱惑制服诱惑色一区在线观看 | 欧美老肥妇做.爰bbww视频| 久草精品在线观看| 一区二区三区在线免费| 91精品国产综合久久久蜜臀图片| 国产高清在线精品| 一区二区三区精品视频| 欧美mv日韩mv国产网站| 色综合久久天天综合网| 国产在线精品一区二区夜色| 亚洲丝袜精品丝袜在线| 日韩三级免费观看| 91啦中文在线观看| 国产美女一区二区| 日韩专区欧美专区| 日韩伦理免费电影| 久久久久9999亚洲精品| 欧美一区二区在线不卡| 色综合久久中文字幕综合网| 国产资源在线一区| 天天综合网 天天综合色| 亚洲欧洲日韩女同| 国产日韩欧美精品在线| 欧美高清dvd| 欧美在线免费播放| www..com久久爱| 国产精品综合av一区二区国产馆| 亚洲 欧美综合在线网络| 亚洲欧美偷拍三级| 一区在线中文字幕| 中文字幕一区二区在线观看| 日韩你懂的在线观看| 91精品黄色片免费大全| 欧美手机在线视频| 欧美在线视频你懂得| 在线观看一区二区精品视频| 成人黄色大片在线观看| 国产精品99久久不卡二区| 国产精品一二一区| 懂色av一区二区三区免费看| 国产成人av电影在线播放| 国产精品一区二区黑丝| 国产一区二区三区美女| 国产凹凸在线观看一区二区| 成人精品高清在线| 成人午夜电影网站| 91免费国产视频网站| 欧美综合欧美视频| 在线播放中文字幕一区| 欧美一区二区人人喊爽| 欧美电视剧在线观看完整版| 精品国产免费人成在线观看| 精品99一区二区| 国产精品美女一区二区三区 | 久久久久久久综合狠狠综合| 国产日韩综合av| 亚洲美女淫视频| 无码av中文一区二区三区桃花岛| 美女网站色91| 成人av网站免费| 欧美群妇大交群中文字幕| 欧美变态凌虐bdsm| 国产精品国产三级国产| 亚洲一区二区三区美女| 久久9热精品视频| 高清不卡一区二区| 欧美性色黄大片手机版| 欧美一级二级三级乱码| 国产精品美女久久久久高潮| 亚洲成av人片一区二区梦乃| 六月丁香婷婷色狠狠久久| 91亚洲精品乱码久久久久久蜜桃| 制服丝袜中文字幕一区| 国产精品久久久久婷婷| 午夜精品福利在线| 91在线观看视频| 日韩精品中文字幕在线不卡尤物| 国产精品欧美一区二区三区| 五月综合激情婷婷六月色窝| 成人高清伦理免费影院在线观看| 91精品午夜视频| 一区二区三区在线观看动漫| 韩国精品免费视频| 这里只有精品99re| 亚洲一区二区成人在线观看| 国产精品原创巨作av| 欧美一级黄色大片| 亚洲v日本v欧美v久久精品| 成人动漫一区二区三区|