go-ircevent/src/irc_struct.go

51 lines
909 B
Go
Raw Normal View History

2009-11-18 15:03:14 +00:00
// Copyright 2009 Thomas Jager <mail@jager.no> All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
2009-11-18 00:28:12 +00:00
package irc
import (
"net"
"time"
2012-03-22 03:50:21 +00:00
"tls"
)
2009-11-18 00:28:12 +00:00
type IRCConnection struct {
Error chan error
Log chan string
Password string
SSLConfig *tls.Config
socket net.Conn
pread, pwrite chan string
syncreader, syncwriter chan bool
reconnecting bool
nick string //The nickname we want.
nickcurrent string //The nickname we currently have.
user string
registered bool
server string
events map[string][]func(*IRCEvent)
2010-09-29 06:58:32 +00:00
lastMessage time.Time
ticker <-chan time.Time
ticker2 <-chan time.Time
VerboseCallbackHandler bool
quitting bool
2009-11-18 00:28:12 +00:00
}
type IRCEvent struct {
Code string
Message string
Raw string
Nick string //<nick>
Host string //<nick>!<usr>@<host>
Source string //<host>
User string //<usr>
Arguments []string
2009-11-18 00:28:12 +00:00
}