1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-05-21 06:53:21 +00:00

Move to using the new event registry internally.

This commit is contained in:
Alex Bramley 2011-07-27 21:10:01 +01:00
parent a2b53e6fc3
commit 5e814babc7
2 changed files with 14 additions and 19 deletions

View file

@ -2,10 +2,11 @@ package client
import (
"bufio"
"os"
"net"
"crypto/tls"
"event"
"fmt"
"net"
"os"
"strings"
"time"
)
@ -23,7 +24,7 @@ type Conn struct {
Network string
// Event handler mapping
events map[string][]func(*Conn, *Line)
Registry event.EventRegistry
// Map of channels we're on
chans map[string]*Channel
// Map of nicks we know about
@ -72,6 +73,7 @@ type Conn struct {
// that you can add event handlers to it. See AddHandler() for details.
func New(nick, user, name string) *Conn {
conn := &Conn{
Registry: event.NewRegistry(),
in: make(chan *Line, 32),
out: make(chan string, 32),
Err: make(chan os.Error, 4),