Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add option to hide the "playback" message #13

Merged
merged 7 commits into from
Jul 31, 2019
Merged

Conversation

Valinwolf
Copy link
Contributor

PR that implements #12

@kgraefe
Copy link
Owner

kgraefe commented Jul 30, 2019

Thanks for your contribution. I think that should be a plugin preference rather than a account preference, though (see e.g. the offlinemsg plugin).

src/znchelper.c Outdated
@@ -98,6 +98,7 @@ static void znc_write_chat(
PurpleConversation *conv, const char *who, const char *message,
PurpleMessageFlags flags, time_t mtime
) {
PurpleConnection *gc = purple_conversation_get_gc(conv);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please don't mix up declarations and code and make sure to check the return values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix that right now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit added to fix this

@Valinwolf
Copy link
Contributor Author

Thanks for your contribution. I think that should be a plugin preference rather than a account preference, though (see e.g. the offlinemsg plugin).

I actually agree with you, but I was only using the code I had (this plugin) to formulate the code. I'm not very well versed in C. I can do Java, Python, PHP, and more all day, but C and friends are not a strong suit for me. I'll look into fixing that.

@Valinwolf
Copy link
Contributor Author

All discussed changes have been made. Commits are ready for re-review.

src/znchelper.c Outdated
@@ -37,6 +37,8 @@ static gboolean core_quitting = FALSE;
#define ZNC_CONV_STATE_START 0
#define ZNC_CONV_STATE_REPLAY 1
#define ZNC_CONV_STATE_DONE 2
#define PREF_PREFIX "/plugins/core/znc-helper"
#define PREF_HIDEMSG PREF_PREFIX "/hidemsg"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Tab should be a space.

src/znchelper.c Outdated
@@ -102,7 +104,7 @@ static void znc_write_chat(
struct znc_conn *znc;
GList *parted, *l;
gint state;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove whitespace

src/znchelper.c Outdated
@@ -463,6 +469,7 @@ static gboolean plugin_load(PurplePlugin *plugin) {
_("Uses ZNC bouncer"), "uses_znc_bouncer", FALSE
);
irc_info->protocol_options = g_list_append(irc_info->protocol_options, option);

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove newline

src/znchelper.c Outdated
PurplePluginPref *pref;

frame = purple_plugin_pref_frame_new();

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove tab

@kgraefe
Copy link
Owner

kgraefe commented Jul 31, 2019

LGTM apart from a few whitespace issues.

@kgraefe kgraefe merged commit a56ff23 into kgraefe:master Jul 31, 2019
@kgraefe
Copy link
Owner

kgraefe commented Jul 31, 2019

Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants