From 0b64613fe363375d9b93b3b06bb0f868b154cdb7 Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Fri, 15 Mar 2013 17:40:28 +0000 Subject: [PATCH] Add VHost() command, because I wants it. --- client/commands.go | 4 ++++ client/commands_test.go | 3 +++ 2 files changed, 7 insertions(+) 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") }