initial rights v4 concept

This commit is contained in:
wish
2023-03-11 23:17:14 +11:00
parent 29cf7add11
commit bcb71536ec
7 changed files with 135 additions and 129 deletions

View File

@@ -3,10 +3,10 @@ package channelserver
import (
"encoding/binary"
"encoding/hex"
"erupe-ce/common/mhfcourse"
"fmt"
"io"
"net"
"strings"
"sync"
"time"
@@ -43,7 +43,7 @@ type Session struct {
charID uint32
logKey []byte
sessionStart int64
courses []mhfpacket.Course
courses []mhfcourse.Course
token string
kqf []byte
kqfOverride bool
@@ -268,14 +268,3 @@ func (s *Session) logMessage(opcode uint16, data []byte, sender string, recipien
fmt.Printf("Data [%d bytes]:\n(Too long!)\n\n", len(data))
}
}
func (s *Session) FindCourse(name string) mhfpacket.Course {
for _, course := range s.courses {
for _, alias := range course.Aliases {
if strings.ToLower(name) == strings.ToLower(alias) {
return course
}
}
}
return mhfpacket.Course{}
}