24 lines
343 B
Go
24 lines
343 B
Go
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
|