comparison src/gtkconv.c @ 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 5afa28c94201
children 54e0322c81fb
comparison
equal deleted inserted replaced
9828:e8334906b2fb 9829:e98c9a80fb74
286 { 286 {
287 return "/"; 287 return "/";
288 } 288 }
289 289
290 static GaimCmdRet 290 static GaimCmdRet
291 say_command_cb(GaimConversation *conv,
292 const char *cmd, char **args, char **error, void *data)
293 {
294 if (gaim_conversation_get_type(conv) == GAIM_CONV_IM)
295 gaim_conv_im_send(GAIM_CONV_IM(conv), args[0]);
296 else if (gaim_conversation_get_type(conv) == GAIM_CONV_CHAT)
297 gaim_conv_chat_send(GAIM_CONV_CHAT(conv), args[0]);
298
299 return GAIM_CMD_RET_OK;
300 }
301
302 static GaimCmdRet
291 me_command_cb(GaimConversation *conv, 303 me_command_cb(GaimConversation *conv,
292 const char *cmd, char **args, char **error, void *data) 304 const char *cmd, char **args, char **error, void *data)
293 { 305 {
294 char *tmp; 306 char *tmp;
295 307
6289 GAIM_SUBTYPE_CONV_WINDOW)); 6301 GAIM_SUBTYPE_CONV_WINDOW));
6290 6302
6291 /********************************************************************** 6303 /**********************************************************************
6292 * Register commands 6304 * Register commands
6293 **********************************************************************/ 6305 **********************************************************************/
6306 gaim_cmd_register("say", "S", GAIM_CMD_P_DEFAULT,
6307 GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL,
6308 say_command_cb, _("say &lt;message&gt;: Send a message normally as if you weren't using a command."), NULL);
6294 gaim_cmd_register("me", "S", GAIM_CMD_P_DEFAULT, 6309 gaim_cmd_register("me", "S", GAIM_CMD_P_DEFAULT,
6295 GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL, 6310 GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL,
6296 me_command_cb, _("me &lt;action&gt;: Send an IRC style action to a buddy or chat."), NULL); 6311 me_command_cb, _("me &lt;action&gt;: Send an IRC style action to a buddy or chat."), NULL);
6297 gaim_cmd_register("debug", "w", GAIM_CMD_P_DEFAULT, 6312 gaim_cmd_register("debug", "w", GAIM_CMD_P_DEFAULT,
6298 GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL, 6313 GAIM_CMD_FLAG_CHAT | GAIM_CMD_FLAG_IM, NULL,