summaryrefslogtreecommitdiff
path: root/irc/states.go (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-05-20Fix races conditionsHubert Hirtz1-1197/+0
Refactor: - Split out reads/writes from irc.Session to irc.ChanInOut, - Message handling is now manual, messages must be passed to irc.Session.HandleMessage for its state to change, - Remove data-race-prone App.addLineNow (called from both the main eventLoop and irc loops) and add App.addStatusLine (to be called from the main event loop) and App.queueStatusLine (to be called from other goroutines). These two functions now write to both the current buffer and the home buffer, - add a irc.Typings.List function that locks the list of typings before accessing it. Changes as I went through the whole code... - CAP handling is fixed (especially CAP DEL and CAP ACK), - irc.Session now handles PREFIX, - unhandled messages are now shown, except for some rare cases where it's completely useless to show them.
2021-05-18Add /mode commandAlexey Yerin1-0/+21
2021-05-18Add /nickHubert Hirtz1-0/+15
2021-04-27Fix duplicate lines when scrolling upHubert Hirtz1-0/+9
2021-04-27Split long messages before sending themHubert Hirtz1-1/+44
avoids silent truncations. Also consider the LINELEN ISUPPORT token: - https://defs.ircdocs.horse/defs/isupport.html - http://rabbit.dereferenced.org/~nenolod/ircv3-harmony/id-wpitcock-ircv3-core.html#rfc.section.3.8.2.1.17
2021-04-27Split the "feature" map into specific attributesHubert Hirtz1-16/+23
2021-04-26Don't show own typing notificationsHubert Hirtz1-1/+1
2021-03-04Better connection managementHubert Hirtz1-8/+12
- Send keepalives - Reconnect when the connection is lost - Set timeout for write operations
2021-02-18Add the QUIT commandHubert Hirtz1-0/+14
2021-01-06Chathistory: don't send invalid timestampsHubert Hirtz1-2/+2
2020-11-30Move configuration defaults to config.goHubert Hirtz1-10/+0
2020-11-23Don't forward outdated typing timeoutsHubert Hirtz1-2/+10
The channel might have been parted, or the user might have parted from the channel before receiving the timeout from Typings, thus causing a segfault.
2020-11-23Cleanly stop all coroutines on irc.Session.StopHubert Hirtz1-3/+13
This fixes a panic when irc.Session.handle is called with an empty message.
2020-11-21Document the IRC libraryHubert Hirtz1-21/+51
2020-11-20Only send the SelfJoinEvent when channel info is completeHubert Hirtz1-1/+9
2020-11-19Consider the CASEMAPPING isupport tokenHubert Hirtz1-2/+5
Using RFC1459 as a default since servers not advertising this token are likely to be pre-IRCv2, thus following the casemapping described in the RFCs.
2020-11-19Consider the CHANTYPES isupport tokenHubert Hirtz1-1/+5
2020-11-19Basic display of errorsHubert Hirtz1-3/+24
2020-11-19Add completion for /msgHubert Hirtz1-0/+8
2020-11-06Default user/real to nickname if unspecifiedSimon Ser1-0/+10
While at it, error out if nick is unspecified instead of sending a broken command to the server.
2020-10-27irc: Fix requestHistory by making it use UTCSamuel Hernandez1-1/+1
2020-10-26Vertical channel listHubert Hirtz1-0/+2
2020-10-19Handle KICK messagesHubert Hirtz1-1/+26
2020-10-19Show topic changesHubert Hirtz1-0/+6
Closes #34
2020-09-02Typing indicator timeoutHubert Hirtz1-5/+29
2020-09-01irc: Reset typing ratelimiter after sent messageHubert Hirtz1-0/+2
2020-08-26General refactor yayHubert Hirtz1-101/+106
- Centralize message formatting - Make line formatting more flexible - Provide more information in irc events - Refactor command handling - Add a /help command - Make /me reply to last query if from home - Enforce argument for /me - Make BufferList and Editor public - Batch processing of IRC events
2020-08-24Allow /part with a reasonHubert Hirtz1-3/+4
2020-08-24Drop username and hostname from TopicWhoHubert Hirtz1-1/+1
2020-08-24Improve query displayHubert Hirtz1-0/+1
- Print outgoing messages as "-> target" instead of self nick - Don't highlight messages
2020-08-24Fix multiple SelfJoinEvent being sentHubert Hirtz1-5/+1
... every time NAMES were requested. SelfJoinEvent should be ok being in the "JOIN" handler, since names are only useful for the user.
2020-08-22Fix /topic only accepting one wordHubert Hirtz1-1/+1
2020-08-22Fix same messages being fetched with CHATHISTORYHubert Hirtz1-1/+1
The issue was that Message.Time() converted the timestamp to Local time, and this local timestamp was being used with UTC timestamps. Thus senpai now converts the time only during display. Moreover, to avoid missing messages in history (and at the cost of duplicates), the condition in bufferList.AddLines() as been modified.
2020-08-20irc: Don't panic on a NICK from an unknown userHubert Hirtz1-4/+5
2020-08-19ui: Show unhandled messages in debug modeHubert Hirtz1-4/+6
2020-08-19ui: Show the nick when senpai registers with a different oneHubert Hirtz1-4/+1
2020-08-19ui: Don't panic when the connection failsHubert Hirtz1-5/+5
2020-08-19Properly close everything in case of errorHubert Hirtz1-0/+6
2020-08-18irc: Update TopicWho and TopicTime on TOPICHubert Hirtz1-29/+9
2020-08-17irc: Send NAMES when multi-prefix is negociatedHubert Hirtz1-12/+21
2020-08-17Add /names commandHubert Hirtz1-41/+76
2020-08-17irc: Handle CAP NEW/DEL/NAK before registrationHubert Hirtz1-0/+2
2020-08-17irc: Also update casefolded nickname on ERR_ERRONEOUSNICKNAMEHubert Hirtz1-0/+1
2020-08-16irc: Use a bool instead of an error for validationHubert Hirtz1-7/+1
2020-08-16Handle RPL_TOPICWHOTIMEHubert Hirtz1-4/+14
2020-08-16Add a /topic commandHubert Hirtz1-1/+41
2020-08-16irc: Delete ConnectionState and use a bool insteadHubert Hirtz1-14/+6
2020-08-16irc: Use better names for casefolded variablesHubert Hirtz1-57/+58
2020-08-16irc: Use typing constantsHubert Hirtz1-4/+11
2020-08-16irc: Simplify debug logging of incoming messagesHubert Hirtz1-13/+4