comparison src/protocols/irc/parse.c @ 7631:ea2d07ad05a9

[gaim-migrate @ 8255] long car rides and a power inverter can generate some interesting code tweaks committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 25 Nov 2003 07:16:11 +0000
parents 91df6a6e6567
children 828856b7fe30
comparison
equal deleted inserted replaced
7630:2df4d470c12a 7631:ea2d07ad05a9
125 { "topic", ":", irc_cmd_topic }, 125 { "topic", ":", irc_cmd_topic },
126 { "umode", ":", irc_cmd_mode }, 126 { "umode", ":", irc_cmd_mode },
127 { "voice", ":", irc_cmd_op }, 127 { "voice", ":", irc_cmd_op },
128 { "wallops", ":", irc_cmd_wallops }, 128 { "wallops", ":", irc_cmd_wallops },
129 { "whois", "n", irc_cmd_whois }, 129 { "whois", "n", irc_cmd_whois },
130 { NULL, NULL } 130 { NULL, NULL, NULL }
131 }; 131 };
132 132
133 static char *irc_send_convert(struct irc_conn *irc, const char *string) 133 static char *irc_send_convert(struct irc_conn *irc, const char *string)
134 { 134 {
135 char *utf8; 135 char *utf8;
378 378
379 void irc_parse_msg(struct irc_conn *irc, char *input) 379 void irc_parse_msg(struct irc_conn *irc, char *input)
380 { 380 {
381 struct _irc_msg *msgent; 381 struct _irc_msg *msgent;
382 char *cur, *end, *tmp, *from, *msgname, *fmt, **args, *msg; 382 char *cur, *end, *tmp, *from, *msgname, *fmt, **args, *msg;
383 int i; 383 guint i;
384 384
385 if (!strncmp(input, "PING ", 5)) { 385 if (!strncmp(input, "PING ", 5)) {
386 msg = irc_format(irc, "vv", "PONG", input + 5); 386 msg = irc_format(irc, "vv", "PONG", input + 5);
387 irc_send(irc, msg); 387 irc_send(irc, msg);
388 g_free(msg); 388 g_free(msg);
459 int irc_parse_cmd(struct irc_conn *irc, const char *target, const char *cmdstr) 459 int irc_parse_cmd(struct irc_conn *irc, const char *target, const char *cmdstr)
460 { 460 {
461 const char *cur, *end, *fmt; 461 const char *cur, *end, *fmt;
462 char *tmp, *cmd, **args; 462 char *tmp, *cmd, **args;
463 struct _irc_user_cmd *cmdent; 463 struct _irc_user_cmd *cmdent;
464 int i, ret; 464 guint i;
465 int ret;
465 466
466 cur = cmdstr; 467 cur = cmdstr;
467 end = strchr(cmdstr, ' '); 468 end = strchr(cmdstr, ' ');
468 if (!end) 469 if (!end)
469 end = cur + strlen(cur); 470 end = cur + strlen(cur);