Add VHost() command, because I wants it.

This commit is contained in:
Alex Bramley 2013-03-15 17:40:28 +00:00
parent fd5fddc2cc
commit 0b64613fe3
2 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,7 @@ const (
TOPIC = "TOPIC"
USER = "USER"
VERSION = "VERSION"
VHOST = "VHOST"
WHO = "WHO"
WHOIS = "WHOIS"
)
@ -168,6 +169,9 @@ func (conn *Conn) Invite(nick, channel string) {
// Oper() sends an OPER command to the server
func (conn *Conn) Oper(user, pass string) { conn.Raw(OPER + " " + user + " " + pass) }
// VHost() sends a VHOST command to the server
func (conn *Conn) VHost(user, pass string) { conn.Raw(VHOST + " " + user + " " + pass) }
// Ping() sends a PING command to the server
// A PONG response is to be expected afterwards
func (conn *Conn) Ping(message string) { conn.Raw(PING + " :" + message) }

View File

@ -94,4 +94,7 @@ func TestClientCommands(t *testing.T) {
c.Oper("user", "pass")
s.nc.Expect("OPER user pass")
c.VHost("user", "pass")
s.nc.Expect("VHOST user pass")
}