summaryrefslogtreecommitdiff
path: root/commands.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* np: Bump libnp & be more verbose with errorsdelthas2022-12-221-7/+10
|
* Implement /OPERdelthas2022-12-211-0/+17
| | | | Fixes: https://todo.sr.ht/~taiite/senpai/105
* Move /NP code to go-libnpdelthas2022-12-171-67/+20
| | | | | | This enables /NP to work on Windows. See: https://github.com/delthas/go-libnp
* Implement /NPdelthas2022-11-231-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.
* Implement /MOTDdelthas2022-11-221-0/+14
|
* Clear highlights from MARKREAD when only NotifyNone lines are leftdelthas2022-10-181-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.
* Fix dropping words in /msg, /query, /partdelthas2022-07-201-4/+1
| | | | Inspired by a patch from gildarts <gildarts@orbital.rocks>
* Implement /whoisdelthas2022-07-061-0/+27
|
* /mode: enable getting the channel modes without parametersdelthas2022-05-101-20/+18
|
* Show error when searching if unsupportedGalen Abell2022-04-231-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.
* Implement SEARCHdelthas2022-04-121-0/+22
| | | | | | Also refactor ui/ to support overlays, temporary anonmyous buffers. See: https://github.com/emersion/soju/pull/39
* Fix segfault on /mode xJeff Knapp2022-02-181-1/+10
| | | | | Return an error instead of segfaulting when handling /mode x where x is a string that starts without + - or #
* /query: only send MONITOR, ... if the buffer is newdelthas2022-02-131-4/+6
|
* /query: support optionally sending a messagedelthas2022-02-111-27/+36
|
* Add support for the soju.im/read capability and READ commanddelthas2022-02-111-0/+2
| | | | See: https://github.com/emersion/soju/blob/c7f0634ec8ee94425547b159bc36705582151012/doc/read.md
* Rename ColorGrey to ColorGray for consistencyHugo Machet2022-02-101-2/+2
|
* MONITOR user with whom we have an open bufferdelthas2022-02-101-0/+3
|
* Implement /kick and /[un]ban commandsAlexey Yerin2021-12-071-0/+76
|
* Fetch history for queriesHubert Hirtz2021-11-291-0/+1
|
* Fix crash when lone slash is enteredPranjal Kole2021-11-191-1/+1
| | | | See ticket #79 for more information
* Add support for the /QUERY commanddelthas2021-11-161-0/+20
| | | | This lets open a buffer to a user without sending a message.
* Add support for user buffersdelthas2021-11-161-5/+14
|
* /mode: default channel to the current channeldelthas2021-10-311-2/+7
|
* Rework the /help commandHubert Hirtz2021-10-271-37/+43
| | | | | - Normalize usage display - Sort commands alphabetically
* Show the full command name on user errorHubert Hirtz2021-10-271-2/+2
|
* Support for soju.im/bouncer-networksHubert Hirtz2021-10-241-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).
* Don't panic when a command is sent when offlineHubert Hirtz2021-10-231-22/+69
| | | | nit: also remove naked returns
* Add an /invite commandHubert Hirtz2021-10-231-0/+20
|
* Remove needless allocationsHubert Hirtz2021-09-131-2/+2
|
* Remove buffer arg in commandsHubert Hirtz2021-09-131-32/+34
|
* More lintsHubert Hirtz2021-09-131-2/+2
|
* Fix typosHubert Hirtz2021-09-111-1/+1
|
* Make buffers indexed, and refer to indexes with /BUFFERdelthas2021-07-151-0/+7
| | | | Fixes: #29
* Print the channel topic on joindelthas2021-07-141-14/+1
| | | | Fixes: #45
* Add notify types for fine-grained control of unread/highlight statedelthas2021-07-141-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.
* Also make dashes gray for command responsesHubert Hirtz2021-05-261-6/+8
|
* Pick nick colors in terminal color schemeHubert Hirtz2021-05-261-17/+27
| | | | So that the colors go well with the terminal background.
* 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.
* 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.
* Handle consecutive spaces on arg splitHubert Hirtz2021-05-201-1/+46
|
* Explicitly support keys in JOIN messagesHubert Hirtz2021-05-201-1/+5
|
* 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-201-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.
* Add /mode commandAlexey Yerin2021-05-181-0/+17
|
* Add /nickHubert Hirtz2021-05-181-0/+17
|
* 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).
* 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.
* Add BUFFER command to jump to the matching bufferAlexey Yerin2021-04-271-0/+17
| | | | | Is is very useful when you have joined a bunch of channels and scrolling with Ctrl+n/Ctrl+p is quite inefficient.