lrstanley / girc

:bomb: girc is a flexible IRC library for Go :ok_hand:
https://pkg.go.dev/github.com/lrstanley/girc
MIT License
139 stars 13 forks source link

Handle NOTICEs in isFromChannel and isFromUser #21

Closed nmeum closed 5 years ago

nmeum commented 6 years ago

I don't know what these methods were originally intended to do as it is not clear whether the word message in the function documentation refers to PRIVMSGs or IRC server messages in general.

I personally use these two methods to figure out if a IRC messages was sent from a user or channel and if so map it to the channel specified in event.Params[0]. For this use case it would be nice if NOTICEs would be treated the same way as they are automatically mapped to the correct channel/user as well then.

codecov-io commented 6 years ago

Codecov Report

Merging #21 into master will decrease coverage by 0.08%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
- Coverage   56.24%   56.16%   -0.09%     
==========================================
  Files          13       13              
  Lines        2329     2329              
==========================================
- Hits         1310     1308       -2     
- Misses        912      913       +1     
- Partials      107      108       +1
Impacted Files Coverage Δ
event.go 67.03% <100%> (ø) :arrow_up:
conn.go 58.84% <0%> (-0.83%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3ed14e1...8aed4ca. Read the comment docs.

nmeum commented 5 years ago

@lrstanley I don't want to bother you but just in case you missed this: Do you have any opinion on the changes purposed here?