# HG changeset patch # User Rob Flynn # Date 986021458 0 # Node ID 1127fa1b4c02808906ff4a7b1b97d8f71b0e899b # Parent 0ded38ffc7c8ac4cf68924c49be9e1bd62aed985 [gaim-migrate @ 1684] Slight restructuring. committer: Tailor Script diff -r 0ded38ffc7c8 -r 1127fa1b4c02 plugins/irc.c --- 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); }