about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1815 from H3rnand3zzz/feature/the-client-switcherMichael Vetter2023-04-091-12/+14
|\ | | | | Feature: Allow setting client identification name/version manually
| * Allow setting client identification name/version manuallyJohn Hernandez2023-04-091-12/+14
| | | | | | | | | | | | | | | | Add changes allowing user to switch client name and version. Useful for enhancing user privacy. Minor cleanup.
* | User proper ellipsis charMartin Dosch2023-04-091-15/+15
| | | | | | | | | | | | | | As stated in https://github.com/profanity-im/profanity/pull/1820#issuecomment-1498083383 profanity uses "..." (three dots) in a lot of places instead the proper ellipsis char "…".
* | add `/statusbar tabmode actlist`Steffen Jaeckel2023-04-081-0/+15
|/ | | | | | | | | | The existing way how active tabs are displayed didn't allow showing more than 10 tabs. This patch adds a mode where the statusbar shows a comma-separated list of tabs which were active since the last time viewed. This view is inspired by how `irssi` shows the active tabs, therefore it is also called `actlist`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Adapt to g_string_free glib 2.75.3 changeMichael Vetter2023-03-211-13/+2
| | | | | | | | | | | | glib 2.75.3 changes warning behaviour of `g_string_free()`. See: * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3219 * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3226 Use this opportunity to replace the use of GString with `g_strdup_printf()` where possible. Otherwise correctly take the return value of `g_string_free()` which is nicer anyways.
* Fix duplicate download IDs.IsaacM882023-03-091-5/+13
| | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1794 Explanation The problem is the download's identifier. Downloads are given an ID so they can be referenced later when their progress changes. Currently, the download's ID is the download's URL. When you download the same file twice, you have two downloads with the same ID. Download progress updates are shown on the first of both downloads with the same ID. Solution Change the download's ID from its URL to a random number. A random ID is generated when get_random_string() is called from cmd_funcs.c. Several other functions are updated to cope with the new ID format.
* fix more memory leaksSteffen Jaeckel2023-01-181-5/+7
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `now` option to `/reconnect` commandSteffen Jaeckel2023-01-181-6/+8
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* slightly improve `command_defs[]`Steffen Jaeckel2023-01-181-5/+4
| | | | | | | | | * make the struct `const` * use designated initializers * remove `CMD_NOxyz` macros * fix function-pointer correctness of `sub_func[]` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* minor changesSteffen Jaeckel2023-01-181-20/+12
| | | | | | | | | | | * fix typo * less code duplication * less `GString` usage * more `auto_gchar` usage * document connecting to servers supporting SASL ANONYMOUS * ignore valgrind output Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* add `/strophe` command to modify libstrophe-specific settingsSteffen Jaeckel2023-01-181-0/+35
| | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* Update copyright yearMichael Vetter2023-01-101-1/+1
|
* Add vCard supportMarouane L2022-10-181-0/+990
| | | | | | | | | | | | Only nicknames, photos, birthdays, addresses, telephone numbers, emails, JIDs, titles, roles, notes, and URLs are supported Due to the synopsis array not having enough space, `/vcard photo open-self` and `/vcard photo save-self` are not documented properly in the synopsis section of the `/vcard` command, but they are documented in the arguments section Fixed memory leak in vcard autocomplete (thanks to debXwoody)
* Spawn external programs asynchronouslyMarouane L2022-10-121-1/+1
| | | | | | | | Drawback is that we can't check the exitcode anymore. But we were unsure why/when we need this, see: https://github.com/profanity-im/profanity/pull/1760/files#r980868708 Fixes https://github.com/profanity-im/profanity/issues/1759
* fix: print when no plugins installedViachaslau Khalikin2022-09-201-12/+15
| | | | Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
* fix: filtering of the available global pluginsViachaslau Khalikin2022-09-201-2/+4
| | | | | | | For command /plugins : Don't print files that do not correspond to the plugins design Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
* minor: using cons_bad_cmd_usage() instead of the manual handlingViachaslau Khalikin2022-09-191-3/+3
| | | | Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
* Print unloaded plugins which already installedViachaslau Khalikin2022-09-191-2/+13
| | | | Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
* Fix handle cmd_plugins_uninstall without argsViachaslau Khalikin2022-09-191-1/+2
| | | | Signed-off-by: Viachaslau Khalikin <viachaslau.vinegret@outlook.com>
* Fix /autoaway command logicNetboy32022-07-281-4/+2
| | | | | | | | | | | | Two issues were fixed in the parser logic: * A call to cons_bad_cmd_usage() was placed at the end of the "time" parser section that blocked reachability to both "message" and "check" parser sections. This caused "/autoaway message ..." and "/autoaway check ..." to always fail with "Invalid usage". This issue was introduced in commit 3c1e4ba. * "/autoaway message xa" with no message argument returns message set to (null). This should be fixed the same way as "/autoaway message away" was fixed in commit 3c1e4ba.
* Split ox functions from gpg.c to ox.cMichael Vetter2022-06-291-0/+1
|
* Let user change log level while runningMichael Vetter2022-06-221-2/+12
| | | | | | | | | | | `/log level INFO|DEBUG|WARN|ERROR` is now available. Looks like this solves a TODO (see removed comment in source) from 2013 :-) Works only with default log file. Not with user provided log file during start up via the -f parameter. Fix https://github.com/profanity-im/profanity/issues/1627
* Display mood preferencesMichael Vetter2022-06-221-1/+1
|
* Make mood display optionalMichael Vetter2022-06-221-1/+9
|
* Don't forget encryption status for OX and PGP.MarcoPolo-PasTonMolo2022-06-171-0/+4
| | | | | | | | Use a pgp.enabled and ox.enabled array the same way that omemo.enabled is used. Fixes https://github.com/profanity-im/profanity/issues/1694 Fixes https://github.com/profanity-im/profanity/issues/733
* Use our omemo sid/fingerprint in qr codeMichael Vetter2022-05-311-2/+4
| | | | | | | Current clients sid/fingerprint will be shown in following format: `xmpp:<user@server>?omemo-sid-<numerical-sid>=<omemo-fingerprint-hex-string>` Fix https://github.com/profanity-im/profanity/issues/1320
* Reverse QR code colors and add paddingswirl2022-05-301-1/+0
| | | | | | | All QR scanners should be able to recognize this, as it is now the correct color with some padding to prevent blending. Signed-off-by: swirl <swurl@swurl.xyz>
* implement working OMEMO QR codeswirl2022-05-301-1/+13
| | | | | | | | TODO: We need to find a way to switch the colors of the QR code, so that more QR readers can detect it, without "blending" the edges of the QR code with the surrounding terminal window. Signed-off-by: swirl <swurl@swurl.xyz>
* Add basic qrcode functionsMichael Vetter2022-05-301-0/+12
|
* Final touches for `/avatar set`Michael Vetter2022-05-271-1/+1
|
* Add checks for whether gdk-pixbuf exists before using avatar setMarcoPolo-PasTonMolo2022-05-261-0/+4
|
* Add `/avatar set` command to publish avatarMarcoPolo-PasTonMolo2022-05-261-1/+5
| | | | | | | | Use `/avatar set <path>` where <path> is an image file to upload a new avatar for the current user. When the avatar is too big it gets scaled down. Scaling code copied from dino. Fixes https://github.com/profanity-im/profanity/issues/1687
* Update copyright yearMichael Vetter2022-05-091-1/+1
|
* ox: show ox preferencesMichael Vetter2022-05-051-0/+4
|
* ox: Add /ox log commandMichael Vetter2022-05-051-0/+25
|
* ox: print message when `/ox end` is run but not startedMichael Vetter2022-05-041-4/+8
|
* ox: implement `/ox end`Michael Vetter2022-05-031-0/+12
| | | | We also need to be able to stop an ox conversation :-)
* Merge branch 'master' into add_stamp_settingsMichael Vetter2022-04-281-61/+88
|\
| * Merge pull request #1697 from cockroach/feature/offline-muc-notificationsMichael Vetter2022-04-281-0/+10
| |\ | | | | | | Add support for offline MUC notifications
| | * Add support for offline MUC notificationsStefan Ott2022-04-231-0/+10
| | |
| * | ox: print bad usage instead of custom messageMichael Vetter2022-04-271-1/+1
| | |
| * | Remove commentMichael Vetter2022-04-271-5/+0
| |/
| * Allow /editor while not connectedPaul Fertser2022-04-121-7/+0
| | | | | | | | | | Since /editor can be used also for commands it doesn't make sense to restrict it to only connected state.
| * less duplicationSteffen Jaeckel2022-03-311-36/+56
| | | | | | | | | | | | | | | | Print error message from `_string_matches_one_of()` instead of forming an error message manually that contains the same entries that were checked in `_string_matches_one_of()`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * use `_string_matches_one_of()` at more placesSteffen Jaeckel2022-03-311-16/+7
| | | | | | | | | | | | I missed them the last time ... Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * add `_string_matches_one_of()` helper functionSteffen Jaeckel2022-03-301-21/+39
| | | | | | | | | | | | ... instead of copying the same pattern over and over again. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | use more standard replies when setting stampMichael Vetter2022-04-281-3/+3
| |
* | Rename stamp preference variableMichael Vetter2022-04-281-6/+6
| | | | | | | | | | PREF_INCOMING_STR -> PREF_INCOMING_STAMP PREF_OUTGOING_STR -> PREF_OUTGOING_STAMP
* | add /stamp commandArtjom Vejsel2022-04-021-0/+51
|/ | | | command allow override standard stamps of incoming and outgoing messages
* Add none option for /whoMarcoPolo-PasTonMolo2022-03-271-1/+5
| | | | | Fixes https://github.com/profanity-im/profanity/issues/1425 `/who none` now displays all users in an muc without an affiliation