26 lines
558 B
Go
26 lines
558 B
Go
package sircd
|
|
|
|
type ircNick string
|
|
type ircRealName string
|
|
type hostname string
|
|
|
|
type ircUserSession struct {
|
|
//FIXME add a mutex and protect during writes
|
|
nick ircNick
|
|
realname ircRealName
|
|
host hostname
|
|
}
|
|
|
|
func NewIrcUserSession() *ircUserSession {
|
|
// FIXME get conn.RemoteAddr passed in and stringify it here and put it
|
|
// in the session
|
|
s := new(ircUserSession)
|
|
s.nick = '*' //default for s2c messages pre-NICK
|
|
return s
|
|
}
|
|
|
|
func (s *ircUserSession) SetNick(input string) {
|
|
// FIXME check for valid nick-ness
|
|
s.nick = input
|
|
}
|