Hello,
Just started using irssi properly this week and I'm really impressed so
far, especially with the proxy module which does exactly what I've wanted
to have for some time.
I have two bug reports from using the proxy module. The patch attached
partially fixes (2) for me.
(1) When a proxy client does a /me, the main irssi doesn't decode the CTCP
correctly and displays it as follows, with the As at the beginning and end
of the line in reverse video. The action gets sent to the server and seen
by other clients fine.
[01:21] <Heffalump> AACTION tests somethingA
(2) If you say something in the main irssi, the proxy clients don't see
it. The attached patch fixes the issue for public messages, and I assume
the same could be done for private messages, though I'm less bothered
about those because the client I'm using as the proxy client (Xchat) gets
confused by them and thinks I'm sending myself messages anyway, so I've
not bothered to try. I guess I should try to get that fixed too :-)
Cheers,
Ganesh
diff -urN irssi-0.7.98.CVS/src/irc/proxy/dump.c
irssi-0.7.98.CVS-new/src/irc/proxy/dump.c
--- irssi-0.7.98.CVS/src/irc/proxy/dump.c Wed Jul 25 21:10:12 2001
+++ irssi-0.7.98.CVS-new/src/irc/proxy/dump.c Fri Sep 14 01:29:20 2001
@@ -88,7 +88,7 @@
va_end(args);
}
-/*void proxy_outserver_all(IRC_SERVER_REC *server, const char *data, ...)
+void proxy_outserver_all(IRC_SERVER_REC *server, const char *data, ...)
{
va_list args;
GSList *tmp;
@@ -111,7 +111,7 @@
g_free(str);
va_end(args);
-}*/
+}
void proxy_outserver_all_except(CLIENT_REC *client, const char *data, ...)
{
diff -urN irssi-0.7.98.CVS/src/irc/proxy/listen.c
irssi-0.7.98.CVS-new/src/irc/proxy/listen.c
--- irssi-0.7.98.CVS/src/irc/proxy/listen.c Tue Jul 10 21:10:14 2001
+++ irssi-0.7.98.CVS-new/src/irc/proxy/listen.c Fri Sep 14 01:35:10 2001
@@ -544,6 +544,12 @@
}
}
+static void sig_message_own_public(SERVER_REC *server, const char *msg,
+ const char *target)
+{
+ proxy_outserver_all(server, "PRIVMSG %s :%s", target, msg);
+}
+
void plugin_proxy_listen_init(void)
{
next_line = g_string_new(NULL);
@@ -558,6 +564,7 @@
signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
signal_add("event nick", (SIGNAL_FUNC) event_nick);
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
+ signal_add("message own_public", (SIGNAL_FUNC) sig_message_own_public);
}
void plugin_proxy_listen_deinit(void)
@@ -574,4 +581,5 @@
signal_remove("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
signal_remove("event nick", (SIGNAL_FUNC) event_nick);
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
+ signal_remove("message own_public", (SIGNAL_FUNC) sig_message_own_public);
}
diff -urN irssi-0.7.98.CVS/src/irc/proxy/module.h
irssi-0.7.98.CVS-new/src/irc/proxy/module.h
--- irssi-0.7.98.CVS/src/irc/proxy/module.h Tue Dec 5 01:01:53 2000
+++ irssi-0.7.98.CVS-new/src/irc/proxy/module.h Fri Sep 14 01:35:29 2001
@@ -44,5 +44,5 @@
void proxy_outdata(CLIENT_REC *client, const char *data, ...);
void proxy_outdata_all(IRC_SERVER_REC *server, const char *data, ...);
void proxy_outserver(CLIENT_REC *client, const char *data, ...);
-/*void proxy_outserver_all(const char *data, ...);*/
+void proxy_outserver_all(IRC_SERVER_REC *server, const char *data, ...);
void proxy_outserver_all_except(CLIENT_REC *client, const char *data, ...);