mirror of
https://github.com/fluffle/goirc
synced 2025-07-01 02:53:53 +00:00
Run gofmt over code, it's been a while.
This commit is contained in:
parent
18c20080e8
commit
c400a2141a
7 changed files with 53 additions and 54 deletions
|
@ -14,18 +14,18 @@ import "strings"
|
|||
func (conn *Conn) Raw(rawline string) { conn.out <- rawline }
|
||||
|
||||
// Pass() sends a PASS command to the server
|
||||
func (conn *Conn) Pass(password string) { conn.out <- "PASS "+password }
|
||||
func (conn *Conn) Pass(password string) { conn.out <- "PASS " + password }
|
||||
|
||||
// Nick() sends a NICK command to the server
|
||||
func (conn *Conn) Nick(nick string) { conn.out <- "NICK "+nick }
|
||||
func (conn *Conn) Nick(nick string) { conn.out <- "NICK " + nick }
|
||||
|
||||
// User() sends a USER command to the server
|
||||
func (conn *Conn) User(ident, name string) {
|
||||
conn.out <- "USER "+ident+" 12 * :"+name
|
||||
conn.out <- "USER " + ident + " 12 * :" + name
|
||||
}
|
||||
|
||||
// Join() sends a JOIN command to the server
|
||||
func (conn *Conn) Join(channel string) { conn.out <- "JOIN "+channel }
|
||||
func (conn *Conn) Join(channel string) { conn.out <- "JOIN " + channel }
|
||||
|
||||
// Part() sends a PART command to the server with an optional part message
|
||||
func (conn *Conn) Part(channel string, message ...string) {
|
||||
|
@ -33,7 +33,7 @@ func (conn *Conn) Part(channel string, message ...string) {
|
|||
if msg != "" {
|
||||
msg = " :" + msg
|
||||
}
|
||||
conn.out <- "PART "+channel+msg
|
||||
conn.out <- "PART " + channel + msg
|
||||
}
|
||||
|
||||
// Kick() sends a KICK command to remove a nick from a channel
|
||||
|
@ -42,7 +42,7 @@ func (conn *Conn) Kick(channel, nick string, message ...string) {
|
|||
if msg != "" {
|
||||
msg = " :" + msg
|
||||
}
|
||||
conn.out <- "KICK "+channel+" "+nick+msg
|
||||
conn.out <- "KICK " + channel + " " + nick + msg
|
||||
}
|
||||
|
||||
// Quit() sends a QUIT command to the server with an optional quit message
|
||||
|
@ -51,20 +51,20 @@ func (conn *Conn) Quit(message ...string) {
|
|||
if msg == "" {
|
||||
msg = "GoBye!"
|
||||
}
|
||||
conn.out <- "QUIT :"+msg
|
||||
conn.out <- "QUIT :" + msg
|
||||
}
|
||||
|
||||
// Whois() sends a WHOIS command to the server
|
||||
func (conn *Conn) Whois(nick string) { conn.out <- "WHOIS "+nick }
|
||||
func (conn *Conn) Whois(nick string) { conn.out <- "WHOIS " + nick }
|
||||
|
||||
//Who() sends a WHO command to the server
|
||||
func (conn *Conn) Who(nick string) { conn.out <- "WHO "+nick }
|
||||
func (conn *Conn) Who(nick string) { conn.out <- "WHO " + nick }
|
||||
|
||||
// Privmsg() sends a PRIVMSG to the target t
|
||||
func (conn *Conn) Privmsg(t, msg string) { conn.out <- "PRIVMSG "+t+" :"+msg }
|
||||
func (conn *Conn) Privmsg(t, msg string) { conn.out <- "PRIVMSG " + t + " :" + msg }
|
||||
|
||||
// Notice() sends a NOTICE to the target t
|
||||
func (conn *Conn) Notice(t, msg string) { conn.out <- "NOTICE "+t+" :"+msg }
|
||||
func (conn *Conn) Notice(t, msg string) { conn.out <- "NOTICE " + t + " :" + msg }
|
||||
|
||||
// Ctcp() sends a (generic) CTCP message to the target t
|
||||
// with an optional argument
|
||||
|
@ -100,7 +100,7 @@ func (conn *Conn) Topic(channel string, topic ...string) {
|
|||
if t != "" {
|
||||
t = " :" + t
|
||||
}
|
||||
conn.out <- "TOPIC "+channel+t
|
||||
conn.out <- "TOPIC " + channel + t
|
||||
}
|
||||
|
||||
// Mode() sends a MODE command to the server. This one can get complicated if
|
||||
|
@ -115,7 +115,7 @@ func (conn *Conn) Mode(t string, modestring ...string) {
|
|||
if mode != "" {
|
||||
mode = " " + mode
|
||||
}
|
||||
conn.out <- "MODE "+t+mode
|
||||
conn.out <- "MODE " + t + mode
|
||||
}
|
||||
|
||||
// Away() sends an AWAY command to the server
|
||||
|
@ -126,15 +126,15 @@ func (conn *Conn) Away(message ...string) {
|
|||
if msg != "" {
|
||||
msg = " :" + msg
|
||||
}
|
||||
conn.out <- "AWAY"+msg
|
||||
conn.out <- "AWAY" + msg
|
||||
}
|
||||
|
||||
// Invite() sends an INVITE command to the server
|
||||
func (conn *Conn) Invite(nick, channel string) {
|
||||
conn.out <- "INVITE "+nick+" "+channel
|
||||
conn.out <- "INVITE " + nick + " " + channel
|
||||
}
|
||||
|
||||
// Oper() sends an OPER command to the server
|
||||
func (conn *Conn) Oper(user, pass string) {
|
||||
conn.out <- "OPER "+user+" "+pass
|
||||
conn.out <- "OPER " + user + " " + pass
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue