profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/jubalh/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

jubalh/awesome-os 645

A list of operating systems and stuff

jasper-software/jasper 148

Official Repository for the JasPer Image Coding Toolkit

jubalh/awesome-plymouth 3

List about graphical boot on Linux with Plymouth

AdamMajer/nodejs-packaging 2

OpenSUSE NodeJS packaging templale

jubalh/admin_scripts 1

administration help scripts

jubalh/blog 1

a blog. with the fancy stuff.

jubalh/aaa_base 0

Files for the openSUSE package aaa_base

jubalh/alttab 0

The task switcher for minimalistic window managers or standalone X11 session

jubalh/amore 0

A game library for Go, inspired by Love 2D

jubalh/aparte 0

Simple XMPP console client written in Rust and inspired by Profanity.

issue commentshadow-maint/shadow

shadow 4.9 build error when disabled `shared`

@hallyn you can see it here: https://build.opensuse.org/request/show/912915 This was the request where I changed it to remove the --disable-shared.

jubalh

comment created time in a day

Pull request review commentprofanity-im/profanity

Add /correct-editor command

 cmd_change_password(ProfWin* window, const char* const command, gchar** args)     return TRUE; } +// Returns true if any error occured

I'm no English native but I think it should be "Returns true if no error occured"

MarcoPolo-PasTonMolo

comment created time in 2 days

Pull request review commentprofanity-im/profanity

Add /correct-editor command

 _correct_autocomplete(ProfWin* window, const char* const input, gboolean previou         return NULL;     } -    GString* result_str = g_string_new("/correct ");+    // Get command+    int len = strlen(input);

I think this couldn't work. In case the person is writing in some other language the command will still be in ascii, that's true, but the message could contain different characters. I think one needs to use g_utf8_strlen() here?

MarcoPolo-PasTonMolo

comment created time in 2 days

Pull request review commentprofanity-im/profanity

Add /correct-editor command

 _correct_autocomplete(ProfWin* window, const char* const input, gboolean previou         return NULL;     } -    GString* result_str = g_string_new("/correct ");+    // Get command+    int len = strlen(input);+    char command[len + 2];+    int i = 0;+    while (i < len) {

I think there is no need to iterate over the array yourself. Was there a reason you didn't use strchr()? In our case I think you need to use something like g_utf8_strchr() see https://docs.gtk.org/glib/func.utf8_strchr.html

MarcoPolo-PasTonMolo

comment created time in 2 days

Pull request review commentprofanity-im/profanity

Add /correct-editor command

 static struct cmd_t command_defs[] = {       CMD_NOEXAMPLES     }, +    { "/correct-editor",+      parse_args_as_one, 1, 1, NULL,

I'm thinking if it would maybe make sense to be able to just type /correct-editor without an argument and then it automatically adds the last message in the message buffer? But I think it's not important and if it's too much trouble or unclean code, then let's leave it for now :)

MarcoPolo-PasTonMolo

comment created time in 2 days

Pull request review commentprofanity-im/profanity

Add /correct-editor command

 _correct_autocomplete(ProfWin* window, const char* const input, gboolean previou         return NULL;     } -    GString* result_str = g_string_new("/correct ");+    // Get command

Please explain here why we need this, so we know later one. Something like: Get command. This function is used by /correct and /correct-editor or something like that.

MarcoPolo-PasTonMolo

comment created time in 2 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 cmd_register(ProfWin* window, const char* const command, gchar** args)     log_info("we are leaving the registration process");     return TRUE; }++gboolean+cmd_mood(ProfWin* window, const char* const command, gchar** args)+{++    if (g_strcmp0(args[0], "set") == 0) {+        cons_show("Your mood: %s", args[1]);+        if (args[2]) {+            publish_user_mood(args[1], args[2]);+        } else {+            publish_user_mood(args[1], args[1]);

?

DebXWoody

comment created time in 2 days

PullRequestReviewEvent

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 static struct cmd_t command_defs[] = {               "/register someuser my.xmppserv.er port 5443 tls force")     }, +    { "/mood",+      parse_args, 2, 3, NULL,+      CMD_NOSUBFUNCS+      CMD_MAINFUNC(cmd_mood)+      CMD_TAGS(+              CMD_TAG_CHAT)+      CMD_SYN(+              "/mood set <mood> [\"Text\"]")+      CMD_DESC(

@DebXWoody What do you think about the hint?

DebXWoody

comment created time in 2 days

PullRequestReviewEvent

pull request commentprofanity-im/profanity

Add /correct-editor command

@MarcoPolo-PasTonMolo no problem. Take your time. I just wanted to make sure that you aren't blocked by the task and could need help :)

MarcoPolo-PasTonMolo

comment created time in 3 days

issue closedprofanity-im/profanity

Persistent /silence on?

Where is this pref saved? profrc nor the accounts files appear to be modified when this pref is enabled. How to enable persistently?

$ profanity -v
Profanity, version 0.11.1 Copyright (C) 2012 - 2019 James Booth boothj5web@gmail.com. Copyright (C) 2019 - 2021 Michael Vetter jubalh@iodoru.org. License GPLv3+: GNU GPL version 3 or later https://www.gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Build information: XMPP library: libstrophe Desktop notification support: Disabled OTR support: Disabled PGP support: Disabled OMEMO support: Enabled C plugins: Disabled Python plugins: Disabled GTK icons/clipboard: Disabled

closed time in 3 days

beaglesnuf

issue commentprofanity-im/profanity

Persistent /silence on?

It is saved in profrc.

beaglesnuf

comment created time in 3 days

pull request commentprofanity-im/profanity

XEP 0107 - User Mood

Autocompletion doesn't work properly. I guess because the reset is missing.

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 iq_muc_register_nick(const char* const roomjid)     xmpp_stanza_release(iq);     xmpp_stanza_release(query); }++void+publish_user_mood(const char* const mood, const char* const text)+{+    xmpp_ctx_t* const ctx = connection_get_ctx();+    char* id = connection_create_stanza_id();++    xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id);++    xmpp_stanza_t* pubsub = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(pubsub, "pubsub");+    xmpp_stanza_set_ns(pubsub, "http://jabber.org/protocol/pubsub");+    xmpp_stanza_add_child(iq, pubsub);++    xmpp_stanza_t* publish = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(publish, "publish");+    xmpp_stanza_set_attribute(publish, "node", "http://jabber.org/protocol/mood");

We should use a define for http://jabber.org/protocol

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 session_get_account_name(void)     return saved_account.name; } +static int _receive_mood(xmpp_stanza_t* const stanza, void* const userdata);

no need to define twice

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 session_get_account_name(void)     return saved_account.name; } +static int _receive_mood(xmpp_stanza_t* const stanza, void* const userdata);++static int+_receive_mood(xmpp_stanza_t* const stanza, void* const userdata)

again defines in this function :)

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 iq_muc_register_nick(const char* const roomjid)     xmpp_stanza_release(iq);     xmpp_stanza_release(query); }++void+publish_user_mood(const char* const mood, const char* const text)+{+    xmpp_ctx_t* const ctx = connection_get_ctx();+    char* id = connection_create_stanza_id();++    xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id);++    xmpp_stanza_t* pubsub = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(pubsub, "pubsub");+    xmpp_stanza_set_ns(pubsub, "http://jabber.org/protocol/pubsub");+    xmpp_stanza_add_child(iq, pubsub);++    xmpp_stanza_t* publish = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(publish, "publish");+    xmpp_stanza_set_attribute(publish, "node", "http://jabber.org/protocol/mood");+    xmpp_stanza_add_child(pubsub, publish);++    xmpp_stanza_t* item = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(item, "item");+    xmpp_stanza_set_attribute(item, "id", "current");+    xmpp_stanza_add_child(publish, item);++    xmpp_stanza_t* mood_t = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(mood_t, "mood");+    xmpp_stanza_set_ns(mood_t, "http://jabber.org/protocol/mood");+    xmpp_stanza_add_child(item, mood_t);++    xmpp_stanza_t* x = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(x, mood);+    xmpp_stanza_add_child(mood_t, x);++    xmpp_stanza_t* text_t = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(text_t, "text");

define :)

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 iq_muc_register_nick(const char* const roomjid)     xmpp_stanza_release(iq);     xmpp_stanza_release(query); }++void+publish_user_mood(const char* const mood, const char* const text)+{+    xmpp_ctx_t* const ctx = connection_get_ctx();+    char* id = connection_create_stanza_id();++    xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id);++    xmpp_stanza_t* pubsub = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(pubsub, "pubsub");+    xmpp_stanza_set_ns(pubsub, "http://jabber.org/protocol/pubsub");+    xmpp_stanza_add_child(iq, pubsub);++    xmpp_stanza_t* publish = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(publish, "publish");+    xmpp_stanza_set_attribute(publish, "node", "http://jabber.org/protocol/mood");+    xmpp_stanza_add_child(pubsub, publish);++    xmpp_stanza_t* item = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(item, "item");

we have the STANZA_NAME_ITEM define

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 _message_handler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* con     } else if (type && g_strcmp0(type, STANZA_TYPE_GROUPCHAT) == 0) {         // XEP-0045: Multi-User Chat         _handle_groupchat(stanza);+     } else if (type && g_strcmp0(type, STANZA_TYPE_HEADLINE) == 0) {-        _handle_headline(stanza);+        xmpp_stanza_t* event = xmpp_stanza_get_child_by_ns(stanza, STANZA_NS_PUBSUB_EVENT);+        if (event) {+            _handle_pubsub(stanza, event);+            return 1;+        }

shouldnt we have an else case here that actually calls _handle_headline()?

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 iq_muc_register_nick(const char* const roomjid)     xmpp_stanza_release(iq);     xmpp_stanza_release(query); }++void+publish_user_mood(const char* const mood, const char* const text)+{+    xmpp_ctx_t* const ctx = connection_get_ctx();+    char* id = connection_create_stanza_id();++    xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id);++    xmpp_stanza_t* pubsub = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(pubsub, "pubsub");+    xmpp_stanza_set_ns(pubsub, "http://jabber.org/protocol/pubsub");+    xmpp_stanza_add_child(iq, pubsub);++    xmpp_stanza_t* publish = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(publish, "publish");+    xmpp_stanza_set_attribute(publish, "node", "http://jabber.org/protocol/mood");+    xmpp_stanza_add_child(pubsub, publish);++    xmpp_stanza_t* item = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(item, "item");+    xmpp_stanza_set_attribute(item, "id", "current");+    xmpp_stanza_add_child(publish, item);++    xmpp_stanza_t* mood_t = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(mood_t, "mood");+    xmpp_stanza_set_ns(mood_t, "http://jabber.org/protocol/mood");

again the define

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 static struct cmd_t command_defs[] = {               "/register someuser my.xmppserv.er port 5443 tls force")     }, +    { "/mood",+      parse_args, 2, 3, NULL,+      CMD_NOSUBFUNCS+      CMD_MAINFUNC(cmd_mood)+      CMD_TAGS(+              CMD_TAG_CHAT)+      CMD_SYN(+              "/mood set <mood> [\"Text\"]")+      CMD_DESC(

Maybe we should add a hint to the description that with <tab> the user can switch through the available moods.

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 session_login_success(gboolean secured)         g_timer_destroy(reconnect_timer);         reconnect_timer = NULL;     }++    message_pubsub_event_handler_add("http://jabber.org/protocol/mood", _receive_mood, NULL, NULL);+    caps_add_feature("http://jabber.org/protocol/mood+notify");

define

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 iq_muc_register_nick(const char* const roomjid)     xmpp_stanza_release(iq);     xmpp_stanza_release(query); }++void+publish_user_mood(const char* const mood, const char* const text)+{+    xmpp_ctx_t* const ctx = connection_get_ctx();+    char* id = connection_create_stanza_id();++    xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_SET, id);++    xmpp_stanza_t* pubsub = xmpp_stanza_new(ctx);+    xmpp_stanza_set_name(pubsub, "pubsub");+    xmpp_stanza_set_ns(pubsub, "http://jabber.org/protocol/pubsub");

There is a define for this: STANZA_NS_PUBSUB

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 static struct cmd_t command_defs[] = {               "/register someuser my.xmppserv.er port 5443 tls force")     }, +    { "/mood",+      parse_args, 2, 3, NULL,+      CMD_NOSUBFUNCS+      CMD_MAINFUNC(cmd_mood)+      CMD_TAGS(+              CMD_TAG_CHAT)+      CMD_SYN(+              "/mood set <mood> [\"Text\"]")+      CMD_DESC(+              "Set your mood")+      CMD_NOARGS

NOARGS isn't true :)

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 _message_handler(xmpp_conn_t* const conn, xmpp_stanza_t* const stanza, void* con         if (msg_stanza) {             _handle_chat(msg_stanza, FALSE, is_carbon, NULL, NULL);         }+    } else if (type && g_strcmp0(type, STANZA_TYPE_HEADLINE) == 0) {

we do we put this here?

DebXWoody

comment created time in 3 days

Pull request review commentprofanity-im/profanity

XEP 0107 - User Mood

 cmd_register(ProfWin* window, const char* const command, gchar** args)     log_info("we are leaving the registration process");     return TRUE; }++gboolean+cmd_mood(ProfWin* window, const char* const command, gchar** args)+{++    if (g_strcmp0(args[0], "set") == 0) {+        cons_show("Your mood: %s", args[1]);+        if (args[2]) {+            publish_user_mood(args[1], args[2]);+        } else {+            publish_user_mood(args[1], args[1]);

Are we alowed to define our own moods? Or do we need a check here so that the user can only insert the moods available through autocompletion?

DebXWoody

comment created time in 3 days