changeset 7711:ebd43be54140

[gaim-migrate @ 8356] YamiPharaoh has pointed out that some servers use & as a user status character. committer: Tailor Script <tailor@pidgin.im>
author Ethan Blanton <elb@pidgin.im>
date Wed, 03 Dec 2003 01:27:53 +0000
parents 45fd907e1d48
children 2823111061ba
files src/protocols/irc/irc.c
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Wed Dec 03 01:21:49 2003 +0000
+++ b/src/protocols/irc/irc.c	Wed Dec 03 01:27:53 2003 +0000
@@ -50,6 +50,14 @@
 static void irc_chat_join (GaimConnection *gc, GHashTable *data);
 static void irc_input_cb(gpointer data, gint source, GaimInputCondition cond);
 
+static guint irc_nick_hash(const char *nick);
+static gboolean irc_nick_equal(const char *nick1, const char *nick2);
+static void irc_buddy_free(struct irc_buddy *ib);
+
+static GaimPlugin *_irc_plugin = NULL;
+
+static const char *status_chars = "@+%&";
+
 static void irc_view_motd(GaimConnection *gc)
 {
 	struct irc_conn *irc;
@@ -69,12 +77,6 @@
 	gaim_notify_formatted(gc, title, title, NULL, irc->motd->str, NULL, NULL);
 }
 
-static guint irc_nick_hash(const char *nick);
-static gboolean irc_nick_equal(const char *nick1, const char *nick2);
-static void irc_buddy_free(struct irc_buddy *ib);
-
-static GaimPlugin *_irc_plugin = NULL;
-
 int irc_send(struct irc_conn *irc, const char *buf)
 {
 	if (irc->fd < 0)
@@ -287,7 +289,7 @@
 	struct irc_conn *irc = gc->proto_data;
 	const char *args[2];
 
-	if (*who == '@' || *who == '%' || *who == '+')
+	if (strchr(status_chars, *who) != NULL)
 		args[0] = who + 1;
 	else
 		args[0] = who;