Remove extraneous (and quite spammy) debug printing.

This commit is contained in:
Alex Bramley 2009-12-18 23:59:12 +00:00
parent 05e665bec7
commit dc1dd0333a
2 changed files with 0 additions and 9 deletions

View File

@ -58,7 +58,6 @@ func New(nick, user, name string) *Conn {
func (conn *Conn) initialise() { func (conn *Conn) initialise() {
// allocate meh some memoraaaahh // allocate meh some memoraaaahh
fmt.Println("irc.initialise(): initialising...")
conn.nicks = make(map[string]*Nick) conn.nicks = make(map[string]*Nick)
conn.chans = make(map[string]*Channel) conn.chans = make(map[string]*Channel)
conn.in = make(chan *Line, 32) conn.in = make(chan *Line, 32)
@ -84,7 +83,6 @@ func (conn *Conn) Connect(host string, pass ...) os.Error {
} else if conn.sock, err = net.DialTCP("tcp", nil, addr); err != nil { } else if conn.sock, err = net.DialTCP("tcp", nil, addr); err != nil {
return err return err
} }
fmt.Println("irc.Connect(): connected happily...")
conn.Host = host conn.Host = host
conn.io = bufio.NewReadWriter( conn.io = bufio.NewReadWriter(
@ -101,7 +99,6 @@ func (conn *Conn) Connect(host string, pass ...) os.Error {
conn.User(conn.Me.Ident, conn.Me.Name) conn.User(conn.Me.Ident, conn.Me.Name)
go conn.runLoop() go conn.runLoop()
fmt.Println("irc.Connect(): launched runLoop() goroutine.")
return nil return nil
} }
@ -188,7 +185,6 @@ func (conn *Conn) runLoop() {
conn.dispatchEvent(line) conn.dispatchEvent(line)
} }
} }
fmt.Println("irc.runLoop(): Exited runloop...")
// if we fall off the end here due to shutdown, // if we fall off the end here due to shutdown,
// reinit everything once the runloop is done // reinit everything once the runloop is done
// so that Connect() can be called again. // so that Connect() can be called again.
@ -201,7 +197,6 @@ func (conn *Conn) shutdown() {
close(conn.Err) close(conn.Err)
conn.connected = false conn.connected = false
conn.sock.Close() conn.sock.Close()
fmt.Println("irc.shutdown(): shut down sockets and channels!")
} }
// Dumps a load of information about the current state of the connection to a // Dumps a load of information about the current state of the connection to a

View File

@ -120,7 +120,6 @@ func (ch *Channel) AddNick(n *Nick) {
// n.DelChannel(ch) to remove the association from the perspective of *irc.Nick. // n.DelChannel(ch) to remove the association from the perspective of *irc.Nick.
func (ch *Channel) DelNick(n *Nick) { func (ch *Channel) DelNick(n *Nick) {
if _, ok := ch.Nicks[n]; ok { if _, ok := ch.Nicks[n]; ok {
fmt.Printf("irc.Channel.DelNick(): deleting %s from %s\n", n.Nick, ch.Name)
if n == n.conn.Me { if n == n.conn.Me {
// we're leaving the channel, so remove all state we have about it // we're leaving the channel, so remove all state we have about it
ch.Delete() ch.Delete()
@ -136,7 +135,6 @@ func (ch *Channel) DelNick(n *Nick) {
// Stops the channel from being tracked by state tracking handlers. Also calls // Stops the channel from being tracked by state tracking handlers. Also calls
// n.DelChannel(ch) for all nicks that are associated with the channel. // n.DelChannel(ch) for all nicks that are associated with the channel.
func (ch *Channel) Delete() { func (ch *Channel) Delete() {
fmt.Printf("irc.Channel.Delete(): deleting %s\n", ch.Name)
for n, _ := range ch.Nicks { for n, _ := range ch.Nicks {
n.DelChannel(ch) n.DelChannel(ch)
} }
@ -170,7 +168,6 @@ func (n *Nick) AddChannel(ch *Channel) {
// ch.DelNick(n) to remove the association from the perspective of *irc.Channel. // ch.DelNick(n) to remove the association from the perspective of *irc.Channel.
func (n *Nick) DelChannel(ch *Channel) { func (n *Nick) DelChannel(ch *Channel) {
if _, ok := n.Channels[ch]; ok { if _, ok := n.Channels[ch]; ok {
fmt.Printf("irc.Nick.DelChannel(): deleting %s from %s\n", n.Nick, ch.Name)
n.Channels[ch] = nil, false n.Channels[ch] = nil, false
ch.DelNick(n) ch.DelNick(n)
if len(n.Channels) == 0 { if len(n.Channels) == 0 {
@ -193,7 +190,6 @@ func (n *Nick) ReNick(neu string) {
func (n *Nick) Delete() { func (n *Nick) Delete() {
// we don't ever want to remove *our* nick from conn.nicks... // we don't ever want to remove *our* nick from conn.nicks...
if n != n.conn.Me { if n != n.conn.Me {
fmt.Printf("irc.Nick.Delete(): deleting %s\n", n.Nick)
for ch, _ := range n.Channels { for ch, _ := range n.Channels {
ch.DelNick(n) ch.DelNick(n)
} }