From: <ebl...@us...> - 2006-06-27 21:55:56
|
Revision: 16361 Author: eblanton Date: 2006-06-27 14:55:47 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16361&view=rev Log Message: ----------- ------------------------------------------------------------------------ r16360 | eblanton | 2006-06-27 17:54:44 -0400 (Tue, 27 Jun 2006) | 1 line IRC support for CTCP VERSION from Andrej Krivul?\196?\141?\195?\173k ------------------------------------------------------------------------ Modified Paths: -------------- trunk/ChangeLog trunk/src/protocols/irc/cmds.c trunk/src/protocols/irc/irc.h trunk/src/protocols/irc/parse.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/ChangeLog 2006-06-27 21:55:47 UTC (rev 16361) @@ -130,6 +130,7 @@ channel or change your nick * Added /nickserv, /memoserv, /chanserv and /operserv commands (Joao Luís Marques Pinto) + * Added CTCP VERSION via /version (Andrej Krivulčík) Jabber Features: * Support for SRV lookups Modified: trunk/src/protocols/irc/cmds.c =================================================================== --- trunk/src/protocols/irc/cmds.c 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/src/protocols/irc/cmds.c 2006-06-27 21:55:47 UTC (rev 16361) @@ -127,6 +127,21 @@ return 1; } +int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args) +{ + char *buf; + + + if (!args || !args[0]) + return 0; + + buf = irc_format(irc, "vn:", "PRIVMSG", args[0], "\001VERSION\001"); + irc_send(irc, buf); + g_free(buf); + + return 0; +} + int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args) { char *buf; Modified: trunk/src/protocols/irc/irc.h =================================================================== --- trunk/src/protocols/irc/irc.h 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/src/protocols/irc/irc.h 2006-06-27 21:55:47 UTC (rev 16361) @@ -152,6 +152,7 @@ int irc_cmd_default(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_away(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_ctcp_action(struct irc_conn *irc, const char *cmd, const char *target, const char **args); +int irc_cmd_ctcp_version(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_invite(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_join(struct irc_conn *irc, const char *cmd, const char *target, const char **args); int irc_cmd_kick(struct irc_conn *irc, const char *cmd, const char *target, const char **args); Modified: trunk/src/protocols/irc/parse.c =================================================================== --- trunk/src/protocols/irc/parse.c 2006-06-27 21:54:44 UTC (rev 16360) +++ trunk/src/protocols/irc/parse.c 2006-06-27 21:55:47 UTC (rev 16361) @@ -140,6 +140,7 @@ { "time", "", irc_cmd_time, N_("time: Displays the current local time at the IRC server.") }, { "topic", ":", irc_cmd_topic, N_("topic [new topic]: View or change the channel topic.") }, { "umode", ":", irc_cmd_mode, N_("umode <+|-><A-Za-z>: Set or unset a user mode.") }, + { "version", ":", irc_cmd_ctcp_version, N_("version [nick]: send CTCP VERSION request to a user") }, { "voice", ":", irc_cmd_op, N_("voice <nick1> [nick2] ...: Grant channel voice status to someone. You must be a channel operator to do this.") }, { "wallops", ":", irc_cmd_wallops, N_("wallops <message>: If you don't know what this is, you probably can't use it.") }, { "whois", "tt", irc_cmd_whois, N_("whois [server] <nick>: Get information on a user.") }, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |