diff --git a/client/commands.go b/client/commands.go index 40febe1..1f471c9 100644 --- a/client/commands.go +++ b/client/commands.go @@ -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) } diff --git a/client/commands_test.go b/client/commands_test.go index 65d5948..4c47ee6 100644 --- a/client/commands_test.go +++ b/client/commands_test.go @@ -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") }