Example #1
0
func P_talk_req(sess *Session, reader *packet.Packet) []byte {
	tbl, _ := PKT_talk(reader)
	dest := user_tbl.Query(tbl.F_user)
	chat := Words{tbl.F_msg, sess.User.Name}
	if dest != nil {
		ipc.Send(sess.User.Id, dest.Id, ipc.SVC_CHAT, &chat)
	} else {
		log.Println("no such user :", tbl.F_user)
	}
	return nil
}
Example #2
0
func P_talk_req(sess *Session, reader *packet.Packet) []byte {
	tbl, _ := PKT_talk(reader)
	dest := user_tbl.Query(tbl.F_user)
	Send(sess.User.Id, dest.Id, SERVICE_TALK, false, tbl.F_msg)
	return nil
}