changeset 9829:e98c9a80fb74

[gaim-migrate @ 10700] This adds the /say command. Someone can improve the help string if they want. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sun, 22 Aug 2004 20:04:33 +0000
parents e8334906b2fb
children 2e3c63811475
files src/gtkconv.c
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Sun Aug 22 18:50:33 2004 +0000
+++ b/src/gtkconv.c	Sun Aug 22 20:04:33 2004 +0000
@@ -288,6 +288,18 @@
 }
 
 static GaimCmdRet
+say_command_cb(GaimConversation *conv,
+              const char *cmd, char **args, char **error, void *data)
+{
+	if (gaim_conversation_get_type(conv) == GAIM_CONV_IM)
+		gaim_conv_im_send(GAIM_CONV_IM(conv), args[0]);
+	else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT)
+		gaim_conv_chat_send(GAIM_CONV_CHAT(conv), args[0]);
+
+	return GAIM_CMD_RET_OK;
+}
+
+static GaimCmdRet
 me_command_cb(GaimConversation *conv,
               const char *cmd, char **args, char **error, void *data)
 {
@@ -6291,6 +6303,9 @@
 	/**********************************************************************
 	 * Register commands
 	 **********************************************************************/
+	gaim_cmd_register("say", "S", GAIM_CMD_P_DEFAULT,
+	                  GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL,
+	                  say_command_cb, _("say &lt;message&gt;:  Send a message normally as if you weren't using a command."), NULL);
 	gaim_cmd_register("me", "S", GAIM_CMD_P_DEFAULT,
 	                  GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL,
 	                  me_command_cb, _("me &lt;action&gt;:  Send an IRC style action to a buddy or chat."), NULL);