go-ircevent/irc_struct.go
Reynir Reynisson 670fd99fb4 Rename IRC{Connection,Event} -> {Connection,Event}
I don't feel it's necessary to tag the types with IRC, as a client would
tag it with the module name anyway. Example:

    var conn irc.IRCConnection
    // ...

vs.

    var conn irc.Connection
    // ...
2012-05-11 13:35:25 +02:00

45 lines
1005 B
Go

// 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.
package irc
import (
"net"
"time"
)
type Connection struct {
socket net.Conn
pread, pwrite chan string
Error chan error
syncreader, syncwriter chan bool
nick string //The nickname we want.
nickcurrent string //The nickname we currently have.
user string
registered bool
server string
Password string
events map[string][]func(*Event)
lastMessage time.Time
ticker <-chan time.Time
ticker2 <-chan time.Time
VerboseCallbackHandler bool
quitting bool
}
type Event struct {
Code string
Message string
Raw string
Nick string //<nick>
Host string //<nick>!<usr>@<host>
Source string //<host>
User string //<usr>
Arguments []string
}