Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
19259489
Commit
19259489
authored
Jan 17, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup
parent
038d69b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
+3
-0
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt
...-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt
+1
-1
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt
.../commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt
+3
-8
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt
View file @
19259489
...
...
@@ -126,6 +126,9 @@ abstract class Bot : CoroutineScope {
// endregion
/**
* 关闭这个 [Bot], 停止一切相关活动. 不可重新登录.
*/
abstract
fun
dispose
(
throwable
:
Throwable
?)
// region extensions
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/contact/QQ.kt
View file @
19259489
...
...
@@ -11,7 +11,7 @@ import net.mamoe.mirai.data.Profile
/**
* QQ 对象.
* 注意: 一个 [QQ] 实例并不是独立的, 它属于一个 [Bot].
* 它不能被直接构造. 任何时候都应从 [Bot.
qq], [Bot.ContactSystem.getQQ], [BotSession.qq
] 或事件中获取.
* 它不能被直接构造. 任何时候都应从 [Bot.
getQQ
] 或事件中获取.
*
* 对于同一个 [Bot] 任何一个人的 [QQ] 实例都是单一的.
*
...
...
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt
View file @
19259489
...
...
@@ -184,6 +184,7 @@ fun Any?.contentToString(prefix: String = ""): String = when (this) {
expect
fun
Any
.
contentToStringReflectively
(
prefix
:
String
=
""
):
String
@Suppress
(
"UNCHECKED_CAST"
)
fun
ByteReadPacket
.
readProtoMap
(
length
:
Long
=
this
.
remaining
):
ProtoMap
{
val
map
=
ProtoMap
(
mutableMapOf
())
...
...
@@ -206,14 +207,8 @@ fun ByteReadPacket.readProtoMap(length: Long = this.remaining): ProtoMap {
}
if
(
map
.
containsKey
(
id
))
{
if
(
map
[
id
]
is
MutableList
<
*
>)
{
@Suppress
(
"UNCHECKED_CAST"
)
(
map
[
id
]
as
MutableList
<
Any
>)
+=
readValue
()
}
else
{
map
[
id
]
=
mutableListOf
(
map
[
id
]
!!
)
@Suppress
(
"UNCHECKED_CAST"
)
(
map
[
id
]
as
MutableList
<
Any
>)
+=
readValue
()
}
if
(
map
[
id
]
!
is
MutableList
<
*
>)
map
[
id
]
=
mutableListOf
(
map
[
id
]
!!
)
(
map
[
id
]
as
MutableList
<
Any
>)
+=
readValue
()
}
else
{
map
[
id
]
=
readValue
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment