protected void btn_Season_Click(object sender, EventArgs e) { if (tb_KeyWords.Text.Trim() != "") { Response.Write(sc.GetGameSeason(tb_KeyWords.Text.ToString().Trim()).Replace("\n", "<br>")); } }
protected void com(string Event, string Qunid, string Qunnid, string Sender, string Nick, string Message, string AdminQQ) { string[] sArray1 = System.Text.RegularExpressions.Regex.Split(Message, " "); string command = sArray1[0]; int msgsArray1 = 1; int adminmsgzu = 2; string msg = ""; string adminmsg = ""; if (sArray1.Length > 1) { while (msgsArray1 < sArray1.Length) { msg += sArray1[msgsArray1]; msg += " "; msgsArray1++; } if (sArray1.Length > 2) { while (adminmsgzu < sArray1.Length) { adminmsg += sArray1[adminmsgzu]; adminmsg += " "; adminmsgzu++; } } } switch (command.ToLower()) { //功能参数区----------------------------- case "@": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, string.Format("你好,我是" + RobotName + "!\r======您可以使用如下命令======\r{0}聊天 与小i机器人进行对话\r{0}tq 天气查询(老)\r{0}weather 天气查询(新)\r{0}ip 查询IP归属地\r{0}md5 查询MD5加密数值\r{0}qun 查询本群信息资料\r{0}qq 查询QQ状态\r{0}bm 查询 base64 加密\r{0}jm 查询 base64 解密\r{0}by 查询异或后 base64 加密\r{0}jy 查询异或后 base64 解密\r{0}cfs 查询 Cfs加密 单项不可逆\r{0}al 查询全球 Alexa 排名\r{0}ips 查询同服务器下站点数量\r{0}dns 查询本域名下的DNS服务器\r{0}sfz 查询身份证信息\r{0}t18 15位身份证升级为18为身份证\r{0}m 查询手机归属地\r{0}who *域名或IP地址的 WHOIS 记录查询\r直接输入命令将回复使用方法!\r更多功能正在添加中!\r======您是管理员,可以使用下面的功能!======\r1.to QQ号码 消息内容->发送QQ消息\r2.q 群号 内容->发送群消息\r3.tc QQ号码->给好友发送震动\r4.{0}reset->重新启动机器人\r5.{0}update->更新机器人\r======您是超级管理员,可以使用下面的功能!======\r1、{0}turn 游戏赛季更新检测 例:{0}turn BB\r2、{0}status 游戏夜间更新检测 例:{0}status BB\r3、{0}season 查询赛季更新详情 例:{0}season XBA\r4、{0}check 查询夜间更新是否执行 例:{0}check BB\r5、{0}ping PING命令 例:{0}ping www.baidu.com", fenge)); } else { SendMessage(Event, Sender, Qunnid, string.Format("你好,我是" + RobotName + "!\r======您可以使用如下命令======\r{0}聊天 与小i机器人进行对话\r{0}tq 天气查询(老)\r{0}weather 天气查询(新)\r{0}ip 查询IP归属地\r{0}md5 查询MD5加密数值\r{0}qun 查询本群信息资料\r{0}qq 查询QQ状态\r{0}bm 查询 base64 加密\r{0}jm 查询 base64 解密\r{0}by 查询异或后 base64 加密\r{0}jy 查询异或后 base64 解密\r{0}cfs 查询 Cfs加密 单项不可逆\r{0}al 查询全球 Alexa 排名\r{0}ips 查询同服务器下站点数量\r{0}dns 查询本域名下的DNS服务器\r{0}sfz 查询身份证信息\r{0}t18 15位身份证升级为18为身份证\r{0}m 查询手机归属地\r{0}who *域名或IP地址的 WHOIS 记录查询\r直接输入命令将回复使用方法!\r更多功能正在添加中!", fenge)); } break; case "@聊天": if (sArray1.Length != 1) { RobotApi r = new RobotApi(); r.Xiaoi(); getcode = r.chatXiaoi(msg, RobotName); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "你想对我说什么?干嘛那么墨迹..."); } break; case "@ip": if (sArray1.Length == 2) { getcode = Nick + ",您查询的信息如下:\r" + NetRobotApi.RobotApi.chaip(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。请返回检查!谢谢合作!"); } break; case "@weather": if (sArray1.Length == 2) { RobotApi api = new RobotApi(); getcode = Nick + "," + api.GetWeather(sArray1[1], "3"); SendMessage(Event, Sender, Qunnid, getcode); } else if (sArray1.Length == 3) { RobotApi api = new RobotApi(); getcode = Nick + "," + api.GetWeather(sArray1[1], sArray1[2]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r天气查询(新)使用方法:@weather 城市名 或(区号,拼音(支持模糊),邮编)\r例:\r@weather 北京(城市名)\r@weather 0597(区号)\r@weather beijin(拼音)\r@weather 364000(邮编)"); } break; case "@md5": //查询MD5加密数值 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.Md5(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\rMD5加密查询使用方法:@md5 明文\r例:@md5 Vckers"); } break; case "@qq": //查询QQ状态 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.QQonline(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询QQ状态使用方法:@qq QQ号码\r例:@qq 582257138"); } break; case "@bm": //查询 base64 加密 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.enbase64(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询 base64 加密使用方法:@bm 明文\r例:@bm Vckers"); } break; case "@jm": //查询 base64 解密 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.debase64(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询 base64 解密使用方法:@jm 密文\r例:@jm VmNrZXJz"); } break; case "@by": //查询异或后 base64 加密 if (sArray1.Length == 3) { getcode = Nick + "," + NetRobotApi.RobotApi.encode(sArray1[1], sArray1[2]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询异或后 base64 加密使用方法:@by 明文 异或参数\r例:@by 123456 Vckers"); } break; case "@jy": //查询异或后 base64 解密 if (sArray1.Length == 3) { getcode = Nick + "," + NetRobotApi.RobotApi.decode(sArray1[1], sArray1[2]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询异或后 base64 解密使用方法:@jy 密文 异或参数\r例:@jy UllWRkZg Vckers"); } break; case "@cfs": //查询 Cfs加密 单项不可逆 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.cfs(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询 Cfs加密使用方法:@cfs 明文 (注意:该操作不可逆)\r例:@cfs Vckers"); } break; case "@hb": //货币换算查询 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.chaip(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。请返回检查!谢谢合作!"); } break; case "@al": //查询全球 Alexa 排名 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.Alexa(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询全球 Alexa 排名使用方法:@al 域名 (注意:不需要带http头)\r例:@al Vckers.com"); } break; case "@ips": //查询同服务器下站点数量 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.chaip(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。请返回检查!谢谢合作!"); } break; case "@dns": //查询本域名下的DNS服务器 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.dns(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询本域名下的DNS服务器使用方法:@dns 域名 (注意:不需要带http头)\r例:@dns Vckers.com"); break; case "@who": //域名或 IP 地址的 WHOIS 记录查询: if (sArray1.Length == 2) { Match m1 = Regex.Match(sArray1[1], @"([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?", RegexOptions.Compiled | RegexOptions.IgnoreCase); if (m1.Success) { getcode = Nick + "," + NetRobotApi.RobotApi.whois("domain", sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } Match m2 = Regex.Match(sArray1[1], "[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}", RegexOptions.Compiled | RegexOptions.IgnoreCase); if (m2.Success) { getcode = Nick + "," + NetRobotApi.RobotApi.whois("ip", sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "该域名不是标准域名或IP格式!"); } } SendMessage(Event, Sender, Qunnid, Nick + "," + "*本功能尚未完善*\r参数错误。\r域名或IP地址的 WHOIS 记录查询使用方法:@dns 域名 或 IP (注意:域名不需要带http头)\r例:\r@who Vckers.com(域名)\r@who 202.108.33.32(IP地址)"); break; case "@sfz": //身份证信息查询 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.sfz(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } break; case "@t18": //15位身份证升级为18为身份证 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.upto18(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } SendMessage(Event, Sender, Qunnid, Nick + "," + "*本功能尚未完善*\r参数错误。\r域名或IP地址的 WHOIS 记录查询使用方法:@dns 域名 或 IP (注意:域名不需要带http头)\r例:\r@who Vckers.com(域名)\r@who 202.108.33.32(IP地址)"); break; case "@m": //查询手机号码归属地 if (sArray1.Length == 2) { if (sArray1[1].Length == 11) { getcode = Nick + "," + NetRobotApi.RobotApi.shouji(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "恩,我记得手机号码应该是11位的吧..你输入的好像不是11位哦?"); } } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r手机归属地查询使用方法:@m 手机号码\r例:@m 13459777850"); } break; //========================= Cupid 自定义内容 ========================= case "@turn": //赛季更新查询 if (sArray1.Length == 2) { strResult = sc.GetGameTurn(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r赛季更新检测的使用方法:@turn 项目名称(BB,FB)\r例:@turn BB"); } break; case "@status": //夜间更新查询 if (sArray1.Length == 2) { strResult = sc.GetGameStatus(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r夜间更新检测的使用方法:@status 项目名称(BB,FB)\r例:@status BB"); } break; case "@mail": //发送邮件 if (sArray1.Length == 4) { strResult = sm.SendMail(sArray1[1], sArray1[2], sArray1[3]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r夜间更新检测的使用方法:@mail 收件邮件 邮件主题 邮件内容\r例:@mail [email protected] 开会 三点开会"); } break; case "@season": //赛季更新时间查询 if (sArray1.Length == 2) { strResult = sc.GetGameSeason(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r赛季更新检测的使用方法:@season 关键字名称(XBA,DW,TOM)\r例:@season XBA"); } break; case "@check": //查询夜间更新是否执行 if (sArray1.Length == 2) { strResult = sc.GetGameCheck(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询夜间更新是否执行的使用方法:@check 项目名称(BB,FB)\r例:@check BB"); } break; case "@userinfo": //查询用户信息 if (sArray1.Length == 3) { strResult = si.UserInfo(sArray1[1].ToString(), sArray1[2]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询用户信息的使用方法:\r@userinfo 用户名类型(0为经理名|1为用户名) 经理名\r例:@userinfo 0 风中脱手"); } break; case "@ping": //PING命令 if (sArray1.Length == 3 || sArray1.Length == 2) { int intSendCount = 0; if (sArray1.Length == 2) { intSendCount = 4; } else { intSendCount = Convert.ToInt32(sArray1[2]); } strResult = sm.Pings(sArray1[1].ToString(), intSendCount); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\rPING命令的使用方法:@ping 地址/IP 发包数(选填项不填默认为4个包)\r例:@ping www.baidu.com"); } break; //==================================================================== case "to": if (sArray1.Length > 2) { if (YZadmin(Sender) == "T") { SendApi("SendMessage", sArray1[1], adminmsg); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } } break; case "@reset": if (YZadmin(Sender) == "T") { SendApi("Reset", Qunnid, adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人重启命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "@update": if (YZadmin(Sender) == "T") { //SendApi("Reset", Qunnid, adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人更新命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "@exit": if (YZadmin(Sender) == "T") { SendApi("Exit", "", ""); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人退出命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "@login": if (YZadmin(Sender) == "T") { SendApi("Login", "", ""); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人登陆命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "@change": if (YZadmin(Sender) == "T") { if (sArray1.Length == 3) { que.Enqueue(string.Format("Change\r{0}\r{1}", sArray1[1], sArray1[2])); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "更换机器人号码成功!更换后的号码为:" + sArray1[1])); } } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "q": if (YZadmin(Sender) == "T") { SendApi("SendClusterMessage", sArray1[1], adminmsg); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "tc": if (YZadmin(Sender) == "T") { SendApi("SendVibration", sArray1[1], adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "操作成功!成功把参数传给机器人!请等待机器人回应!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; //------------------------------------ //休眠命令----------------------------- case "小璇,咱睡觉去": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "好啊!累死我了,睡觉去咯....."); } else { SendMessage(Event, Sender, Qunnid, "咳咳,我和你很熟吗?你就这么命令我?"); } break; case "小璇,洗白白去咯": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "洗白白..洗白白...拜拜咯~ (*^__^*) "); } else { SendMessage(Event, Sender, Qunnid, "你个色狼,想看人家洗澡...呜呜..."); } break; case "小璇,屏蔽所有信息,等我命令": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "收到命令!执行……,嘿嘿屏蔽成功!就等你说话呢!"); } else { SendMessage(Event, Sender, Qunnid, "你谁啊..又不是我的主人..凭什么命令我?"); } break; case "小璇,撤除屏蔽": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunon\r1\r1")); SendMessage(Event, Sender, Qunnid, "好了,已经撤除屏蔽"); return; } else { SendMessage(Event, Sender, Qunnid, "恩?你教我撤就撤。那我的面子往哪放?"); } break; case "小璇,睡觉去吧": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "恩,好的,柏拉再见哦"); } else { SendMessage(Event, Sender, Qunnid, "不行,我在等柏拉呢"); } break; case "小璇,起床了": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunon\r1\r1")); SendMessage(Event, Sender, Qunnid, "起床啦....我又回来了"); return; } break; case "小璇,给我回来": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunon\r1\r1")); SendMessage(Event, Sender, Qunnid, "我又回来了 - -!"); return; } SendMessage(Event, Sender, Qunnid, "去..给爷滚开,我又没出去!"); break; //------------------------------------ //自动回复----------------------------- case "小璇,求代码": SendMessage(Event, Sender, Qunnid, "哈哈,你要我的代码?我现在还没开源哦..."); break; case "小璇,求程序": if (Qunid == "93068095") { SendMessage(Event, Sender, Qunnid, "恭喜您,您已经加入了QQ机器人俱乐部。\r现在请打开群共享,选择最新版本下载!"); } else { SendMessage(Event, Sender, Qunnid, "恩,程序啊...请加群93068095获得。"); } break; case "小璇,程序打不开": if (Qunid == "93068095") { SendMessage(Event, Sender, Qunnid, "请您打开群共享,下载机器人教程观看!如果无法解决请联系管理员!"); } else { SendMessage(Event, Sender, Qunnid, "打不开?出错了?请加群93068095解决!"); } break; case "q群": case "qq群": case "小璇,qq群是多少?": case "小璇,交流群号码多少?": SendMessage(Event, Sender, Qunnid, "QQ机器人俱乐部:93068095\r该群提供机器人程序,机器人接口,支持刷屏,测试QQ机器人等"); break; case "小璇,喊大爷": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, "柏拉大爷好!"); } else { SendMessage(Event, Sender, Qunnid, "喊你个XXOO的"); } break; case "小璇,清屏": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, "\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r清理完毕!"); } else { SendMessage(Event, Sender, Qunnid, "人家只认柏拉"); } break; case "小璇": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, "柏拉大爷,我在呢,找小的干嘛?"); } else { SendMessage(Event, Sender, Qunnid, "爷在呢,找我干嘛?"); } break; case "小璇,骂他们": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, "我XX你个OO的...你们再欺负我就画个圈圈诅咒你们!!"); } else { SendMessage(Event, Sender, Qunnid, "你叫我骂就骂啊,那我岂不是很没面子 - -!"); } break; case "接口版本": { SendMessage(Event, Sender, Qunnid, "该接口为官方接口\r更新日期 2010年12月19日 19:24:08 \r开发者:柏拉"); break; } default: if (Event == "ReceiveNormalIM") { RobotApi r = new RobotApi(); r.Xiaoi(); getcode = r.chatXiaoi(msg, RobotName); SendMessage(Event, Sender, Qunnid, getcode); } else { }; break; //------------------------------------ } }
protected void com(string Event, string Qunid, string Qunnid, string Sender, string Nick, string Message, string AdminQQ) { string[] sArray1 = System.Text.RegularExpressions.Regex.Split(Message, " "); string command = sArray1[0]; int msgsArray1 = 1; int adminmsgzu = 2; string msg = ""; string strResult = ""; string adminmsg = ""; if (sArray1.Length > 1) { while (msgsArray1 < sArray1.Length) { msg += sArray1[msgsArray1]; msg += " "; msgsArray1++; } if (sArray1.Length > 2) { while (adminmsgzu < sArray1.Length) { adminmsg += sArray1[adminmsgzu]; adminmsg += " "; adminmsgzu++; } } } switch (command.ToLower()) { //功能参数区----------------------------- case "/": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, string.Format(" 你好,我是" + RobotName + "!\r===========您可以使用如下命令:===========\r/聊天 与小i机器人进行对话\r/学习 教机器人说话!\r/tq 天气查询\r/ip 查询IP归属地\r/md5 查询MD5加密数值\r/qun 查询本群信息资料\r/qq 查询QQ状态\r/bm 查询 base64 加密\r/jm 查询 base64 解密\r/by 查询异或后 base64 加密\r/jy 查询异或后 base64 解密\r/cfs 查询 Cfs加密 单项不可逆\r/al 查询全球 Alexa 排名\r/ips 查询同服务器下站点数量\r/dns 查询本域名下的DNS服务器\r/sfz 查询身份证信息\r/t18 15位身份证升级为18为身份证\r/m 查询手机归属地\r/who *域名或IP地址的 WHOIS 记录查询\r直接输入命令将回复使用方法!\r更多功能正在添加中!\r======您是管理员,可以使用下面的功能!======\r1./send QQ号码 消息内容 发送QQ消息\r2./qunsend 群内部ID 内容 发送群消息\r3./szd QQ号码 给好友发送震动\r4./reset 重新启动机器人\r5./update 更新机器人\r======您是管理员,可以使用下面的功能!======\r1、/turn 游戏赛季更新检测 例:/turn BB\r2、/status 游戏夜间更新检测 例:/status BB\r3、/season 查询赛季更新详情 例:/season XBA\r4、/check 查询夜间更新是否执行 例:/check BB")); } else { SendMessage(Event, Sender, Qunnid, string.Format(" 你好,我是" + RobotName + "!\r===========您可以使用如下命令:===========\r/聊天 与小i机器人进行对话\r/学习 教机器人说话!\r/tq 天气查询\r/ip 查询IP归属地\r/md5 查询MD5加密数值\r/qun 查询本群信息资料\r/qq 查询QQ状态\r/bm 查询 base64 加密\r/jm 查询 base64 解密\r/by 查询异或后 base64 加密\r/jy 查询异或后 base64 解密\r/cfs 查询 Cfs加密 单项不可逆\r/al 查询全球 Alexa 排名\r/ips 查询同服务器下站点数量\r/dns 查询本域名下的DNS服务器\r/sfz 查询身份证信息\r/t18 15位身份证升级为18为身份证\r/m 查询手机归属地\r/who *WHOIS记录查询\r直接输入命令将回复使用方法!")); } break; case "/聊天": if (sArray1.Length != 1) { if (NetRobotApi.RobotApi.m_strSID == null) { NetRobotApi.RobotApi.Xiaoi(); getcode = NetRobotApi.RobotApi.chatXiaoi(msg, RobotName); SendMessage(Event, Sender, Qunnid, getcode); } else { getcode = NetRobotApi.RobotApi.chatXiaoi(msg, RobotName); SendMessage(Event, Sender, Qunnid, getcode); } } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "你想对我说什么?干嘛那么墨迹..."); } break; case "/ip": if (sArray1.Length == 2) { getcode = Nick + ",您查询的信息如下:\r" + NetRobotApi.RobotApi.chaip(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。请返回检查!谢谢合作!"); } break; case "/tq": //天气查询 if (sArray1.Length == 2) { Match m1 = Regex.Match(sArray1[1], @"^((\(\d{3}\))|(\d{3}\-))?13[0-9]\d{8}|15[89]\d{8}", RegexOptions.Compiled | RegexOptions.IgnoreCase); if (m1.Success) { getcode = Nick + "," + NetRobotApi.RobotApi.tq("mobile", sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } Match m2 = Regex.Match(sArray1[1], "[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}", RegexOptions.Compiled | RegexOptions.IgnoreCase); if (m2.Success) { getcode = Nick + "," + NetRobotApi.RobotApi.tq("ip", sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } getcode = Plugins.GetWeather(sArray1[1], Nick); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r天气查询使用方法:/tq 城市名 或(手机号,IP地址)\r例:\r/tq 北京(城市名)\r/tq 13459777850(手机号码)\r/tq 61.153.223.5(IP地址)"); } break; case "/md5": //查询MD5加密数值 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.Md5(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\rMD5加密查询使用方法:/md5 明文\r例:/md5 xba"); } break; case "/qq": //查询QQ状态 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.QQonline(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询QQ状态使用方法:/qq QQ号码\r例:/qq 582257138"); } break; case "/bm": //查询 base64 加密 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.enbase64(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询 base64 加密使用方法:/bm 明文\r例:/bm xba"); } break; case "/jm": //查询 base64 解密 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.debase64(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询 base64 解密使用方法:/jm 密文\r例:/jm VmNrZXJz"); } break; case "/by": //查询异或后 base64 加密 if (sArray1.Length == 3) { getcode = Nick + "," + NetRobotApi.RobotApi.encode(sArray1[1], sArray1[2]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询异或后 base64 加密使用方法:/by 明文 异或参数\r例:/by 123456 xba"); } break; case "/jy": //查询异或后 base64 解密 if (sArray1.Length == 3) { getcode = Nick + "," + NetRobotApi.RobotApi.decode(sArray1[1], sArray1[2]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询异或后 base64 解密使用方法:/jy 密文 异或参数\r例:/jy UllWRkZg xba"); } break; case "/cfs": //查询 Cfs加密 单项不可逆 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.cfs(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询 Cfs加密使用方法:/cfs 明文 (注意:该操作不可逆)\r例:/cfs xba"); } break; case "/hb": //货币换算查询 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.chaip(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。请返回检查!谢谢合作!"); } break; case "/al": //查询全球 Alexa 排名 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.Alexa(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询全球 Alexa 排名使用方法:/al 域名 (注意:不需要带http头)\r例:/al xba.com"); } break; case "/ips": //查询同服务器下站点数量 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.chaip(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。请返回检查!谢谢合作!"); } break; case "/dns": //查询本域名下的DNS服务器 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.dns(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询本域名下的DNS服务器使用方法:/dns 域名 (注意:不需要带http头)\r例:/dns xba.com"); break; case "/who": //域名或 IP 地址的 WHOIS 记录查询: if (sArray1.Length == 2) { Match m1 = Regex.Match(sArray1[1], @"([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?", RegexOptions.Compiled | RegexOptions.IgnoreCase); if (m1.Success) { getcode = Nick + "," + NetRobotApi.RobotApi.whois("domain", sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } Match m2 = Regex.Match(sArray1[1], "[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}", RegexOptions.Compiled | RegexOptions.IgnoreCase); if (m2.Success) { getcode = Nick + "," + NetRobotApi.RobotApi.whois("ip", sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "该域名不是标准域名或IP格式!"); } } SendMessage(Event, Sender, Qunnid, Nick + "," + "*本功能尚未完善*\r参数错误。\r域名或IP地址的 WHOIS 记录查询使用方法:/dns 域名 或 IP (注意:域名不需要带http头)\r例:\r/who xba.com(域名)\r/who 202.108.33.32(IP地址)"); break; case "/sfz": //身份证信息查询 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.sfz(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } break; case "/t18": //15位身份证升级为18为身份证 if (sArray1.Length == 2) { getcode = Nick + "," + NetRobotApi.RobotApi.upto18(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); return; } SendMessage(Event, Sender, Qunnid, Nick + "," + "*本功能尚未完善*\r参数错误。\r域名或IP地址的 WHOIS 记录查询使用方法:/dns 域名 或 IP (注意:域名不需要带http头)\r例:\r/who xba.com(域名)\r/who 202.108.33.32(IP地址)"); break; case "/m": //查询手机号码归属地 if (sArray1.Length == 2) { if (sArray1[1].Length == 11) { getcode = Nick + "," + NetRobotApi.RobotApi.shouji(sArray1[1]); SendMessage(Event, Sender, Qunnid, getcode); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "恩,我记得手机号码应该是11位的吧..你输入的好像不是11位哦?"); } } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r手机归属地查询使用方法:/m 手机号码\r例:/m 13459777850"); } break; //========================= Cupid 自定义内容 ========================= case "/turn": //赛季更新查询 if (sArray1.Length == 2) { strResult = sc.GetGameTurn(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r赛季更新检测的使用方法:/turn 项目名称(BB,FB)\r例:/turn BB"); } break; case "/status": //夜间更新查询 if (sArray1.Length == 2) { strResult = sc.GetGameStatus(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r夜间更新检测的使用方法:/status 项目名称(BB,FB)\r例:/status BB"); } break; case "/mail": //发送邮件 if (sArray1.Length == 4) { strResult = sm.SendMail(sArray1[1], sArray1[2], sArray1[3]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r夜间更新检测的使用方法:/mail 收件邮件 邮件主题 邮件内容\r例:/status [email protected] 开会 三点开会"); } break; case "/season": //赛季更新时间查询 if (sArray1.Length == 2) { strResult = sc.GetGameSeason(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r赛季更新检测的使用方法:/season 关键字名称(XBA,DW,TOM)\r例:/season XBA"); } break; case "/check": //查询夜间更新是否执行 if (sArray1.Length == 2) { strResult = sc.GetGameCheck(sArray1[1]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询夜间更新是否执行的使用方法:/check 项目名称(BB,FB)\r例:/check BB"); } break; case "/userinfo": //查询用户信息 if (sArray1.Length == 3) { strResult = si.UserInfo(sArray1[1].ToString(), sArray1[2]); SendMessage(Event, Sender, Qunnid, strResult); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "参数错误。\r查询用户信息的使用方法:/userinfo 用户名类型(0为经理名|1为用户名) 经理名\r例:/userinfo 0 风中脱手"); } break; //==================================================================== case "/send": if (sArray1.Length > 2) { if (YZadmin(Sender) == "T") { SendApi("SendMessage", sArray1[1], adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "操作成功!成功把参数传给机器人!请等待机器人回应!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } } break; case "/reset": if (YZadmin(Sender) == "T") { SendApi("Reset", Qunnid, adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人重启命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "/update": if (YZadmin(Sender) == "T") { //SendApi("Reset", Qunnid, adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人更新命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "/exit": if (YZadmin(Sender) == "T") { SendApi("Exit", "", ""); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人退出命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "/login": if (YZadmin(Sender) == "T") { SendApi("Login", "", ""); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "机器人登陆命令发送成功!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "/change": if (YZadmin(Sender) == "T") { if (sArray1.Length == 3) { que.Enqueue(string.Format("Change\r{0}\r{1}", sArray1[1], sArray1[2])); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "更换机器人号码成功!更换后的号码为:" + sArray1[1])); } } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "/qunsend": if (YZadmin(Sender) == "T") { SendApi("SendQunMessage", sArray1[1], adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "操作成功!成功把参数传给机器人!请等待机器人回应!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; case "/szd": if (YZadmin(Sender) == "T") { SendApi("SendVibration", sArray1[1], adminmsg); SendMessage(Event, Sender, Qunnid, string.Format(Nick + "," + "操作成功!成功把参数传给机器人!请等待机器人回应!")); } else { SendMessage(Event, Sender, Qunnid, Nick + "," + "您好,您不是管理员不能使用该功能!"); } break; //------------------------------------ //休眠命令----------------------------- case "回忆,咱睡觉去": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "好啊!累死我了,睡觉去咯....."); } else { SendMessage(Event, Sender, Qunnid, "咳咳,我和你很熟吗?你就这么命令我?"); } break; case "回忆,洗白白去咯": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "洗白白..洗白白...拜拜咯~ (*^__^*) "); } else { SendMessage(Event, Sender, Qunnid, "你个色狼,想看人家洗澡...呜呜..."); } break; case "回忆,屏蔽所有信息,等我命令": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "收到命令!执行……,嘿嘿屏蔽成功!就等你说话呢!"); } else { SendMessage(Event, Sender, Qunnid, "你谁啊..又不是我的主人..凭什么命令我?"); } break; case "回忆,撤除屏蔽": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunon\r1\r1")); SendMessage(Event, Sender, Qunnid, "好了,已经撤除屏蔽"); return; } else { SendMessage(Event, Sender, Qunnid, "恩?你教我撤就撤。那我的面子往哪放?"); } break; case "回忆,睡觉去吧": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunoff\r1\r1")); SendMessage(Event, Sender, Qunnid, "恩,好的,天使再见哦"); } else { SendMessage(Event, Sender, Qunnid, "不行,我在等天使呢"); } break; case "回忆,起床了": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunon\r1\r1")); SendMessage(Event, Sender, Qunnid, "起床啦....我又回来了"); return; } break; case "回忆,给我回来": if (YZadmin(Sender) == "T") { que.Enqueue(string.Format("qunon\r1\r1")); SendMessage(Event, Sender, Qunnid, "我又回来了 - -!"); return; } SendMessage(Event, Sender, Qunnid, "去..给爷滚开,我又没出去!"); break; //------------------------------------ //自动回复----------------------------- case "回忆,求代码": SendMessage(Event, Sender, Qunnid, "哈哈,你要我的代码?我现在还没开源哦..."); break; case "回忆,求程序": if (Qunid == "93068095") { SendMessage(Event, Sender, Qunnid, "恭喜您,您已经加入了QQ机器人俱乐部。\r现在请打开群共享,选择最新版本下载!"); } else { SendMessage(Event, Sender, Qunnid, "恩,程序啊...请加群93068095获得。"); } break; case "回忆,程序打不开": if (Qunid == "93068095") { SendMessage(Event, Sender, Qunnid, "请您打开群共享,下载机器人教程观看!如果无法解决请联系管理员!"); } else { SendMessage(Event, Sender, Qunnid, "打不开?出错了?请加群93068095解决!"); } break; case "q群": case "qq群": case "回忆,qq群是多少?": case "回忆,交流群号码多少?": SendMessage(Event, Sender, Qunnid, "QQ机器人俱乐部:93068095\r该群提供机器人程序,机器人接口,支持刷屏,测试QQ机器人等"); break; case "回忆,喊大爷": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, "天使大爷好!"); } else { SendMessage(Event, Sender, Qunnid, "喊你个XXOO的"); } break; case "回忆,清屏": SendMessage(Event, Sender, Qunnid, "\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r清理完毕!"); break; case "回忆": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, "天使大爷,我在呢,找小的干嘛?"); } else { SendMessage(Event, Sender, Qunnid, "爷在呢,找我干嘛?"); } break; case "回忆,骂他们": if (YZadmin(Sender) == "T") { SendMessage(Event, Sender, Qunnid, "我XX你个OO的...你们再欺负我就画个圈圈诅咒你们!!"); } else { SendMessage(Event, Sender, Qunnid, "你叫我骂就骂啊,那我岂不是很没面子 - -!"); } break; default: if (Event == "ReceiveNormalIM") { if (NetRobotApi.RobotApi.m_strSID == null) { NetRobotApi.RobotApi.Xiaoi(); getcode = NetRobotApi.RobotApi.chatXiaoi(Message, RobotName); SendMessage(Event, Sender, Qunnid, getcode); } else { getcode = NetRobotApi.RobotApi.chatXiaoi(Message, RobotName); SendMessage(Event, Sender, Qunnid, getcode); } } else { } break; //------------------------------------ } }
/// <summary> /// 发消息方法 /// </summary> /// <param name="value"></param> private void GetAMessage(string value) { var messagecontent = new Regex("(}],)(?<content>.+?)(],\"raw_content)"); var messageiduin = new Regex("(\"msg_id\":)(?<msgid>[0-9]{1,8}?)(,\"from_uin\":)(?<fromuin>[0-9]{5,11}?)(,\")"); string tempcontent = Converts.ConvertUnicodeStringToChinese(messagecontent.Match(value).Groups["content"].Value); string content = Converts.ArrangeMessage(tempcontent); string fromuin = messageiduin.Match(value).Groups["fromuin"].Value; string[] command = content.Split(' '); switch (command[0].ToLower()) { case "@": if (YZadmin(thefriendlist.Friends[fromuin].name) == "T") { content = string.Format("您好,我是" + thefriendlist.myself.name + "\\\\n======您可以使用如下命令======\\\\n{0}weather 天气查询(新)\\\\n=======系统管理员命令=======\\\\n{0}turn 游戏赛季更新检测 例:{0}turn BB\\\\n{0}status 游戏夜间更新检测 例:{0}status BB\\\\n{0}season 查询赛季更新详情 例:{0}season XBA\\\\n{0}check 查询夜间更新是否执行 例:{0}check BB\\\\n{0}userinfo 查询官方区用户信息\\\\n==========特殊功能==========\\\\n{0}mail 简单邮件发送\\\\n{0}setnick 设置QQ机器人签名\\\\n{0}setqqstatus 设置机器人在线状态", fenge); } else { content = string.Format("您好,我是" + thefriendlist.myself.name + "\\\\n======您可以使用如下命令======\\\\n{0}weather 天气查询(新)", fenge); } break; case "@weather": if (command.Length == 2) { var api = new RobotApi(); content = api.GetWeather(command[1], "3").Replace("\r", "\\\\n"); } else { content = "参数错误。\\\\n天气查询(新)使用方法:@weather 城市名 或(区号,拼音(支持模糊),邮编)\\\\n例:\\\\n@weather 北京(城市名)\\\\n@weather 0597(区号)\\\\n@weather beijin(拼音)\\\\n@weather 364000(邮编)"; } break; case "@turn": //赛季更新查询 if (command.Length == 2) { content = sc.GetGameTurn(command[1]).Replace("\n", "\\\\n"); } else { content = "参数错误。\\\\n赛季更新检测的使用方法:@turn 项目名称(BB,FB)\\\\n例:@turn BB"; } break; case "@status": //夜间更新查询 if (command.Length == 2) { content = sc.GetGameStatus(command[1]).Replace("\n", "\\\\n"); } else { content = "参数错误。\\\\n夜间更新检测的使用方法:@status 项目名称(BB,FB)\\\\n例:@status BB"; } break; case "@mail": //发送邮件 if (command.Length == 4) { content = sm.SendMail(command[1], command[2], command[3]); } else { content = "参数错误。\\\\n使用方法:@mail 收件邮件 邮件主题 邮件内容\\\\n例:@mail [email protected] 开会 三点开会"; } break; case "@season": //赛季更新时间查询 if (command.Length == 2) { content = sc.GetGameSeason(command[1]).Replace("\n", "\\\\n"); } else { content = "参数错误。\\\\n赛季更新检测的使用方法:@season 关键字名称(XBA,DW,TOM)\\\\n例:@season XBA"; } break; case "@check": //查询夜间更新是否执行 if (command.Length == 2) { content = sc.GetGameCheck(command[1]).Replace("\n", "\\\\n"); } else { content = "参数错误。\\\\n查询夜间更新是否执行的使用方法:@check 项目名称(BB,FB)\\\\n例:@check BB"; } break; case "@userinfo": //查询用户信息 if (command.Length == 3) { content = si.UserInfo(command[1], command[2]).Replace("\r\n", "\\\\n"); } else { content = "参数错误。\\\\n查询用户信息的使用方法:\\\\n@userinfo 用户名类型(0为经理名|1为用户名) 经理名\\\\n例:@userinfo 0 风中脱手"; } break; case "@setnick": //设置机器人签名 if (command.Length == 2) { content = QQUser.getlongnick2(command[1]); } else { content = "参数错误。\\\\n设置机器人签名方法:\\\\n@setnick 签名内容\\\\n例:@setnick 今天好开心啊"; } break; case "@setqqstatus": //设置机器人在线状态 if (command.Length == 2) { content = QQUser.getchangestatus(command[1]); } else { content = "参数错误。\\\\n设置机器人在线状态方法:\\\\n@setqqstatus (在线|离开|隐身)\\\\n例:@setqqstatus 在线"; } break; } string result = QQUser.sendmessage(content, fromuin); if (result.IndexOf("ok") == -1) { MessageBox.Show("消息 " + content + " 发送失败"); } //Thread.CurrentThread.Abort(); }