summaryrefslogtreecommitdiff
path: root/src/fe-common/irc
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-30 19:54:34 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-30 19:54:34 +0000
commit39282a342f7f333ee24c5bad8fa5f48d8ebf3dbb (patch)
tree622e3a8c425b648d754a655f3546b88facbfd6aa /src/fe-common/irc
parent58397c1ca91c31c785971c874c7d124e9d1aa29b (diff)
downloadirssi-39282a342f7f333ee24c5bad8fa5f48d8ebf3dbb.zip
If joined channel had some low-ascii (color codes), they were displayed
wrong in statusbar and prompt. Also, if you're invited to some channel, print the lowascii so that you can see them (^B, etc.) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@400 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc')
-rw-r--r--src/fe-common/irc/fe-events-numeric.c14
-rw-r--r--src/fe-common/irc/fe-events.c6
2 files changed, 8 insertions, 12 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c
index ddfa04c8..6d48988b 100644
--- a/src/fe-common/irc/fe-events-numeric.c
+++ b/src/fe-common/irc/fe-events-numeric.c
@@ -447,19 +447,11 @@ static void event_whois_channels(const char *data, IRC_SERVER_REC *server)
colors, bolds, etc. are mostly just to fool people, I think we
should show the channel names as they REALLY are so they could
even be joined without any extra tricks. */
- str = g_string_new(NULL);
- for (; *chans != '\0'; chans++) {
- if ((unsigned char) *chans >= 32)
- g_string_append_c(str, *chans);
- else {
- g_string_append_c(str, '^');
- g_string_append_c(str, *chans+'A'-1);
- }
- }
+ chans = show_lowascii(chans);
+ printformat(server, nick, MSGLEVEL_CRAP, IRCTXT_WHOIS_CHANNELS, nick, chans);
+ g_free(chans);
- printformat(server, nick, MSGLEVEL_CRAP, IRCTXT_WHOIS_CHANNELS, nick, str->str);
g_free(params);
- g_string_free(str, TRUE);
}
static void event_whois_away(const char *data, IRC_SERVER_REC *server)
diff --git a/src/fe-common/irc/fe-events.c b/src/fe-common/irc/fe-events.c
index d67e5775..d37ef8b5 100644
--- a/src/fe-common/irc/fe-events.c
+++ b/src/fe-common/irc/fe-events.c
@@ -21,6 +21,7 @@
#include "module.h"
#include "module-formats.h"
#include "signals.h"
+#include "misc.h"
#include "settings.h"
#include "irc.h"
@@ -388,8 +389,11 @@ static void event_invite(const char *data, IRC_SERVER_REC *server, const char *n
g_return_if_fail(data != NULL);
params = event_get_params(data, 2, NULL, &channel);
- if (*channel != '\0' && !ignore_check(server, nick, addr, channel, NULL, MSGLEVEL_INVITES))
+ if (*channel != '\0' && !ignore_check(server, nick, addr, channel, NULL, MSGLEVEL_INVITES)) {
+ channel = show_lowascii(channel);
printformat(server, NULL, MSGLEVEL_INVITES, IRCTXT_INVITE, nick, channel);
+ g_free(channel);
+ }
g_free(params);
}