irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

Own nick not highlighted #486

Open irssibot opened 17 years ago

irssibot commented 17 years ago

Nick of irssiproxy messages don't emit the own_public/own_private signal in the connected clients, thus the nick don't get highlighted (bold white in default theme).

Screenshot of bug and fixing patch attached.

irssibot commented 17 years ago

own-nick.png

The bug in action. Messages from host to client does not the own nick highlighting

486_927911242

irssibot commented 17 years ago

own_nick.patch

Patch fixing the bug.

Index: src/fe-common/irc/fe-events.c
===================================================================
--- src/fe-common/irc/fe-events.c   (revision 4433)
+++ src/fe-common/irc/fe-events.c   (working copy)
@@ -58,6 +58,13 @@
        signal_emit("message irc op_public", 5,
                server, recoded, nick, addr,
                get_visible_target(server, target+1));
+   } else if(strcmp(server->nick, nick) == 0) {
+       /* handle messages written by my nick as my own.
+          this is nice when using irssiproxy. */
+       recoded = recode_in(SERVER(server), msg, ischannel(*target) ? target : nick);
+       signal_emit(ischannel(*target) ?
+               "message own_public" : "message own_private", 4,
+               server, msg, target, target);
    } else {
        recoded = recode_in(SERVER(server), msg, ischannel(*target) ? target : nick);
        signal_emit(ischannel(*target) ?