Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
go-cqhttp
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
nanahira
go-cqhttp
Commits
b5b61174
Commit
b5b61174
authored
Sep 20, 2020
by
Mrs4s
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix server.
parent
4662f1e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
main.go
main.go
+5
-1
No files found.
main.go
View file @
b5b61174
...
@@ -252,12 +252,16 @@ func main() {
...
@@ -252,12 +252,16 @@ func main() {
if
data
,
err
:=
ioutil
.
ReadFile
(
"servers.bin"
);
err
==
nil
{
if
data
,
err
:=
ioutil
.
ReadFile
(
"servers.bin"
);
err
==
nil
{
r
:=
binary
.
NewReader
(
data
)
r
:=
binary
.
NewReader
(
data
)
var
addr
[]
*
net
.
TCPAddr
var
addr
[]
*
net
.
TCPAddr
for
i
:=
0
;
i
<
int
(
r
.
ReadUInt16
());
i
++
{
l
:=
r
.
ReadUInt16
()
for
i
:=
0
;
i
<
int
(
l
);
i
++
{
addr
=
append
(
addr
,
&
net
.
TCPAddr
{
addr
=
append
(
addr
,
&
net
.
TCPAddr
{
IP
:
net
.
ParseIP
(
r
.
ReadString
()),
IP
:
net
.
ParseIP
(
r
.
ReadString
()),
Port
:
int
(
r
.
ReadUInt16
()),
Port
:
int
(
r
.
ReadUInt16
()),
})
})
}
}
if
len
(
addr
)
>
0
{
cli
.
SetCustomServer
(
addr
)
}
}
}
}
}
rsp
,
err
:=
cli
.
Login
()
rsp
,
err
:=
cli
.
Login
()
...
...
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