diff --git a/answer/delete_all_mails.go b/answer/delete_all_mails.go deleted file mode 100644 index 3197586..0000000 --- a/answer/delete_all_mails.go +++ /dev/null @@ -1,24 +0,0 @@ -package answer - -// import ( -// "github.com/ggmolly/belfast/connection" -// "github.com/ggmolly/belfast/orm" - -// "github.com/ggmolly/belfast/protobuf" -// ) - -// func DeleteAllMails(buffer *[]byte, client *connection.Client) (int, int, error) { -// mailIds := make([]uint32, len(client.Commander.Mails)) -// for i, mail := range client.Commander.Mails { -// mailIds[i] = mail.ID -// } -// response := protobuf.SC_30007{ -// IdList: mailIds, -// } -// if err := client.Commander.CleanMailbox(); err != nil { -// return 0, 30007, err -// } -// client.Commander.Mails = make([]orm.Mail, 0) -// client.Commander.MailsMap = make(map[uint32]*orm.Mail) -// return client.SendMessage(30007, &response) -// } diff --git a/answer/give_mail_attachments.go b/answer/give_mail_attachments.go deleted file mode 100644 index d2de0d9..0000000 --- a/answer/give_mail_attachments.go +++ /dev/null @@ -1,32 +0,0 @@ -package answer - -// import ( -// "github.com/ggmolly/belfast/connection" - -// "github.com/ggmolly/belfast/protobuf" -// "google.golang.org/protobuf/proto" -// ) - -// func GiveMailAttachments(buffer *[]byte, client *connection.Client) (int, int, error) { -// var data protobuf.CS_30004 -// err := proto.Unmarshal(*buffer, &data) -// if err != nil { -// return 0, 30005, err -// } -// var attachments []*protobuf.ATTACHMENT -// for _, mailId := range data.GetId() { -// mail, ok := client.Commander.MailsMap[mailId] -// if !ok { -// return 0, 30005, nil -// } -// mailAttachments, err := mail.CollectAttachments(client.Commander) -// if err != nil { -// return 0, 30005, err -// } -// attachments = append(attachments, mailAttachments...) -// } -// response := protobuf.SC_30005{ -// AttachmentList: attachments, -// } -// return client.SendMessage(30005, &response) -// } diff --git a/answer/update_mail_imp_flag.go b/answer/update_mail_imp_flag.go deleted file mode 100644 index c140d4d..0000000 --- a/answer/update_mail_imp_flag.go +++ /dev/null @@ -1,29 +0,0 @@ -package answer - -// import ( -// "github.com/ggmolly/belfast/connection" - -// "github.com/ggmolly/belfast/protobuf" -// "google.golang.org/protobuf/proto" -// ) - -// func UpdateMailImpFlag(buffer *[]byte, client *connection.Client) (int, int, error) { -// var data protobuf.CS_30010 -// err := proto.Unmarshal(*buffer, &data) -// if err != nil { -// return 0, 30011, err -// } -// var response protobuf.SC_30011 -// mail, ok := client.Commander.MailsMap[data.GetId()] -// if !ok { -// response.Result = proto.Uint32(1) // 1 = mail not found -// } else { -// mail.IsImportant = data.GetFlag() == 1 -// err = mail.Update() -// if err != nil { -// return 0, 30011, err -// } -// response.Result = proto.Uint32(0) // 0 = success -// } -// return client.SendMessage(30011, &response) -// }