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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? helpfile.c

?? 打魔獸戰網的都知道他是什么
?? C
字號:
/* * Copyright (C) 2000  Dizzy  * * 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. */#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/strcasecmp.h"#include <ctype.h>#include <errno.h>#include "compat/strerror.h"#include "message.h"#include "connection.h"#include "common/util.h"#include "common/eventlog.h"#include "common/xalloc.h"#include "helpfile.h"#include "common/setup_after.h"#include "account_wrap.h"#include "command_groups.h"static FILE* hfd=NULL; /* helpfile descriptor */static int list_commands(t_connection *);static int describe_command(t_connection *, char const *);extern int helpfile_init(char const *filename){    if (!filename)    {        eventlog(eventlog_level_error,__FUNCTION__,"got NULL filename");	return -1;    }    if (!(hfd = fopen(filename,"r")))    {        eventlog(eventlog_level_error,__FUNCTION__,"could not open help file \"%s\" for reading (fopen: %s)",filename,pstrerror(errno));        return -1;    }    return 0;}extern int helpfile_unload(void){    if (hfd!=NULL)    {	if (fclose(hfd)<0)	    eventlog(eventlog_level_error,__FUNCTION__,"could not close help file after reading (fclose: %s)",pstrerror(errno));	hfd = NULL;    }    return 0;}extern int handle_help_command(t_connection * c, char const * text){    unsigned int i,j;    char         comm[MAX_COMMAND_LEN];            if (hfd == NULL)    { /* an error ocured opening readonly the help file, helpfile_unload was called, or helpfile_init hasn't been called */        message_send_text(c,message_type_error,c,"Oops ! There is a problem with the help file. Please contact the administrator of the server.");        return 0;    }        rewind(hfd);    for (i=0; text[i]!=' ' && text[i]!='\0'; i++); /* skip command */    for (; text[i]==' '; i++);    if (text[i]=='/') /* skip / in front of command (if present) */        i++;    for (j=0; text[i]!=' ' && text[i]!='\0'; i++) /* get comm */    if (j<sizeof(comm)-1) comm[j++] = text[i];    comm[j] = '\0';            /* just read the whole file and dump only the commands */    if (comm[0]=='\0')    {        list_commands(c);        return 0;    }        if (describe_command(c,comm)==0) return 0;    /* no description was found for this command. inform the user */    message_send_text(c,message_type_error,c," no help available for that command");    return 0;}static int list_commands(t_connection * c){    char * line;    int    i;        message_send_text(c,message_type_info,c,"Chat commands:");    while ((line=file_get_line(hfd))!=NULL)    {        for (i=0;line[i]==' ' && line[i]!='\0';i++); /* skip spaces in front of %command */        if (line[i]=='%')  /* is this a command ? */        {            char *p,*buffer;            int al;	    int skip;	    unsigned int length,position;	                /* ok. now we must see if there are any aliases */            length=MAX_COMMAND_LEN+1; position=0;            buffer=xmalloc(length+1); /* initial memory allocation = pretty fair */            p=line+i;            do	    {                al=0;		skip = 0;                for (i=1;p[i]!=' ' && p[i]!='\0' && p[i]!='#';i++); /* skip command */                if (p[i]==' ') al=1; /* we have something after the command.. must remember that */                p[i]='\0'; /* end the string at the end of the command */                p[0]='/'; /* change the leading character (% or space) read from the help file to / */		if (!(command_get_group(p) & account_get_command_groups(conn_get_account(c)))) skip=1;                if (length<strlen(p)+position+1)                /* if we don't have enough space in the buffer then get some */                length=strlen(p)+position+1; /* the new length */                buffer=xrealloc(buffer,length+1);                buffer[position++]=' '; /* put a space before each alias */                /* add the alias to the output string */                strcpy(buffer+position,p); position+=strlen(p);                if (al)		{                    for (;p[i+1]==' ' && p[i+1]!='\0' && p[i+1]!='#';i++); /* skip spaces */                    if (p[i+1]=='\0' || p[i+1]=='#')		    {			al=0; continue;                    }                    p+=i; /* jump to the next command */                }            } while (al);            if (!skip) message_send_text(c,message_type_info,c,buffer); /* print out the buffer */            xfree(buffer);        }    }    file_get_line(NULL); // clear file_get_line buffer    return 0;}static int describe_command(t_connection * c, char const * comm){    char * line;    int    i;        /* ok. the client requested help for a specific command */    while ((line=file_get_line(hfd))!=NULL)    {        for (i=0;line[i]==' ' && line[i]!='\0';i++); /* skip spaces in front of %command */        if (line[i]=='%') /* is this a command ? */        {            char *p;            int al;            /* ok. now we must see if there are any aliases */            p=line+i;            do	    {                al=0;                for (i=1;p[i]!=' ' && p[i]!='\0' && p[i]!='#';i++); /* skip command */                if (p[i]==' ') al=1; /* we have something after the command.. must remember that */                p[i]='\0'; /* end the string at the end of the command */                if (strcasecmp(comm,p+1)==0) /* is this the command the user asked for help ? */                {                    while ((line=file_get_line(hfd))!=NULL)                    { /* write everything until we get another % or EOF */                        for (i=0;line[i]==' ';i++); /* skip spaces in front of a possible % */                        if (line[i]=='%')			{                            break; /* we reached another command */                        }                        if (line[0]!='#')			{ /* is this a whole line comment ? */                            /* truncate the line when a comment starts */                            for (;line[i]!='\0' && line[i]!='#';i++);                            if (line[i]=='#') line[i]='\0';                            message_send_text(c,message_type_info,c,line);                        }                    }                    return 0;                }                if (al)		{                    for (;p[i+1]==' ' && p[i+1]!='\0';i++); /* skip spaces */                    if (p[i+1]=='\0')		    {                        al=0; continue;                    }                    p+=i; /* jump to the next command */                }            } while (al);        }    }    file_get_line(NULL); // clear file_get_line buffer        return -1;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级资源在线| 91看片淫黄大片一级在线观看| 亚洲猫色日本管| 国产精品无人区| 国产日本欧美一区二区| 国产亚洲欧美日韩日本| 国产午夜亚洲精品羞羞网站| 2023国产精品| 国产精品国产三级国产普通话99| 国产精品麻豆视频| 亚洲欧洲成人自拍| 一级特黄大欧美久久久| 亚洲高清不卡在线观看| 日韩激情在线观看| 黄色资源网久久资源365| 国产精品一二三| 成人激情免费电影网址| 色综合天天综合网天天狠天天| 色爱区综合激月婷婷| 欧美日韩一级片在线观看| 久久综合色之久久综合| 免费久久精品视频| 日韩一区二区在线看| 日韩欧美国产精品| 亚洲国产精品ⅴa在线观看| 国产精品乱码人人做人人爱| 亚洲黄色尤物视频| 三级不卡在线观看| 国产一区二区在线电影| 色综合天天在线| 欧美日韩1234| 中文字幕不卡在线观看| 五月综合激情婷婷六月色窝| 国产激情视频一区二区在线观看| 99视频超级精品| 欧美mv日韩mv亚洲| 依依成人精品视频| 激情av综合网| 欧美精品久久天天躁| 国产精品麻豆网站| 久久精品免费观看| 在线观看视频91| 国产欧美一区二区精品性| 亚洲成a人片在线不卡一二三区| 国产伦精品一区二区三区视频青涩 | 欧美三级资源在线| 日韩欧美卡一卡二| 久久欧美一区二区| 亚洲一区二区av电影| 麻豆中文一区二区| 成人一区在线看| 欧美一区二区三区免费视频| 国产精品美日韩| 亚洲欧洲日韩女同| 国产一二精品视频| 欧美日精品一区视频| 久久这里只有精品首页| 夜夜嗨av一区二区三区四季av| 日本欧美在线看| 成人久久18免费网站麻豆| 欧美成人猛片aaaaaaa| 亚洲欧美另类小说| 国产激情一区二区三区四区| 欧美日韩亚洲不卡| 日本一区二区三区四区| 午夜电影网一区| 91视频.com| 国产人伦精品一区二区| 免费日本视频一区| 欧美中文字幕久久| 日韩毛片高清在线播放| 国产成人丝袜美腿| 欧美成人国产一区二区| 亚洲午夜日本在线观看| 成人激情图片网| 久久精品在线观看| 日韩激情一区二区| 欧美色图在线观看| 亚洲福利一区二区三区| 99九九99九九九视频精品| 久久久国际精品| 激情久久五月天| 日韩欧美国产成人一区二区| 日韩不卡一二三区| 欧美私人免费视频| 亚洲自拍偷拍av| 欧美视频一区二区| 亚洲视频一二三| 欧美日韩中文字幕一区| 亚洲综合丁香婷婷六月香| 色综合久久久久网| 一区二区三区精品在线观看| 91在线porny国产在线看| 国产精品网站在线观看| 成人国产精品视频| 精品国产第一区二区三区观看体验 | 国产亚洲欧美在线| 懂色av一区二区在线播放| 欧美精品一区二区久久婷婷| 久久精品99国产精品| 日韩精品一区二区三区蜜臀| 极品尤物av久久免费看| 日韩欧美激情在线| 国产真实乱偷精品视频免| 国产色产综合色产在线视频| 成人一区二区视频| 亚洲成精国产精品女| 56国语精品自产拍在线观看| 日韩va欧美va亚洲va久久| 久久婷婷久久一区二区三区| 国产成人在线色| 26uuu精品一区二区| 91碰在线视频| 三级不卡在线观看| 久久久不卡网国产精品一区| 成人app网站| 视频一区二区三区中文字幕| 欧美一区二区不卡视频| 国产91精品精华液一区二区三区| 中文字幕亚洲精品在线观看| 欧美亚洲一区三区| 美女www一区二区| 亚洲欧洲日韩av| 91精品国产综合久久精品麻豆| 精品一区二区三区免费播放| 综合色中文字幕| 91麻豆精品91久久久久同性| 国产福利一区在线观看| 夜夜揉揉日日人人青青一国产精品| 欧美精品高清视频| 国产一区二区美女| 日韩精品1区2区3区| 成人欧美一区二区三区黑人麻豆| 欧美私模裸体表演在线观看| 国产高清不卡一区| 国产一区二区三区免费播放| 日韩和的一区二区| 亚洲欧美精品午睡沙发| 久久精品在线免费观看| 在线成人免费观看| 波多野结衣亚洲| 国产成人av在线影院| 免费不卡在线视频| 亚洲一区二区在线视频| 国产亚洲精品aa| 欧美成人一区二区三区| 欧美在线制服丝袜| 成人国产精品免费观看| 成人在线视频一区| 狠狠色伊人亚洲综合成人| 视频一区视频二区中文字幕| 国产精品视频第一区| 精品国产乱码久久久久久图片| 欧美视频在线播放| 色婷婷av一区二区三区软件| 国产99精品国产| 高清不卡在线观看| 国产精品影视在线观看| 久久99精品久久久久久动态图| 丝袜诱惑亚洲看片| 亚洲国产cao| 国产精品日日摸夜夜摸av| 国产亚洲成av人在线观看导航| 51精品久久久久久久蜜臀| 精品视频一区二区不卡| 色哦色哦哦色天天综合| 波多野结衣中文字幕一区二区三区| 国产成人精品亚洲日本在线桃色 | 日韩va亚洲va欧美va久久| 琪琪久久久久日韩精品| 午夜免费欧美电影| 午夜精品福利在线| 免费在线欧美视频| 免费看欧美美女黄的网站| 秋霞午夜av一区二区三区| 人人爽香蕉精品| 奇米色一区二区| 国产成人在线视频免费播放| 高潮精品一区videoshd| 成人免费视频免费观看| 不卡一区二区中文字幕| k8久久久一区二区三区| 色女孩综合影院| 91精品蜜臀在线一区尤物| 欧美大片顶级少妇| 久久久午夜精品| 欧美国产丝袜视频| 性做久久久久久免费观看欧美| 亚洲大尺度视频在线观看| 日本欧洲一区二区| 国产激情视频一区二区三区欧美 | 色婷婷久久久久swag精品 | 国产一区二区三区综合| 国产不卡一区视频| 91在线视频播放地址| 欧美日韩一区高清| 精品av综合导航| 国产精品久久久久久亚洲伦| 午夜视频在线观看一区二区三区| 亚洲成av人在线观看|