1 Star 8 Fork 4

不懂d叛逆/pyccjh

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pyccjh.py 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
不懂d叛逆 提交于 2015-02-06 17:03 +08:00 . \r\n替换为\n
# -*- coding: utf-8 -*-
'''
Created on 2013-5-31
主窗口
@author: 不懂d叛逆
'''
import re
import ccjhConnect, ccjhMessageHandle, ccjhCommmandHandle, ccjhObj, ccjhContainer, ccjhUser, ccjhMan
class pyccjh():
def __init__(self, Server, Port, IP, ID, Password):
self.server = Server
self.port = Port
self.ip = IP
self.id = ID
self.password = Password
self.__msgHandle = ccjhMessageHandle.messageHandle(self)
self.connect = ccjhConnect.ccjhConnect(self.__msgHandle.notify, self.server, self.port, self.id, self.password)
self.__cmdHandle = ccjhCommmandHandle.cmdHandle(self)
self.Target = 0
self.where = ccjhObj.ccjhObj("")
self.doors = []
self.mans = ccjhContainer.ccjhContainer()
self.user = ccjhUser.ccjhUser()
return
def __del__(self):
self.connect.Close(False)
return
def DisConnect(self):
self.connect.Close(False)
return
def Connect(self):
self.connect.Connect()
return
def AddText(self, string):
string = re.sub("\$[A-Z]{3}", "", string) # 删除颜色代码
print(string)
return
def Cmd(self, command):
self.__cmdHandle.cmd(command)
return
def TargetT(self, string):
if string == self.user.get("o"): # ID
self.Target = self.user.LongID
else:
man = self.user.FindByID(string)
if isinstance(man, ccjhMan.ccjhMan):
self.Target = man.LongID
else:
man = self.mans.FindByID(string)
if isinstance(man, ccjhMan.ccjhMan):
self.Target = man.LongID
elif string == "0":
self.Target = 0
else:
self.AddText("目标不存在!")
return
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/panlizzx/pyccjh.git
git@gitee.com:panlizzx/pyccjh.git
panlizzx
pyccjh
pyccjh
master

搜索帮助