summaryrefslogtreecommitdiff
path: root/commands.go (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-12-22np: Bump libnp & be more verbose with errorsdelthas1-7/+10
2022-12-21Implement /OPERdelthas1-0/+17
Fixes: https://todo.sr.ht/~taiite/senpai/105
2022-12-17Move /NP code to go-libnpdelthas1-67/+20
This enables /NP to work on Windows. See: https://github.com/delthas/go-libnp
2022-11-23Implement /NPdelthas1-0/+94
This queries the system for the current song being played. This uses DBus & MPRIS/xesam. The priority is any player in playing state > any player in paused state. Only players in the playing or paused state, with a valid song title are considered.
2022-11-22Implement /MOTDdelthas1-0/+14
2022-10-18Clear highlights from MARKREAD when only NotifyNone lines are leftdelthas1-15/+15
Previously, we did not clear buffers highlight statuses on MARKREAD if there was any unread line after it. This meant that if we received a plain message, than a join message, and some other device sent us a read marker for the plain message, we would still highlight the buffer. But we should not: a join message should not highlight the buffer. This is a recurrent use case because some clients do not display join mesasges and therefore do not send read markers for it. This updates the logic to actually store the notify level (in the line) and uses it to reset the highlight status when only NotifyNone messages (or no messages) are left.
2022-07-20Fix dropping words in /msg, /query, /partdelthas1-4/+1
Inspired by a patch from gildarts <gildarts@orbital.rocks>
2022-07-06Implement /whoisdelthas1-0/+27
2022-05-10/mode: enable getting the channel modes without parametersdelthas1-20/+18
2022-04-23Show error when searching if unsupportedGalen Abell1-0/+3
It's confusing to search for something and have no results show if the server doesn't support the soju.im/search capability.
2022-04-12Implement SEARCHdelthas1-0/+22
Also refactor ui/ to support overlays, temporary anonmyous buffers. See: https://github.com/emersion/soju/pull/39
2022-02-18Fix segfault on /mode xJeff Knapp1-1/+10
Return an error instead of segfaulting when handling /mode x where x is a string that starts without + - or #
2022-02-13/query: only send MONITOR, ... if the buffer is newdelthas1-4/+6
2022-02-11/query: support optionally sending a messagedelthas1-27/+36
2022-02-11Add support for the soju.im/read capability and READ commanddelthas1-0/+2
See: https://github.com/emersion/soju/blob/c7f0634ec8ee94425547b159bc36705582151012/doc/read.md
2022-02-10Rename ColorGrey to ColorGray for consistencyHugo Machet1-2/+2
2022-02-10MONITOR user with whom we have an open bufferdelthas1-0/+3
2021-12-07Implement /kick and /[un]ban commandsAlexey Yerin1-0/+76
2021-11-29Fetch history for queriesHubert Hirtz1-0/+1
2021-11-19Fix crash when lone slash is enteredPranjal Kole1-1/+1
See ticket #79 for more information
2021-11-16Add support for the /QUERY commanddelthas1-0/+20
This lets open a buffer to a user without sending a message.
2021-11-16Add support for user buffersdelthas1-5/+14
2021-10-31/mode: default channel to the current channeldelthas1-2/+7
2021-10-27Rework the /help commandHubert Hirtz1-37/+43
- Normalize usage display - Sort commands alphabetically
2021-10-27Show the full command name on user errorHubert Hirtz1-2/+2
2021-10-24Support for soju.im/bouncer-networksHubert Hirtz1-96/+108
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).
2021-10-23Don't panic when a command is sent when offlineHubert Hirtz1-22/+69
nit: also remove naked returns
2021-10-23Add an /invite commandHubert Hirtz1-0/+20
2021-09-13Remove needless allocationsHubert Hirtz1-2/+2
2021-09-13Remove buffer arg in commandsHubert Hirtz1-32/+34
2021-09-13More lintsHubert Hirtz1-2/+2
2021-09-11Fix typosHubert Hirtz1-1/+1
2021-07-15Make buffers indexed, and refer to indexes with /BUFFERdelthas1-0/+7
Fixes: #29
2021-07-14Print the channel topic on joindelthas1-14/+1
Fixes: #45
2021-07-14Add notify types for fine-grained control of unread/highlight statedelthas1-15/+15
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.
2021-05-26Also make dashes gray for command responsesHubert Hirtz1-6/+8
2021-05-26Pick nick colors in terminal color schemeHubert Hirtz1-17/+27
So that the colors go well with the terminal background.
2021-05-25commands: use rawArgs on non-commandAlexey Yerin1-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
2021-05-25commands: do not handle s == ""Alexey Yerin1-4/+0
handleInput already checks for this.
2021-05-25commands: use Home constant instead of "home"Alexey Yerin1-1/+1
2021-05-21Disallow sending messages to homeAlexey Yerin1-3/+10
This is not a channel and if one wants to send messages to user "home", they would do "/msg home ..." instead.
2021-05-20Handle consecutive spaces on arg splitHubert Hirtz1-1/+46
2021-05-20Explicitly support keys in JOIN messagesHubert Hirtz1-1/+5
2021-05-20Separate command handling from plain messagesHubert Hirtz1-23/+24
- So that lone slashes can be recognised - Also handle two slashes and pass them as one in plain input
2021-05-20Fix races conditionsHubert Hirtz1-5/+5
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/+17
2021-05-18Add /nickHubert Hirtz1-0/+17
2021-05-17commands: ignore empty inputAlexey Yerin1-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).
2021-04-27Make sure app.s is not nil when issuing quitAlexey Yerin1-1/+3
Prior to this, when the connection is lost, issuing /quit was causing a segfault.
2021-04-27Add BUFFER command to jump to the matching bufferAlexey Yerin1-0/+17
Is is very useful when you have joined a bunch of channels and scrolling with Ctrl+n/Ctrl+p is quite inefficient.