diff options
Diffstat (limited to 'pkg/messages/types/svcPrint.go')
| -rw-r--r-- | pkg/messages/types/svcPrint.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/messages/types/svcPrint.go b/pkg/messages/types/svcPrint.go index 56f0d08..0db7ffd 100644 --- a/pkg/messages/types/svcPrint.go +++ b/pkg/messages/types/svcPrint.go | |||
| @@ -4,18 +4,18 @@ import ( | |||
| 4 | "strings" | 4 | "strings" |
| 5 | 5 | ||
| 6 | "github.com/pektezol/bitreader" | 6 | "github.com/pektezol/bitreader" |
| 7 | "github.com/pektezol/sdp.go/pkg/writer" | 7 | "github.com/pektezol/sdp.go/pkg/types" |
| 8 | ) | 8 | ) |
| 9 | 9 | ||
| 10 | type SvcPrint struct { | 10 | type SvcPrint struct { |
| 11 | Message string | 11 | Message string `json:"message"` |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | func ParseSvcPrint(reader *bitreader.Reader) SvcPrint { | 14 | func ParseSvcPrint(reader *bitreader.Reader, demo *types.Demo) SvcPrint { |
| 15 | svcPrint := SvcPrint{ | 15 | svcPrint := SvcPrint{ |
| 16 | Message: reader.TryReadString(), | 16 | Message: reader.TryReadString(), |
| 17 | } | 17 | } |
| 18 | // common psycopath behaviour | 18 | // common psycopath behaviour |
| 19 | writer.TempAppendLine("\t\t%s", strings.Replace(strings.ReplaceAll(strings.ReplaceAll(svcPrint.Message, "\n", "\n\t\t"), "\n\t\t\n\t\t", ""), "\n\t\t", "", 1)) | 19 | demo.Writer.TempAppendLine("\t\t%s", strings.Replace(strings.ReplaceAll(strings.ReplaceAll(svcPrint.Message, "\n", "\n\t\t"), "\n\t\t\n\t\t", ""), "\n\t\t", "", 1)) |
| 20 | return svcPrint | 20 | return svcPrint |
| 21 | } | 21 | } |