initial course command

This commit is contained in:
wish
2022-10-30 15:03:12 +11:00
parent bac4e70be4
commit 31bac7bd68
6 changed files with 85 additions and 24 deletions

View File

@@ -272,8 +272,10 @@ func (s *Session) logMessage(opcode uint16, data []byte, sender string, recipien
func (s *Session) CourseExists(name string) bool {
for _, course := range s.courses {
if strings.ToLower(name) == strings.ToLower(course.Name) {
return true
for _, alias := range course.Aliases {
if strings.ToLower(name) == strings.ToLower(alias) {
return true
}
}
}
return false