comparison src/protocols/irc/cmds.c @ 12669:879f90dbd21f

[gaim-migrate @ 15012] SF Patch #1392411 from Sadrul "I started using Gaim or IRC, and it seems it uses &quot;, &amp; for characters like ", & in the away message. This patch strips html-stuff from an away message for IRC before setting it. This makes the said characters appear correctly in /whois." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 29 Dec 2005 01:30:08 +0000
parents 39734dd473e0
children 1a095ac881ce
comparison
equal deleted inserted replaced
12668:57462d6542ea 12669:879f90dbd21f
50 return 1; 50 return 1;
51 } 51 }
52 52
53 int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args) 53 int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args)
54 { 54 {
55 char *buf, *message, *cur; 55 char *buf, *message;
56 56
57 if (args[0] && strcmp(cmd, "back")) { 57 if (args[0] && strcmp(cmd, "back")) {
58 message = strdup(args[0]); 58 message = gaim_markup_strip_html(args[0]);
59 for (cur = message; *cur; cur++) { 59 gaim_util_chrreplace(message, '\n', ' ');
60 if (*cur == '\n')
61 *cur = ' ';
62 }
63 buf = irc_format(irc, "v:", "AWAY", message); 60 buf = irc_format(irc, "v:", "AWAY", message);
64 g_free(message); 61 g_free(message);
65 } else { 62 } else {
66 buf = irc_format(irc, "v", "AWAY"); 63 buf = irc_format(irc, "v", "AWAY");
67 } 64 }