Mercurial > pidgin
diff src/protocols/irc/cmds.c @ 12013:39734dd473e0
[gaim-migrate @ 14306]
sf patch #1167921, from Joao Lu??s Marques Pinto
"This patch adds the command /nickserv, /chanserv,
/memoserv, /operserv, it is safer than the /msg option
because more modern ircds will ensure that the message
is routed to a service and not to a "fake" client."
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Wed, 09 Nov 2005 00:59:09 +0000 |
| parents | ddb7520d57bd |
| children | 879f90dbd21f |
line wrap: on
line diff
--- a/src/protocols/irc/cmds.c Wed Nov 09 00:24:22 2005 +0000 +++ b/src/protocols/irc/cmds.c Wed Nov 09 00:59:09 2005 +0000 @@ -434,6 +434,23 @@ return 0; } +int irc_cmd_service(struct irc_conn *irc, const char *cmd, const char *target, const char **args) +{ + char *capital_cmd, *buf; + + if (!args || !args[0]) + return 0; + + /* cmd will be one of nickserv, chanserv, memoserv or operserv */ + capital_cmd = g_ascii_strup(cmd, -1); + buf = irc_format(irc, "v:", capital_cmd, args[0]); + irc_send(irc, buf); + g_free(capital_cmd); + g_free(buf); + + return 0; +} + int irc_cmd_time(struct irc_conn *irc, const char *cmd, const char *target, const char **args) { char *buf;
