[gaim-migrate @ 1684]

Sat, 31 Mar 2001 06:50:58 +0000

author
Rob Flynn <gaim@robflynn.com>
date
Sat, 31 Mar 2001 06:50:58 +0000
changeset 1674
1b0d3c5b1f25
parent 1673
31579f492d43
child 1675
ecd88d7a0e87

[gaim-migrate @ 1684]
Slight restructuring.

plugins/irc.c file | annotate | diff | comparison | revisions
--- a/plugins/irc.c	Sat Mar 31 06:49:06 2001 +0000
+++ b/plugins/irc.c	Sat Mar 31 06:50:58 2001 +0000
@@ -172,16 +172,21 @@
 	gchar *buf = (gchar *) g_malloc(IRC_BUF_LEN + 1);
 
 	/* Before we actually send this, we should check to see if they're trying
-	 * To issue a /me command and handle it properly. */
+	 * To issue a command and handle it properly. */
 
-	if ((g_strncasecmp(message, "/me ", 4) == 0) && (strlen(message) > 4)) {
-		/* We have /me!! We have /me!! :-) */
+	if (message[0] == '/')
+	{
+		/* I'll change the implementation of this a little later :-) */
+		if ((g_strncasecmp(message, "/me ", 4) == 0) && (strlen(message) > 4)) {
+			/* We have /me!! We have /me!! :-) */
 
-		gchar *temp = (gchar *) g_malloc(IRC_BUF_LEN + 1);
-		strcpy(temp, message + 4);
-		g_snprintf(buf, IRC_BUF_LEN, "PRIVMSG %s :%cACTION %s%c\n", who, '\001', temp, '\001');
-		g_free(temp);
-	} else {
+			gchar *temp = (gchar *) g_malloc(IRC_BUF_LEN + 1);
+			strcpy(temp, message + 4);
+			g_snprintf(buf, IRC_BUF_LEN, "PRIVMSG %s :%cACTION %s%c\n", who, '\001', temp, '\001');
+			g_free(temp);
+		} 
+	}
+	else {
 		g_snprintf(buf, IRC_BUF_LEN, "PRIVMSG %s :%s\n", who, message);
 	}
 

mercurial