Commit Graph

81 Commits

Author SHA1 Message Date
18243520dc
Upstream: merge in some changes 2022-05-02 21:15:53 -07:00
5e68e20bbb
Add: codes + event.IsError() 2022-03-19 12:36:33 -07:00
f17812708d Multiclient: attach network name to events 2021-10-17 11:45:46 -07:00
c46e976ff3 Fix: blank source panic 2021-10-09 06:54:41 -07:00
b84d822ec5 Fix: go module and event bug 2021-10-09 06:25:17 -07:00
01ce96b07a Ever cook bacon on your CPU cooler? 2021-10-01 06:15:34 -07:00
Liam Stanley
771323f162 colon should only cause prefix if the param starts with a colon 2021-06-11 17:32:46 -04:00
Liam Stanley
4219526e1d mirror ContainsAny for Len() check as well 2021-06-11 17:16:42 -04:00
Sören Tempel
8929b1a531 event: Fix serialization of messages with colon but no space
For messages that contain either a colon **or** a space character, a
messagePrefix needs to be added to the serialized messages. Previously,
a message prefix was only added for messages containing a space
character. This causes messages which only contain a colon, but not a
space to be serialized incorrectly.

For example, prior to this commit a command like `PRIVMSG #foo ::)`,
which should send the message `:)` to the channel `#foo`, was
serialized as `PRIVMSG #foo :)` which only causes a `)` character to be
sent to the channel `#foo`.
2021-06-04 21:30:28 +02:00
nmeum
2cb73c3772
event: Fix PRIVMSG/NOTICE format string (#45)
Fixes a minor typo introduced in #44.
2020-12-30 05:53:53 -05:00
nmeum
288d953b28
event: Use different source format for PRIVMSG and NOTICE (#44)
This allows distinguishing the two commands in the output of the
Pretty() function. This is useful for IRC client which use the output of
the Pretty() function for formating IRC messages.
2020-12-29 19:19:53 -05:00
Liam Stanley
812b7950e0 better handling of tag+verb messages without a source; handle some invalid extraneous space events from servers like unreal; additional (basic) event tests 2019-07-31 23:44:43 -04:00
Liam Stanley
51b8e096d3
move away from Event.Trailing
* initial work towards moving away from Event.Trailing

* Event.Trailing() -> Event.Last()

* fix incorrect go.mod/go.sum files

* fixes for pretty printed topics and CTCPs

* remove unneeded whitespace check

* clarify potential contents of Event.Params

* better splitting of hopcount from realname
2019-02-10 16:20:25 -05:00
Liam Stanley
d173036cbc convert ID field to ID method 2018-12-09 16:23:41 -08:00
Liam Stanley
3167511d81 initial fixes for #23 2018-11-13 22:02:34 -08:00
nmeum
3a1cc735c7 Handle NOTICEs in isFromChannel and isFromUser (#21) 2018-11-02 12:24:37 -04:00
Liam Stanley
bbccf004ba add: expose CTCP encode/decode; add: Event.IsCTCP()
closes #20
2018-09-30 19:28:09 -04:00
Liam Stanley
b102affd93 Event.Pretty(): fill in reason even if none is given 2018-09-05 20:22:44 -04:00
Liam Stanley
a796f9b02f
event.go: fix spelling; ref #17 2018-09-04 08:58:25 -04:00
nmeum
12274e1704 Fix pretty printing of nick messages (#15) 2018-09-04 08:49:43 -04:00
nmeum
a5d4d6aada add: pretty print invite command (#13) 2018-08-17 07:58:17 -04:00
Liam Stanley
9e7aa2b446 pretty print ircv3 cap list 2018-02-04 15:06:40 -05:00
Liam Stanley
90b702a763 add Event.Timestamp field; add IRCv3 server-time support 2018-01-27 23:42:02 -05:00
Liam Stanley
a9c1bd980a clean up event docs 2018-01-27 21:55:13 -05:00
Liam Stanley
5c0e57078c add Event.Echo field 2018-01-27 21:48:44 -05:00
Liam Stanley
9c368fb527 add Event.Equals method and tests 2018-01-27 07:00:17 -05:00
Liam Stanley
776255db80 add Source.Equals() method 2018-01-27 07:00:05 -05:00
Liam Stanley
c2601da083 use rune literals for ease of reading 2017-11-30 10:23:52 -05:00
Liam Stanley
6e1bd23a28 move error checks to the front, as it's likely to not have a source 2017-08-17 05:02:18 -04:00
Liam Stanley
864c1e6bad add json struct tag formatting 2017-08-08 05:45:45 -04:00
Liam Stanley
35c5ed5946 minor refractor 2017-07-12 01:06:20 -04:00
Liam Stanley
51189b340a remove Event.GetChannel and Event.GetUser in favor of global lookup methods 2017-07-04 01:31:55 -04:00
Liam Stanley
1f66c9ffec rewrite state to support separate dataset for users 2017-07-04 01:29:22 -04:00
Liam Stanley
0034a58683 fix event parsing bug when lines contain trailing prefix without trailing space 2017-06-12 07:29:10 -04:00
Liam Stanley
e221d0fb62 add event channel and user helper methods 2017-06-09 19:11:25 -04:00
Liam Stanley
1810c882c2 remove unneeded truncation due to tags 2017-04-18 14:45:33 -04:00
Liam Stanley
9cb3f3c522 implement Source.Copy(), and rewrite Event.Copy() 2017-04-18 06:20:33 -04:00
Liam Stanley
ef290be026 don't print sensitive events, additional handling for sending to server 2017-02-14 01:25:13 -05:00
Liam Stanley
8924cd4a17 fix bug with Event.Copy() not deep copying event 2017-02-13 09:42:13 -05:00
Liam Stanley
27efadda57 implement commands 2017-02-13 07:52:29 -05:00
Liam Stanley
74d2c90cf3 prefixUser -> prefixMask 2017-02-13 04:47:20 -05:00
Liam Stanley
e397b04d3f merge Source/Event into a single file 2017-02-13 04:46:05 -05:00
Liam Stanley
c4aa30561d minor cleanup; add golint to travis-ci 2017-02-13 03:18:55 -05:00
Liam Stanley
63ae092b97 minor documentation cleanup 2017-02-13 03:11:50 -05:00
Liam Stanley
b266464f59 remove Sprintf call 2017-02-13 01:47:17 -05:00
Liam Stanley
297970e01d implement ctcp support to Event.Pretty() 2017-02-12 02:43:33 -05:00
Liam Stanley
b06fb6e930 lots of refactoring: remove data races, cleanup connection handling, goroutine leaks, rate limiting 2017-02-11 22:00:01 -05:00
Liam Stanley
ba1adc207e herpderp 2017-02-08 17:47:53 -05:00
Liam Stanley
7ba8001f27 look into supporting copy, without reflection 2017-02-08 17:42:46 -05:00
Liam Stanley
c164d69de5 add host to pretty join evvents 2017-02-08 02:14:14 -05:00