Merge pull request #48 from veonik/master

Added Connected method
This commit is contained in:
Thomas Jager 2014-11-02 20:53:40 +01:00
commit 9c4d007b9f

5
irc.go
View File

@ -294,6 +294,11 @@ func (irc *Connection) ErrorChan() chan error {
return irc.Error
}
// Returns true if the connection is connected to an IRC server.
func (irc *Connection) Connected() bool {
return !irc.stopped
}
// A disconnect sends all buffered messages (if possible),
// stops all goroutines and then closes the socket.
func (irc *Connection) Disconnect() {