This commit is contained in:
2022-04-15 18:46:00 +08:00
parent 6c890c4a85
commit 79342901d6
10 changed files with 15275 additions and 159 deletions

View File

@ -1,5 +1,4 @@
# mirai-console-plugin-template
# mirai-console-jcr-plugin
## J Cpp Reference Plugin
https://en.cppreference.com/w/
[Mirai Console](https://github.com/mamoe/mirai-console) 插件模板, 使用 Kotlin + Gradle.
[如何使用](https://github.com/project-mirai/how-to-use-plugin-template)

View File

@ -6,7 +6,7 @@ plugins {
id("net.mamoe.mirai-console") version "2.10.0"
}
group = "org.example"
group = "top.jie65535"
version = "0.1.0"
repositories {

View File

@ -1 +1 @@
rootProject.name = "mirai-console-plugin-template"
rootProject.name = "mirai-console-jcr-plugin"

View File

@ -1,51 +0,0 @@
package org.example.mirai.plugin;
import net.mamoe.mirai.console.plugin.jvm.JavaPlugin;
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription;
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescriptionBuilder;
import net.mamoe.mirai.event.Event;
import net.mamoe.mirai.event.EventChannel;
import net.mamoe.mirai.event.GlobalEventChannel;
import net.mamoe.mirai.event.events.FriendMessageEvent;
import net.mamoe.mirai.event.events.GroupMessageEvent;
/**
* 使用 Java 请把
* {@code /src/main/resources/META-INF.services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin}
* 文件内容改成 {@code org.example.mirai.plugin.JavaPluginMain} <br/>
* 也就是当前主类全类名
*
* 使用 Java 可以把 kotlin 源集删除且不会对项目有影响
*
* {@code settings.gradle.kts} 里改构建的插件名称依赖库和插件版本
*
* 在该示例下的 {@link JvmPluginDescription} 修改插件名称id 和版本等
*
* 可以使用 {@code src/test/kotlin/RunMirai.kt} IDE 里直接调试
* 不用复制到 mirai-console-loader 或其他启动器中调试
*/
public final class JavaPluginMain extends JavaPlugin {
public static final JavaPluginMain INSTANCE = new JavaPluginMain();
private JavaPluginMain() {
super(new JvmPluginDescriptionBuilder("org.example.mirai-example", "0.1.0")
.info("EG")
.build());
}
@Override
public void onEnable() {
getLogger().info("日志");
EventChannel<Event> eventChannel = GlobalEventChannel.INSTANCE.parentScope(this);
eventChannel.subscribeAlways(GroupMessageEvent.class, g -> {
//监听群消息
getLogger().info(g.getMessage().contentToString());
});
eventChannel.subscribeAlways(FriendMessageEvent.class, f -> {
//监听好友消息
getLogger().info(f.getMessage().contentToString());
});
}
}

View File

@ -0,0 +1,71 @@
package top.jie65535.jcr
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin
import net.mamoe.mirai.event.GlobalEventChannel
import net.mamoe.mirai.event.subscribeMessages
import net.mamoe.mirai.utils.info
import java.io.BufferedReader
import java.io.InputStreamReader
object JCppReferencePlugin : KotlinPlugin(
JvmPluginDescription(
id = "top.jie65535.mirai-console-jcr-plugin",
name = "J Cpp Reference Plugin",
version = "0.1.0"
) {
author("jie65535")
info("cppreference.com 帮助插件")
}
) {
private const val cppreferencePrefix = "https://zh.cppreference.com/w/"
private fun loadMap(path: String): Map<String, String> {
val map = mutableMapOf<String, String>()
val stream = this::class.java.getResourceAsStream(path)
if (stream == null) {
logger.error("资源文件为空")
} else {
val br = BufferedReader(InputStreamReader(stream))
while (br.ready()) {
val line = br.readLine()
val s = line.indexOf('\t')
if (s > 0) {
map[line.substring(0, s)] = line.substring(s+1)
}
}
}
logger.info("\"$path\" ${map.size} keywords loaded")
return map
}
private val indexC = loadMap("/devhelp-index-c.txt")
private val indexCpp = loadMap("/devhelp-index-cpp.txt")
override fun onEnable() {
logger.info { "Plugin loaded" }
val eventChannel = GlobalEventChannel.parentScope(this)
eventChannel.subscribeMessages {
startsWith("c ") {
val keyword = it.trim()
if (keyword.isEmpty()) return@startsWith
logger.info("check c \"$keyword\"")
val link = indexC[keyword]
if (link != null) {
subject.sendMessage(cppreferencePrefix + link)
}
}
startsWith("cpp ") {
val keyword = it.trim()
if (keyword.isEmpty()) return@startsWith
logger.info("check cpp \"$keyword\"")
val link = indexCpp[keyword]
if (link != null) {
subject.sendMessage(cppreferencePrefix + link)
}
}
}
}
}

View File

@ -1,93 +0,0 @@
package org.example.mirai.plugin
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin
import net.mamoe.mirai.event.EventChannel
import net.mamoe.mirai.event.GlobalEventChannel
import net.mamoe.mirai.event.events.BotInvitedJoinGroupRequestEvent
import net.mamoe.mirai.event.events.FriendMessageEvent
import net.mamoe.mirai.event.events.GroupMessageEvent
import net.mamoe.mirai.event.events.NewFriendRequestEvent
import net.mamoe.mirai.event.globalEventChannel
import net.mamoe.mirai.message.data.Image
import net.mamoe.mirai.message.data.Image.Key.queryUrl
import net.mamoe.mirai.message.data.PlainText
import net.mamoe.mirai.utils.info
/**
* 使用 kotlin 版请把
* `src/main/resources/META-INF.services/net.mamoe.mirai.console.plugin.jvm.JvmPlugin`
* 文件内容改成 `org.example.mirai.plugin.PluginMain` 也就是当前主类全类名
*
* 使用 kotlin 可以把 java 源集删除不会对项目有影响
*
* `settings.gradle.kts` 里改构建的插件名称依赖库和插件版本
*
* 在该示例下的 [JvmPluginDescription] 修改插件名称id和版本etc
*
* 可以使用 `src/test/kotlin/RunMirai.kt` ide 里直接调试
* 不用复制到 mirai-console-loader 或其他启动器中调试
*/
object PluginMain : KotlinPlugin(
JvmPluginDescription(
id = "org.example.mirai-example",
name = "插件示例",
version = "0.1.0"
) {
author("作者名称或联系方式")
info(
"""
这是一个测试插件,
在这里描述插件的功能和用法等.
""".trimIndent()
)
// author 和 info 可以删除.
}
) {
override fun onEnable() {
logger.info { "Plugin loaded" }
//配置文件目录 "${dataFolder.absolutePath}/"
val eventChannel = GlobalEventChannel.parentScope(this)
eventChannel.subscribeAlways<GroupMessageEvent>{
//群消息
//复读示例
if (message.contentToString().startsWith("复读")) {
group.sendMessage(message.contentToString().replace("复读", ""))
}
if (message.contentToString() == "hi") {
//群内发送
group.sendMessage("hi")
//向发送者私聊发送消息
sender.sendMessage("hi")
//不继续处理
return@subscribeAlways
}
//分类示例
message.forEach {
//循环每个元素在消息里
if (it is Image) {
//如果消息这一部分是图片
val url = it.queryUrl()
group.sendMessage("图片,下载地址$url")
}
if (it is PlainText) {
//如果消息这一部分是纯文本
group.sendMessage("纯文本,内容:${it.content}")
}
}
}
eventChannel.subscribeAlways<FriendMessageEvent>{
//好友信息
sender.sendMessage("hi")
}
eventChannel.subscribeAlways<NewFriendRequestEvent>{
//自动同意好友申请
accept()
}
eventChannel.subscribeAlways<BotInvitedJoinGroupRequestEvent>{
//自动同意加群申请
accept()
}
}
}

View File

@ -1 +1 @@
org.example.mirai.plugin.PluginMain
top.jie65535.jcr.JCppReferencePlugin

View File

@ -0,0 +1,951 @@
c c
Language c/language
Headers c/header
Type support c/types
Dynamic memory management c/memory
Error handling c/error
Program utilities c/program
Variadic functions c/variadic
Date and time utilities c/chrono
Strings library c/string
Null terminated byte strings c/string/byte
Null terminated multibyte c/string/multibyte
Null terminated wide strings c/string/wide
Algorithms c/algorithm
Input/output support c/io
Numerics c/numeric
Common mathematical functions c/numeric/math
Floating-point environment c/numeric/fenv
Pseudo-random number generation c/numeric/random
Complex number arithmetic c/numeric/complex
Type-generic math c/numeric/tgmath
Localization support c/locale
Atomic operations library c/atomic
Thread support library c/thread
Technical specifications c/experimental
size_t c/types/size_t
ptrdiff_t c/types/ptrdiff_t
NULL c/types/NULL
max_align_t c/types/max_align_t
offsetof c/types/offsetof
int8_t c/types/integer
int16_t c/types/integer
int32_t c/types/integer
int64_t c/types/integer
int_fast8_t c/types/integer
int_fast16_t c/types/integer
int_fast32_t c/types/integer
int_fast64_t c/types/integer
int_least8_t c/types/integer
int_least16_t c/types/integer
int_least32_t c/types/integer
int_least64_t c/types/integer
intmax_t c/types/integer
intptr_t c/types/integer
uint8_t c/types/integer
uint16_t c/types/integer
uint32_t c/types/integer
uint64_t c/types/integer
uint_fast8_t c/types/integer
uint_fast16_t c/types/integer
uint_fast32_t c/types/integer
uint_fast64_t c/types/integer
uint_least8_t c/types/integer
uint_least16_t c/types/integer
uint_least32_t c/types/integer
uint_least64_t c/types/integer
uintmax_t c/types/integer
uintptr_t c/types/integer
INT8_MIN c/types/integer
INT16_MIN c/types/integer
INT32_MIN c/types/integer
INT64_MIN c/types/integer
INT_FAST8_MIN c/types/integer
INT_FAST16_MIN c/types/integer
INT_FAST32_MIN c/types/integer
INT_FAST64_MIN c/types/integer
INT_LEAST8_MIN c/types/integer
INT_LEAST16_MIN c/types/integer
INT_LEAST32_MIN c/types/integer
INT_LEAST64_MIN c/types/integer
INTPTR_MIN c/types/integer
INTMAX_MIN c/types/integer
INT8_MAX c/types/integer
INT16_MAX c/types/integer
INT32_MAX c/types/integer
INT64_MAX c/types/integer
INT_FAST8_MAX c/types/integer
INT_FAST16_MAX c/types/integer
INT_FAST32_MAX c/types/integer
INT_FAST64_MAX c/types/integer
INT_LEAST8_MAX c/types/integer
INT_LEAST16_MAX c/types/integer
INT_LEAST32_MAX c/types/integer
INT_LEAST64_MAX c/types/integer
INTPTR_MAX c/types/integer
INTMAX_MAX c/types/integer
UINT8_MAX c/types/integer
UINT16_MAX c/types/integer
UINT32_MAX c/types/integer
UINT64_MAX c/types/integer
UINT_FAST8_MAX c/types/integer
UINT_FAST16_MAX c/types/integer
UINT_FAST32_MAX c/types/integer
UINT_FAST64_MAX c/types/integer
UINT_LEAST8_MAX c/types/integer
UINT_LEAST16_MAX c/types/integer
UINT_LEAST32_MAX c/types/integer
UINT_LEAST64_MAX c/types/integer
UINTPTR_MAX c/types/integer
UINTMAX_MAX c/types/integer
PRId8 c/types/integer
PRId16 c/types/integer
PRId32 c/types/integer
PRId64 c/types/integer
PRIdLEAST8 c/types/integer
PRIdLEAST16 c/types/integer
PRIdLEAST32 c/types/integer
PRIdLEAST64 c/types/integer
PRIdFAST8 c/types/integer
PRIdFAST16 c/types/integer
PRIdFAST32 c/types/integer
PRIdFAST64 c/types/integer
PRIdMAX c/types/integer
PRIdPTR c/types/integer
PRIi8 c/types/integer
PRIi16 c/types/integer
PRIi32 c/types/integer
PRIi64 c/types/integer
PRIiLEAST8 c/types/integer
PRIiLEAST16 c/types/integer
PRIiLEAST32 c/types/integer
PRIiLEAST64 c/types/integer
PRIiFAST8 c/types/integer
PRIiFAST16 c/types/integer
PRIiFAST32 c/types/integer
PRIiFAST64 c/types/integer
PRIiMAX c/types/integer
PRIiPTR c/types/integer
PRIu8 c/types/integer
PRIu16 c/types/integer
PRIu32 c/types/integer
PRIu64 c/types/integer
PRIuLEAST8 c/types/integer
PRIuLEAST16 c/types/integer
PRIuLEAST32 c/types/integer
PRIuLEAST64 c/types/integer
PRIuFAST8 c/types/integer
PRIuFAST16 c/types/integer
PRIuFAST32 c/types/integer
PRIuFAST64 c/types/integer
PRIuMAX c/types/integer
PRIuPTR c/types/integer
PRIo8 c/types/integer
PRIo16 c/types/integer
PRIo32 c/types/integer
PRIo64 c/types/integer
PRIoLEAST8 c/types/integer
PRIoLEAST16 c/types/integer
PRIoLEAST32 c/types/integer
PRIoLEAST64 c/types/integer
PRIoFAST8 c/types/integer
PRIoFAST16 c/types/integer
PRIoFAST32 c/types/integer
PRIoFAST64 c/types/integer
PRIoMAX c/types/integer
PRIoPTR c/types/integer
PRIx8 c/types/integer
PRIx16 c/types/integer
PRIx32 c/types/integer
PRIx64 c/types/integer
PRIxLEAST8 c/types/integer
PRIxLEAST16 c/types/integer
PRIxLEAST32 c/types/integer
PRIxLEAST64 c/types/integer
PRIxFAST8 c/types/integer
PRIxFAST16 c/types/integer
PRIxFAST32 c/types/integer
PRIxFAST64 c/types/integer
PRIxMAX c/types/integer
PRIxPTR c/types/integer
PRIX8 c/types/integer
PRIX16 c/types/integer
PRIX32 c/types/integer
PRIX64 c/types/integer
PRIXLEAST8 c/types/integer
PRIXLEAST16 c/types/integer
PRIXLEAST32 c/types/integer
PRIXLEAST64 c/types/integer
PRIXFAST8 c/types/integer
PRIXFAST16 c/types/integer
PRIXFAST32 c/types/integer
PRIXFAST64 c/types/integer
PRIXMAX c/types/integer
PRIXPTR c/types/integer
SCNd8 c/types/integer
SCNd16 c/types/integer
SCNd32 c/types/integer
SCNd64 c/types/integer
SCNdLEAST8 c/types/integer
SCNdLEAST16 c/types/integer
SCNdLEAST32 c/types/integer
SCNdLEAST64 c/types/integer
SCNdFAST8 c/types/integer
SCNdFAST16 c/types/integer
SCNdFAST32 c/types/integer
SCNdFAST64 c/types/integer
SCNdMAX c/types/integer
SCNdPTR c/types/integer
SCNi8 c/types/integer
SCNi16 c/types/integer
SCNi32 c/types/integer
SCNi64 c/types/integer
SCNiLEAST8 c/types/integer
SCNiLEAST16 c/types/integer
SCNiLEAST32 c/types/integer
SCNiLEAST64 c/types/integer
SCNiFAST8 c/types/integer
SCNiFAST16 c/types/integer
SCNiFAST32 c/types/integer
SCNiFAST64 c/types/integer
SCNiMAX c/types/integer
SCNiPTR c/types/integer
SCNu8 c/types/integer
SCNu16 c/types/integer
SCNu32 c/types/integer
SCNu64 c/types/integer
SCNuLEAST8 c/types/integer
SCNuLEAST16 c/types/integer
SCNuLEAST32 c/types/integer
SCNuLEAST64 c/types/integer
SCNuFAST8 c/types/integer
SCNuFAST16 c/types/integer
SCNuFAST32 c/types/integer
SCNuFAST64 c/types/integer
SCNuMAX c/types/integer
SCNuPTR c/types/integer
SCNo8 c/types/integer
SCNo16 c/types/integer
SCNo32 c/types/integer
SCNo64 c/types/integer
SCNoLEAST8 c/types/integer
SCNoLEAST16 c/types/integer
SCNoLEAST32 c/types/integer
SCNoLEAST64 c/types/integer
SCNoFAST8 c/types/integer
SCNoFAST16 c/types/integer
SCNoFAST32 c/types/integer
SCNoFAST64 c/types/integer
SCNoMAX c/types/integer
SCNoPTR c/types/integer
SCNx8 c/types/integer
SCNx16 c/types/integer
SCNx32 c/types/integer
SCNx64 c/types/integer
SCNxLEAST8 c/types/integer
SCNxLEAST16 c/types/integer
SCNxLEAST32 c/types/integer
SCNxLEAST64 c/types/integer
SCNxFAST8 c/types/integer
SCNxFAST16 c/types/integer
SCNxFAST32 c/types/integer
SCNxFAST64 c/types/integer
SCNxMAX c/types/integer
SCNxPTR c/types/integer
PTRDIFF_MIN c/types/limits
PTRDIFF_MAX c/types/limits
SIZE_MAX c/types/limits
SIG_ATOMIC_MIN c/types/limits
SIG_ATOMIC_MAX c/types/limits
WCHAR_MIN c/types/limits
WCHAR_MAX c/types/limits
WINT_MIN c/types/limits
WINT_MAX c/types/limits
CHAR_BIT c/types/limits
MB_LEN_MAX c/types/limits
CHAR_MIN c/types/limits
CHAR_MAX c/types/limits
SCHAR_MIN c/types/limits
SHRT_MIN c/types/limits
INT_MIN c/types/limits
LONG_MIN c/types/limits
LLONG_MIN c/types/limits
SCHAR_MAX c/types/limits
SHRT_MAX c/types/limits
INT_MAX c/types/limits
LONG_MAX c/types/limits
LLONG_MAX c/types/limits
UCHAR_MAX c/types/limits
USHRT_MAX c/types/limits
UINT_MAX c/types/limits
ULONG_MAX c/types/limits
ULLONG_MAX c/types/limits
FLT_RADIX c/types/limits
DECIMAL_DIG c/types/limits
FLT_MIN c/types/limits
DBL_MIN c/types/limits
LDBL_MIN c/types/limits
FLT_MAX c/types/limits
DBL_MAX c/types/limits
LDBL_MAX c/types/limits
FLT_EPSILON c/types/limits
DBL_EPSILON c/types/limits
LDBL_EPSILON c/types/limits
FLT_DIG c/types/limits
DBL_DIG c/types/limits
LDBL_DIG c/types/limits
FLT_MANT_DIG c/types/limits
DBL_MANT_DIG c/types/limits
LDBL_MANT_DIG c/types/limits
FLT_MIN_EXP c/types/limits
DBL_MIN_EXP c/types/limits
LDBL_MIN_EXP c/types/limits
FLT_MIN_10_EXP c/types/limits
DBL_MIN_10_EXP c/types/limits
LDBL_MIN_10_EXP c/types/limits
FLT_MAX_EXP c/types/limits
DBL_MAX_EXP c/types/limits
LDBL_MAX_EXP c/types/limits
FLT_MAX_10_EXP c/types/limits
DBL_MAX_10_EXP c/types/limits
LDBL_MAX_10_EXP c/types/limits
FLT_ROUNDS c/types/limits/FLT_ROUNDS
FLT_EVAL_METHOD c/types/limits/FLT_EVAL_METHOD
malloc c/memory/malloc
calloc c/memory/calloc
realloc c/memory/realloc
free c/memory/free
assert c/error/assert
errno c/error/errno
E2BIG c/error/errno_macros
EACCESS c/error/errno_macros
EADDRINUSE c/error/errno_macros
EADDRNOTAVAIL c/error/errno_macros
EAFNOSUPPORT c/error/errno_macros
EAGAIN c/error/errno_macros
EALREADY c/error/errno_macros
EBADF c/error/errno_macros
EBADMSG c/error/errno_macros
EBUSY c/error/errno_macros
ECANCELED c/error/errno_macros
ECHILD c/error/errno_macros
ECONNABORTED c/error/errno_macros
ECONNREFUSED c/error/errno_macros
ECONNRESET c/error/errno_macros
EDEADLK c/error/errno_macros
EDESTADDRREQ c/error/errno_macros
EDOM c/error/errno_macros
EEXIST c/error/errno_macros
EFAULT c/error/errno_macros
EFBIG c/error/errno_macros
EHOSTUNREACH c/error/errno_macros
EIDRM c/error/errno_macros
EILSEQ c/error/errno_macros
EINPROGRESS c/error/errno_macros
EINTR c/error/errno_macros
EINVAL c/error/errno_macros
EIO c/error/errno_macros
EISCONN c/error/errno_macros
EISDIR c/error/errno_macros
ELOOP c/error/errno_macros
EMFILE c/error/errno_macros
EMLINK c/error/errno_macros
EMSGSIZE c/error/errno_macros
ENAMETOOLONG c/error/errno_macros
ENETDOWN c/error/errno_macros
ENETRESET c/error/errno_macros
ENETUNREACH c/error/errno_macros
ENFILE c/error/errno_macros
ENOBUFS c/error/errno_macros
ENODATA c/error/errno_macros
ENODEV c/error/errno_macros
ENOENT c/error/errno_macros
ENOEXEC c/error/errno_macros
ENOLCK c/error/errno_macros
ENOLINK c/error/errno_macros
ENOMEM c/error/errno_macros
ENOMSG c/error/errno_macros
ENOPROTOOPT c/error/errno_macros
ENOSPC c/error/errno_macros
ENOSR c/error/errno_macros
ENOSTR c/error/errno_macros
ENOSYS c/error/errno_macros
ENOTCONN c/error/errno_macros
ENOTDIR c/error/errno_macros
ENOTEMPTY c/error/errno_macros
ENOTRECOVERABLE c/error/errno_macros
ENOTSOCK c/error/errno_macros
ENOTSUP c/error/errno_macros
ENOTTY c/error/errno_macros
ENXIO c/error/errno_macros
EOPNOTSUPP c/error/errno_macros
EOVERFLOW c/error/errno_macros
EOWNERDEAD c/error/errno_macros
EPERM c/error/errno_macros
EPIPE c/error/errno_macros
EPROTO c/error/errno_macros
EPROTONOSUPPORT c/error/errno_macros
EPROTOTYPE c/error/errno_macros
ERANGE c/error/errno_macros
EROFS c/error/errno_macros
ESPIPE c/error/errno_macros
ESRCH c/error/errno_macros
ETIME c/error/errno_macros
ETIMEDOUT c/error/errno_macros
ETXTBSY c/error/errno_macros
EWOULDBLOCK c/error/errno_macros
EXDEV c/error/errno_macros
abort c/program/abort
exit c/program/exit
quick_exit c/program/quick_exit
_Exit c/program/_Exit
atexit c/program/atexit
at_quick_exit c/program/at_quick_exit
EXIT_SUCCESS c/program/EXIT_status
EXIT_FAILURE c/program/EXIT_status
system c/program/system
getenv c/program/getenv
signal c/program/signal
raise c/program/raise
sig_atomic_t c/program/sig_atomic_t
SIG_DFL c/program/SIG_strategies
SIG_IGN c/program/SIG_strategies
SIG_ERR c/program/SIG_ERR
SIGABRT c/program/SIG_types
SIGFPE c/program/SIG_types
SIGILL c/program/SIG_types
SIGINT c/program/SIG_types
SIGSEGV c/program/SIG_types
SIGTERM c/program/SIG_types
longjmp c/program/longjmp
setjmp c/program/setjmp
jmp_buf c/program/jmp_buf
difftime c/chrono/difftime
time c/chrono/time
clock c/chrono/clock
asctime c/chrono/asctime
ctime c/chrono/ctime
strftime c/chrono/strftime
wcsftime c/chrono/wcsftime
gmtime c/chrono/gmtime
localtime c/chrono/localtime
mktime c/chrono/mktime
CLOCKS_PER_SEC c/chrono/CLOCKS_PER_SEC
tm c/chrono/tm
time_t c/chrono/time_t
clock_t c/chrono/clock_t
timespec c/chrono/timespec
isalnum c/string/byte/isalnum
isalpha c/string/byte/isalpha
islower c/string/byte/islower
isupper c/string/byte/isupper
isdigit c/string/byte/isdigit
isxdigit c/string/byte/isxdigit
iscntrl c/string/byte/iscntrl
isgraph c/string/byte/isgraph
isspace c/string/byte/isspace
isblank c/string/byte/isblank
isprint c/string/byte/isprint
ispunct c/string/byte/ispunct
tolower c/string/byte/tolower
toupper c/string/byte/toupper
atof c/string/byte/atof
atoi c/string/byte/atoi
atol c/string/byte/atoi
atoll c/string/byte/atoi
strtol c/string/byte/strtol
strtoll c/string/byte/strtol
strtoul c/string/byte/strtoul
strtoull c/string/byte/strtoul
strtof c/string/byte/strtof
strtod c/string/byte/strtof
strtold c/string/byte/strtof
strtoimax c/string/byte/strtoimax
strtoumax c/string/byte/strtoimax
strcpy c/string/byte/strcpy
strncpy c/string/byte/strncpy
strcat c/string/byte/strcat
strncat c/string/byte/strncat
strxfrm c/string/byte/strxfrm
strlen c/string/byte/strlen
strcmp c/string/byte/strcmp
strncmp c/string/byte/strncmp
strcoll c/string/byte/strcoll
strchr c/string/byte/strchr
strrchr c/string/byte/strrchr
strspn c/string/byte/strspn
strcspn c/string/byte/strcspn
strpbrk c/string/byte/strpbrk
strstr c/string/byte/strstr
strtok c/string/byte/strtok
memchr c/string/byte/memchr
memcmp c/string/byte/memcmp
memset c/string/byte/memset
memcpy c/string/byte/memcpy
memmove c/string/byte/memmove
strerror c/string/byte/strerror
mblen c/string/multibyte/mblen
mbtowc c/string/multibyte/mbtowc
wctomb c/string/multibyte/wctomb
mbstowcs c/string/multibyte/mbstowcs
wcstombs c/string/multibyte/wcstombs
mbsinit c/string/multibyte/mbsinit
btowc c/string/multibyte/btowc
wctob c/string/multibyte/wctob
mbrlen c/string/multibyte/mbrlen
mbrtowc c/string/multibyte/mbrtowc
wcrtomb c/string/multibyte/wcrtomb
mbsrtowcs c/string/multibyte/mbsrtowcs
wcsrtombs c/string/multibyte/wcsrtombs
mbrtoc16 c/string/multibyte/mbrtoc16
c16rtomb c/string/multibyte/c16rtomb
mbrtoc32 c/string/multibyte/mbrtoc32
c32rtomb c/string/multibyte/c32rtomb
mbstate_t c/string/multibyte/mbstate_t
iswalnum c/string/wide/iswalnum
iswalpha c/string/wide/iswalpha
iswlower c/string/wide/iswlower
iswupper c/string/wide/iswupper
iswdigit c/string/wide/iswdigit
iswxdigit c/string/wide/iswxdigit
iswcntrl c/string/wide/iswcntrl
iswgraph c/string/wide/iswgraph
iswspace c/string/wide/iswspace
iswblank c/string/wide/iswblank
iswprint c/string/wide/iswprint
iswpunct c/string/wide/iswpunct
iswctype c/string/wide/iswctype
wctype c/string/wide/wctype
towlower c/string/wide/towlower
towupper c/string/wide/towupper
towctrans c/string/wide/towctrans
wctrans c/string/wide/wctrans
wcstof c/string/wide/wcstof
wcstod c/string/wide/wcstof
wcstold c/string/wide/wcstof
wcstol c/string/wide/wcstol
wcstoll c/string/wide/wcstol
wcstoul c/string/wide/wcstoul
wcstoull c/string/wide/wcstoul
wcstoimax c/string/wide/wcstoimax
wcstoumax c/string/wide/wcstoimax
wcscpy c/string/wide/wcscpy
wcsncpy c/string/wide/wcsncpy
wcscat c/string/wide/wcscat
wcsncat c/string/wide/wcsncat
wcsxfrm c/string/wide/wcsxfrm
wcslen c/string/wide/wcslen
wcscmp c/string/wide/wcscmp
wcsncmp c/string/wide/wcsncmp
wcscoll c/string/wide/wcscoll
wcschr c/string/wide/wcschr
wcsrchr c/string/wide/wcsrchr
wcsspn c/string/wide/wcsspn
wcscspn c/string/wide/wcscspn
wcspbrk c/string/wide/wcspbrk
wcsstr c/string/wide/wcsstr
wcstok c/string/wide/wcstok
wmemchr c/string/wide/wmemchr
wmemcmp c/string/wide/wmemcmp
wmemset c/string/wide/wmemset
wmemcpy c/string/wide/wmemcpy
wmemmove c/string/wide/wmemmove
abs c/numeric/math/abs
labs c/numeric/math/abs
llabs c/numeric/math/abs
fabs c/numeric/math/fabs
div c/numeric/math/div
ldiv c/numeric/math/div
fmod c/numeric/math/fmod
remainder c/numeric/math/remainder
remquo c/numeric/math/remquo
fma c/numeric/math/fma
fmax c/numeric/math/fmax
fmin c/numeric/math/fmin
fdim c/numeric/math/fdim
nan c/numeric/math/nan
nanf c/numeric/math/nan
nanl c/numeric/math/nan
exp c/numeric/math/exp
exp2 c/numeric/math/exp2
expm1 c/numeric/math/expm1
log c/numeric/math/log
log10 c/numeric/math/log10
log1p c/numeric/math/log1p
ilogb c/numeric/math/ilogb
logb c/numeric/math/logb
sqrt c/numeric/math/sqrt
cbrt c/numeric/math/cbrt
hypot c/numeric/math/hypot
pow c/numeric/math/pow
sin c/numeric/math/sin
cos c/numeric/math/cos
tan c/numeric/math/tan
asin c/numeric/math/asin
acos c/numeric/math/acos
atan c/numeric/math/atan
atan2 c/numeric/math/atan2
sinh c/numeric/math/sinh
cosh c/numeric/math/cosh
tanh c/numeric/math/tanh
asinh c/numeric/math/asinh
acosh c/numeric/math/acosh
atanh c/numeric/math/atanh
erf c/numeric/math/erf
erfc c/numeric/math/erfc
lgamma c/numeric/math/lgamma
tgamma c/numeric/math/tgamma
ceil c/numeric/math/ceil
floor c/numeric/math/floor
trunc c/numeric/math/trunc
round c/numeric/math/round
lround c/numeric/math/round
llround c/numeric/math/round
nearbyint c/numeric/math/nearbyint
rint c/numeric/math/rint
lrint c/numeric/math/rint
llrint c/numeric/math/rint
frexp c/numeric/math/frexp
ldexp c/numeric/math/ldexp
modf c/numeric/math/modf
scalbn c/numeric/math/scalbn
scalbln c/numeric/math/scalbn
nextafter c/numeric/math/nextafter
nexttoward c/numeric/math/nextafter
copysign c/numeric/math/copysign
fpclassify c/numeric/math/fpclassify
isfinite c/numeric/math/isfinite
isinf c/numeric/math/isinf
isnan c/numeric/math/isnan
isnormal c/numeric/math/isnormal
signbit c/numeric/math/signbit
HUGE_VAL c/numeric/math/HUGE_VAL
HUGE_VALF c/numeric/math/HUGE_VAL
HUGE_VALL c/numeric/math/HUGE_VAL
FP_INFINITE c/numeric/math/FP_categories
FP_NAN c/numeric/math/FP_categories
FP_NORMAL c/numeric/math/FP_categories
FP_SUBNORMAL c/numeric/math/FP_categories
FP_ZERO c/numeric/math/FP_categories
feclearexcept c/numeric/fenv/feclearexcept
fetestexcept c/numeric/fenv/fetestexcept
feraiseexcept c/numeric/fenv/feraiseexcept
fegetexceptflag c/numeric/fenv/feexceptflag
fesetexceptflag c/numeric/fenv/feexceptflag
fegetround c/numeric/fenv/feround
fesetround c/numeric/fenv/feround
fegetenv c/numeric/fenv/feenv
fesetenv c/numeric/fenv/feenv
feholdexcept c/numeric/fenv/feholdexcept
feupdateenv c/numeric/fenv/feupdateenv
FE_ALL_EXCEPT c/numeric/fenv/FE_exceptions
FE_DIVBYZERO c/numeric/fenv/FE_exceptions
FE_INEXACT c/numeric/fenv/FE_exceptions
FE_INVALID c/numeric/fenv/FE_exceptions
FE_OVERFLOW c/numeric/fenv/FE_exceptions
FE_UNDERFLOW c/numeric/fenv/FE_exceptions
FE_DOWNWARD c/numeric/fenv/FE_round
FE_TONEAREST c/numeric/fenv/FE_round
FE_TOWARDZERO c/numeric/fenv/FE_round
FE_UPWARD c/numeric/fenv/FE_round
FE_DFL_ENV c/numeric/fenv/FE_DFL_ENV
srand c/numeric/random/srand
rand c/numeric/random/rand
RAND_MAX c/numeric/random/RAND_MAX
complex c/numeric/complex/complex
_Complex_I c/numeric/complex/Complex_I
imaginary c/numeric/complex/imaginary
_Imaginary_I c/numeric/complex/Imaginary_I
_I c/numeric/complex/I
CMPLX c/numeric/complex/CMPLX
CMPLXF c/numeric/complex/CMPLX
CMPLXL c/numeric/complex/CMPLX
cimag c/numeric/complex/cimag
cimagf c/numeric/complex/cimag
cimagl c/numeric/complex/cimag
creal c/numeric/complex/creal
crealf c/numeric/complex/creal
creall c/numeric/complex/creal
carg c/numeric/complex/carg
cargf c/numeric/complex/carg
cargl c/numeric/complex/carg
conj c/numeric/complex/conj
conjf c/numeric/complex/conj
conjl c/numeric/complex/conj
cproj c/numeric/complex/cproj
cprojf c/numeric/complex/cproj
cprojl c/numeric/complex/cproj
cabs c/numeric/complex/cabs
cabsf c/numeric/complex/cabs
cabsl c/numeric/complex/cabs
cexp c/numeric/complex/cexp
cexpf c/numeric/complex/cexp
cexpl c/numeric/complex/cexp
clog c/numeric/complex/clog
clogf c/numeric/complex/clog
clogl c/numeric/complex/clog
cpow c/numeric/complex/cpow
cpowf c/numeric/complex/cpow
cpowl c/numeric/complex/cpow
csqrt c/numeric/complex/csqrt
csqrtf c/numeric/complex/csqrt
csqrtl c/numeric/complex/csqrt
cacos c/numeric/complex/cacos
cacosf c/numeric/complex/cacos
cacosl c/numeric/complex/cacos
casin c/numeric/complex/casin
casinf c/numeric/complex/casin
casinl c/numeric/complex/casin
catan c/numeric/complex/catan
catanf c/numeric/complex/catan
catanl c/numeric/complex/catan
ccos c/numeric/complex/ccos
ccosf c/numeric/complex/ccos
ccosl c/numeric/complex/ccos
csin c/numeric/complex/csin
csinf c/numeric/complex/csin
csinl c/numeric/complex/csin
ctan c/numeric/complex/ctan
ctanf c/numeric/complex/ctan
ctanl c/numeric/complex/ctan
cacosh c/numeric/complex/cacosh
cacoshf c/numeric/complex/cacosh
cacoshl c/numeric/complex/cacosh
casinh c/numeric/complex/casinh
casinhf c/numeric/complex/casinh
casinhl c/numeric/complex/casinh
catanh c/numeric/complex/catanh
catanhf c/numeric/complex/catanh
catanhl c/numeric/complex/catanh
ccosh c/numeric/complex/ccosh
ccoshf c/numeric/complex/ccosh
ccoshl c/numeric/complex/ccosh
csinh c/numeric/complex/csinh
csinhf c/numeric/complex/csinh
csinhl c/numeric/complex/csinh
ctanh c/numeric/complex/ctanh
ctanhf c/numeric/complex/ctanh
ctanhl c/numeric/complex/ctanh
qsort c/algorithm/qsort
bsearch c/algorithm/bsearch
fopen c/io/fopen
freopen c/io/freopen
fflush c/io/fflush
fclose c/io/fclose
setbuf c/io/setbuf
setvbuf c/io/setvbuf
fread c/io/fread
fwrite c/io/fwrite
fgetc c/io/fgetc
getc c/io/fgetc
fgets c/io/fgets
fputc c/io/fputc
putc c/io/fputc
fputs c/io/fputs
getchar c/io/getchar
gets c/io/gets
putchar c/io/putchar
puts c/io/puts
ungetc c/io/ungetc
fgetwc c/io/fgetwc
fgetss c/io/fgetws
fputwc c/io/fputwc
fputws c/io/fputws
getwchar c/io/getwchar
putwchar c/io/putwchar
ungetwc c/io/ungetwc
scanf c/io/fscanf
fscanf c/io/fscanf
sscanf c/io/fscanf
vscanf c/io/vfscanf
vfscanf c/io/vfscanf
vsscanf c/io/vfscanf
printf c/io/fprintf
fprintf c/io/fprintf
sprintf c/io/fprintf
snprintf c/io/fprintf
vprintf c/io/vfprintf
vfprintf c/io/vfprintf
vsprintf c/io/vfprintf
vsnprintf c/io/vfprintf
wscanf c/io/fwscanf
fwscanf c/io/fwscanf
swscanf c/io/fwscanf
vwscanf c/io/vfwscanf
vfwscanf c/io/vfwscanf
vswscanf c/io/vfwscanf
wprintf c/io/fwprintf
fwprintf c/io/fwprintf
swprintf c/io/fwprintf
vwprintf c/io/vfwprintf
vfwprintf c/io/vfwprintf
vswprintf c/io/vfwprintf
ftell c/io/ftell
fgetpos c/io/fgetpos
fseek c/io/fseek
fsetpos c/io/fsetpos
rewind c/io/rewind
clearerr c/io/clearerr
feof c/io/feof
ferror c/io/ferror
perror c/io/perror
remove c/io/remove
rename c/io/rename
tmpfile c/io/tmpfile
tmpnam c/io/tmpnam
FILE c/io
fpos_t c/io
stdin c/io
stdout c/io
stderr c/io
EOF c/io
FOPEN_MAX c/io
FILENAME_MAX c/io
BUFSIZ c/io
_IOFBF c/io
_IOLBF c/io
_IONBF c/io
SEEK_SET c/io
SEEK_CUR c/io
SEEK_END c/io
TMP_MAX c/io
L_tmpnam c/io
setlocale c/locale/setlocale
localeconv c/locale/localeconv
lconv c/locale/lconv
LC_ALL c/locale/LC_categories
LC_COLLATE c/locale/LC_categories
LC_CTYPE c/locale/LC_categories
LC_MONETARY c/locale/LC_categories
LC_NUMERIC c/locale/LC_categories
LC_TIME c/locale/LC_categories
memory_order c/atomic/memory_order
memory_order_relaxed c/atomic/memory_order
memory_order_consume c/atomic/memory_order
memory_order_acquire c/atomic/memory_order
memory_order_release c/atomic/memory_order
memory_order_acq_rel c/atomic/memory_order
memory_order_seq_cst c/atomic/memory_order
atomic_flag c/atomic/atomic_flag
ATOMIC_BOOL_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_CHAR_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_CHAR16_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_CHAR32_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_WCHAR_T_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_SHORT_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_INT_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_LONG_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_LLONG_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_POINTER_LOCK_FREE c/atomic/ATOMIC_LOCK_FREE_consts
ATOMIC_FLAG_INIT c/atomic/ATOMIC_FLAG_INIT
ATOMIC_VAR_INIT c/atomic/ATOMIC_VAR_INIT
kill_dependency c/atomic/kill_dependency
atomic_flag_test_and_set c/atomic/atomic_flag_test_and_set
atomic_flag_test_and_set_explicit c/atomic/atomic_flag_test_and_set
atomic_flag_clear c/atomic/atomic_flag_clear
atomic_flag_clear_explicit c/atomic/atomic_flag_clear
atomic_init c/atomic/atomic_init
atomic_is_lock_free c/atomic/atomic_is_lock_free
atomic_store c/atomic/atomic_store
atomic_store_explicit c/atomic/atomic_store
atomic_load c/atomic/atomic_load
atomic_load_explicit c/atomic/atomic_load
atomic_exchange c/atomic/atomic_exchange
atomic_exchange_explicit c/atomic/atomic_exchange
atomic_compare_exchange_weak c/atomic/atomic_compare_exchange
atomic_compare_exchange_weak_explicit c/atomic/atomic_compare_exchange
atomic_compare_exchange_strong c/atomic/atomic_compare_exchange
atomic_compare_exchange_strong_explicit c/atomic/atomic_compare_exchange
atomic_fetch_add c/atomic/atomic_fetch_add
atomic_fetch_add_explicit c/atomic/atomic_fetch_add
atomic_fetch_sub c/atomic/atomic_fetch_sub
atomic_fetch_sub_explicit c/atomic/atomic_fetch_sub
atomic_fetch_or c/atomic/atomic_fetch_or
atomic_fetch_or_explicit c/atomic/atomic_fetch_or
atomic_fetch_xor c/atomic/atomic_fetch_xor
atomic_fetch_xor_explicit c/atomic/atomic_fetch_xor
atomic_fetch_and c/atomic/atomic_fetch_and
atomic_fetch_and_explicit c/atomic/atomic_fetch_and
atomic_thread_fence c/atomic/atomic_thread_fence
atomic_signal_fence c/atomic/atomic_signal_fence
atomic_bool c/atomic
atomic_char c/atomic
atomic_schar c/atomic
atomic_uchar c/atomic
atomic_short c/atomic
atomic_ushort c/atomic
atomic_int c/atomic
atomic_uint c/atomic
atomic_long c/atomic
atomic_ulong c/atomic
atomic_llong c/atomic
atomic_ullong c/atomic
atomic_char16_t c/atomic
atomic_char32_t c/atomic
atomic_wchar_t c/atomic
atomic_int_least8_t c/atomic
atomic_uint_least8_t c/atomic
atomic_int_least16_t c/atomic
atomic_uint_least16_t c/atomic
atomic_int_least32_t c/atomic
atomic_uint_least32_t c/atomic
atomic_int_least64_t c/atomic
atomic_uint_least64_t c/atomic
atomic_int_fast8_t c/atomic
atomic_uint_fast8_t c/atomic
atomic_int_fast16_t c/atomic
atomic_uint_fast16_t c/atomic
atomic_int_fast32_t c/atomic
atomic_uint_fast32_t c/atomic
atomic_int_fast64_t c/atomic
atomic_uint_fast64_t c/atomic
atomic_intprt_t c/atomic
atomic_uintprt_t c/atomic
atomic_size_t c/atomic
atomic_ptrdiff_t c/atomic
atomic_intmax_t c/atomic
atomic_uintmax_t c/atomic
thrd_t c/thread
thrd_create c/thread/thrd_create
thrd_equal c/thread/thrd_equal
thrd_current c/thread/thrd_current
thrd_sleep c/thread/thrd_sleep
thrd_yield c/thread/thrd_yield
thrd_exit c/thread/thrd_exit
thrd_detach c/thread/thrd_detach
thrd_join c/thread/thrd_join
thrd_success c/thread/thrd_errors
thrd_timeout c/thread/thrd_errors
thrd_busy c/thread/thrd_errors
thrd_nomem c/thread/thrd_errors
thrd_error c/thread/thrd_errors
thrd_start_t c/thread
mtx_t c/thread
mtx_init c/thread/mtx_init
mtx_lock c/thread/mtx_lock
mtx_timedlock c/thread/mtx_timedlock
mtx_trylock c/thread/mtx_trylock
mtx_unlock c/thread/mtx_unlock
mtx_destroy c/thread/mtx_destroy
mtx_plain c/thread/mtx_types
mtx_recursive c/thread/mtx_types
mtx_timed c/thread/mtx_types
thrd_start_t c/thread
once_flag c/thread/call_once
ONCE_FLAG_INIT c/thread/call_once
call_once c/thread/call_once
cnd_t c/thread
cnd_init c/thread/cnd_init
cnd_signal c/thread/cnd_signal
cnd_broadcast c/thread/cnd_broadcast
cnd_wait c/thread/cnd_wait
cnd_timedwait c/thread/cnd_timedwait
cnd_destroy c/thread/cnd_destroy
thread_local c/thread/thread_local
TSS_DTOR_ITERATIONS c/thread/TSS_DTOR_ITERATIONS
tss_t c/thread
tss_dtor_t c/thread
tss_create c/thread/tss_create
tss_get c/thread/tss_get
tss_set c/thread/tss_set
tss_delete c/thread/tss_delete

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
package org.example.mirai.plugin
package top.jie65535.jcr
import net.mamoe.mirai.alsoLogin
import net.mamoe.mirai.console.MiraiConsole
@ -9,16 +9,13 @@ import net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader
suspend fun main() {
MiraiConsoleTerminalLoader.startAsDaemon()
//如果是Kotlin
PluginMain.load()
PluginMain.enable()
//如果是Java
// JavaPluginMain.INSTANCE.load()
// JavaPluginMain.INSTANCE.enable()
JCppReferencePlugin.load()
JCppReferencePlugin.enable()
val bot = MiraiConsole.addBot(123456, "") {
fileBasedDeviceInfo()
}.alsoLogin()
}
//.alsoLogin()
MiraiConsole.job.join()
}