mirror of https://github.com/fluffle/goirc
Add VHost() command, because I wants it.
This commit is contained in:
parent
fd5fddc2cc
commit
0b64613fe3
|
@ -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) }
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue