othinus001 / txcnm Goto Github PK
View Code? Open in Web Editor NEW风控冻结自动切号插件,会长再也不用担心打不了公会战了
风控冻结自动切号插件,会长再也不用担心打不了公会战了
os.path.join
,适应windows
和linux
的的路径。go-cqhttp
进程的话windows
使用taskkill
,linux
需要使用kill
或pkill
。可以看os.name
是不是posix
来决定用哪个。不过这个我也没找到python
提供的可以适应不同系统下的杀掉进程函数xcw
而不用输对应的Q号,感觉会更便捷点然后结合我自己的情况:我同时会开多个go-cqhttp
(其中一个接入hoshino
其他的就挂机升级),就发现杀掉进程有点棘手:因为taskkill
命令或pkill
命令根据进程名字杀掉,这会把所有的go-cqhttp
都杀掉,而不能精确地杀掉我想要的那个进程。
然后碰巧我之前使用了pm2
管理我的go-cqhttp
。通过pm2
可以精确地控制QQ号对应的go-cqhttp
,且通过简单的start stop
指令就可以启动、停止相关的任务,以及logs
指令查看最新的日志(但不能继上次读取位置往下读,不过也可以指定其日志路径,然后读对应的日志文件,这样相比直接读go-cqhttp
少了日期切换时日志文件刷新的麻烦)。而且pm2
支持windows,linux
,命令行下命令都一样,本身跨平台。
于是我就对您的代码进行了重写,依靠pm2
进行日志读取和go-cqhttp
的切换,目前在测试中。不过鉴于重写后的代码与您的代码出入过大了,可能会重开一个仓库。
关于go-cqhttp
的切换,就是说比如我有两个Q号,实则每个Q号启动了两个任务,其中一个是接入hoshino
,另一个单纯挂机(反代是disable
,go-cqhttp
启动时可以指定配置文件),这样当切号时就可以保持两个Q号还上线的情况下,换了另一个号接管hoshino
。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.