Mercurial > pidgin.yaz
comparison src/protocols/irc/irc.c @ 9130:933a19e3a6b3
[gaim-migrate @ 9908]
This puts the core in charge of irc-style /commands, which is way cool. Tim did most of the work, I've just been keeping it in sync with CVS, and slowly adding more commands to jabber.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 30 May 2004 19:34:21 +0000 |
parents | 7ab20f829190 |
children | dcb290a0c970 |
comparison
equal
deleted
inserted
replaced
9129:3e94a77ee0c7 | 9130:933a19e3a6b3 |
---|---|
319 if (strchr(status_chars, *who) != NULL) | 319 if (strchr(status_chars, *who) != NULL) |
320 args[0] = who + 1; | 320 args[0] = who + 1; |
321 else | 321 else |
322 args[0] = who; | 322 args[0] = who; |
323 args[1] = what; | 323 args[1] = what; |
324 | 324 #if 0 |
325 if (*what == '/') { | 325 if (*what == '/') { |
326 return irc_parse_cmd(irc, who, what + 1); | 326 return irc_parse_cmd(irc, who, what + 1); |
327 } | 327 } |
328 | 328 #endif |
329 irc_cmd_privmsg(irc, "msg", NULL, args); | 329 irc_cmd_privmsg(irc, "msg", NULL, args); |
330 return 1; | 330 return 1; |
331 } | 331 } |
332 | 332 |
333 static void irc_get_info(GaimConnection *gc, const char *who) | 333 static void irc_get_info(GaimConnection *gc, const char *who) |
459 | 459 |
460 if (!convo) { | 460 if (!convo) { |
461 gaim_debug(GAIM_DEBUG_ERROR, "irc", "chat send on nonexistent chat\n"); | 461 gaim_debug(GAIM_DEBUG_ERROR, "irc", "chat send on nonexistent chat\n"); |
462 return -EINVAL; | 462 return -EINVAL; |
463 } | 463 } |
464 | 464 #if 0 |
465 if (*what == '/') { | 465 if (*what == '/') { |
466 return irc_parse_cmd(irc, convo->name, what + 1); | 466 return irc_parse_cmd(irc, convo->name, what + 1); |
467 } | 467 } |
468 | 468 #endif |
469 args[0] = convo->name; | 469 args[0] = convo->name; |
470 args[1] = what; | 470 args[1] = what; |
471 | 471 |
472 irc_cmd_privmsg(irc, "msg", NULL, args); | 472 irc_cmd_privmsg(irc, "msg", NULL, args); |
473 | 473 |
652 | 652 |
653 option = gaim_account_option_string_new(_("Username"), "username", ""); | 653 option = gaim_account_option_string_new(_("Username"), "username", ""); |
654 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); | 654 prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); |
655 | 655 |
656 _irc_plugin = plugin; | 656 _irc_plugin = plugin; |
657 | |
658 irc_register_commands(); | |
657 } | 659 } |
658 | 660 |
659 GAIM_INIT_PLUGIN(irc, _init_plugin, info); | 661 GAIM_INIT_PLUGIN(irc, _init_plugin, info); |