Forward irc errors to the client, improve command validation and feedback, handle topic changes
This commit is contained in:
parent
993d29242e
commit
aa59e71745
17 changed files with 328 additions and 96 deletions
|
@ -106,8 +106,12 @@ func (c *Client) Part(channels ...string) {
|
|||
c.Write("PART " + strings.Join(channels, ","))
|
||||
}
|
||||
|
||||
func (c *Client) Topic(channel string) {
|
||||
c.Write("TOPIC " + channel)
|
||||
func (c *Client) Topic(channel string, topic ...string) {
|
||||
msg := "TOPIC " + channel
|
||||
if len(topic) > 0 {
|
||||
msg += " :" + topic[0]
|
||||
}
|
||||
c.Write(msg)
|
||||
}
|
||||
|
||||
func (c *Client) Invite(nick, channel string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue