1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00
Commit Graph

83 Commits

Author SHA1 Message Date
Steffen Jaeckel
848acdd1fa Improve const correctness
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2024-06-19 16:01:46 +02:00
Steffen Jaeckel
835ea397ac Tidy up some code
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 18:26:21 +01:00
Steffen Jaeckel
31c6d5f09a Improve shutdown
1. close logfile as last action
2. Fix `plugins_shutdown()` accessing `((ProfPlugin*)curr->data)->lang`
   after `curr->data` had already potentially been free'd.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2023-12-12 16:31:42 +01:00
John Hernandez
16ed7cc187 Refactor plugins_pre_chat_message_display for Memory Management
Refactor function to enhance memory handling, addressing
temporary workaround introduced in 2e0adbd. Adjustments
ensure cleaner code and maintainability.

Part of the improvements suggested by @sjaeckel.
2023-11-11 22:21:04 +01:00
Michael Vetter
2ab9a306ab Fix /plugins reload error message
`/plugins reload non-existent-plugin` printed:
```
Failed to reload plugin: non-existent-plugin, `:^C
```

There were two mistakes:
error_message instead of error_message->str was passed to cons_show().

And in case of failing to unload the plugin due to not finding it in the
hash table it didn't print an error.

This bug was introduced in cc697de05.
2023-10-19 12:58:19 +02:00
John Hernandez
865a056315 Cleanup g_strfreev() to auto_gcharv
Include some additional minor cleanups
2023-07-13 17:05:07 +02:00
John Hernandez
029f1caa52 Cleanup jid_destroy to auto_jid
Remove unused variables
Apply minor cleanups
2023-07-13 17:05:07 +02:00
John Hernandez
e1d137f4e6 Change char->free to auto_char char for autocleanup
Replace `gchar` and `g_free` to `auto_gchar`
Correct certain  `char` functions/variables to `gchar`

Related to #1819.

Edited by @jubalh.
2023-07-11 13:26:37 +02:00
Michael Vetter
35aecd425f Declare counter var inside loop
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01:00
Michael Vetter
a2726b6a7d Apply coding style 2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa Revert "Apply coding style"
This reverts commit 9b55f2dec0.

Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0 Apply coding style
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
46fd7150e5 Add vim modeline 2019-11-13 12:11:05 +01:00
Michael Vetter
cc697de051 Improve plugin load/install failure message
In case Python or C plugins are disabled install/load failed silently.
Notify the user that we can't load them because profanity was built
without support for plugins.
2019-06-07 11:30:46 +02:00
Michael Vetter
c8f55ed338
Merge pull request #994 from philipflohr/master
Fail plugin unloading if plugin does not exist
2019-02-20 10:31:34 +01:00
Michael Vetter
fbbf920e2a
Merge pull request #995 from philipflohr/plugins_unload_all
let plugins_unload_all fail if one plugin unload operation fails
2019-02-20 10:22:49 +01:00
Philip Flohr
d1c54e9aaa Fail plugin unload operation if plugin does not exist 2019-02-20 10:21:17 +01:00
Michael Vetter
706af9a900 Update copyright to include 2019 2019-01-22 11:31:45 +01:00
Philip Flohr
054267d738 Fix extended plugin handling PR
Fixes problems found in PR #999
2018-09-06 19:54:29 +03:00
Philip Flohr
cd86f5bc28 added the possibility to uninstall a plugin 2018-09-06 19:28:02 +03:00
Philip Flohr
e4ddced420 use gio functions for file copy 2018-09-06 19:28:02 +03:00
Philip Flohr
2795dc487c removed unreachable code: if plugin is loaded it is also installed and therefore installation will fail. -> The unload code is not needed 2018-09-06 19:28:02 +03:00
Philip Flohr
1f66c08567 provide feedback on failure cause if plugin installation fails 2018-09-06 19:28:02 +03:00
Philip Flohr
adb4955c34 Fail plugin installation if the target file already exists 2018-09-06 19:28:02 +03:00
Philip Flohr
7861c8c03c plugins_unload_all fails if one plugin unload operation fails 2018-04-21 16:47:58 +02:00
James Booth
250e972b7a Update copyright 2018-01-21 15:00:02 +00:00
James Booth
6b830277a6 Allow previous autocompletion with shift tab 2017-04-01 00:27:11 +01:00
James Booth
286fecf38d Allow installing plugins from directory 2017-02-05 21:09:03 +00:00
James Booth
dd42c3de6a Allow loading all plugins 2017-02-05 19:16:14 +00:00
James Booth
a9fab9ed2d Allow unloading all plugins 2017-02-05 18:54:33 +00:00
James Booth
68a3daedb9 Update Copyright 2017-01-28 17:24:22 +00:00
James Booth
83385cdbc0 Add pre chat and room message blocking 2017-01-22 18:09:04 +00:00
James Booth
2b7894ccff Remove status from cl_ev_presence_send
fixes #888
2017-01-15 23:59:31 +00:00
James Booth
a48df40138 Fix assertion errors in unit tests 2016-09-25 23:30:44 +01:00
James Booth
a65403c54a Remove disco features added by plugins on unload 2016-08-11 23:20:59 +01:00
James Booth
5d6b2d0b04 Add resource to chat message plugin hooks 2016-08-10 21:37:22 +01:00
James Booth
a948d741d9 Rename plugin jid arguments 2016-08-10 20:45:14 +01:00
James Booth
a3a73cf003 Move all filepath handling to files.c 2016-07-24 21:49:35 +01:00
James Booth
29452f8f1b Move xgd functions 2016-07-24 17:12:09 +01:00
James Booth
ef942bd27a Add config/files.c 2016-07-24 16:22:15 +01:00
James Booth
0a57c4de78 Tidy headers 2016-07-24 15:43:51 +01:00
James Booth
e8fc80f5c1 Update GPL link in headers 2016-07-24 01:14:49 +01:00
James Booth
9af921f260 Remove redundant plugin dir function 2016-07-13 00:49:53 +01:00
James Booth
0991699ae6 Add /plugins install command 2016-07-12 23:50:21 +01:00
James Booth
5f393a6d9f Remove plugin window on /close 2016-07-12 02:16:12 +01:00
James Booth
9a0111c10a Allow reloading all plugins with /plugin reload 2016-07-10 01:28:30 +01:00
James Booth
448bef247b Add /plugin reload command 2016-07-10 01:07:41 +01:00
James Booth
1926ceea3d Plugin unload remove cmd_acs and close window 2016-07-05 22:46:00 +01:00
James Booth
99598e7d57 Add plugins on_unload hook 2016-07-05 22:03:14 +01:00
James Booth
03c7ac73fd Move prefs_remove_plugin to plugins_unload 2016-07-04 23:00:41 +01:00