Mercurial > pidgin.yaz
changeset 1674:1127fa1b4c02
[gaim-migrate @ 1684]
Slight restructuring.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Sat, 31 Mar 2001 06:50:58 +0000 |
parents | 0ded38ffc7c8 |
children | 3232467ae220 |
files | plugins/irc.c |
diffstat | 1 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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); }