ircd/message.go

24 lines
343 B
Go
Raw Normal View History

2014-11-22 13:21:30 +00:00
package ircd
import (
"strings"
)
type Message struct {
Src string
Dst string
Ctx string
Cmd string
Args []string
Text string
}
func M(src, dst, ctx, cmd, args, text string) *Message {
argv := []string{}
if args != "" {
argv = strings.Split(args, " ")
}
return &Message{src, dst, ctx, cmd, argv, text}
}
// vi:ts=4:sw=4:et