diff options
author | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-24 22:25:54 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtzfr.eu> | 2020-08-24 22:25:54 +0200 |
commit | 7814ff17e30f85c1f16b90eb66bf5c2a0e850bca (patch) | |
tree | 8f7e6a46510e7e69ba6b076b519b90ae8fe90cca /irc/states.go | |
parent | Drop username and hostname from TopicWho (diff) |
Allow /part with a reason
Diffstat (limited to 'irc/states.go')
-rw-r--r-- | irc/states.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/irc/states.go b/irc/states.go index 4dd0751..2628a9e 100644 --- a/irc/states.go +++ b/irc/states.go @@ -80,6 +80,7 @@ type ( } actionPart struct { Channel string + Reason string } actionSetTopic struct { Channel string @@ -289,12 +290,12 @@ func (s *Session) join(act actionJoin) (err error) { return } -func (s *Session) Part(channel string) { - s.acts <- actionPart{channel} +func (s *Session) Part(channel, reason string) { + s.acts <- actionPart{channel, reason} } func (s *Session) part(act actionPart) (err error) { - err = s.send("PART %s\r\n", act.Channel) + err = s.send("PART %s :%s\r\n", act.Channel, act.Reason) return } |