im.pidgin.pidgin: 5cfa5ce97bcd89665418099f98e9ad744a11f1d1

rekkanoryo at pidgin.im rekkanoryo at pidgin.im
Sun Dec 30 14:00:38 EST 2007


-----------------------------------------------------------------
Revision: 5cfa5ce97bcd89665418099f98e9ad744a11f1d1
Ancestor: f1e5d874405fb39c9aad3394f2b3fb30adec28e8
Author: rekkanoryo at pidgin.im
Date: 2007-12-30T18:46:56
Branch: im.pidgin.pidgin

Modified files:
        libpurple/protocols/irc/cmds.c
        libpurple/protocols/irc/parse.c

ChangeLog: 

Added /notice support for IRC.  If I didn't do this properly, feel free
to disapprove this revision, elb.

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/cmds.c	0ff95f4f0f9dd85e95a3dad11e566bf266b047e7
+++ libpurple/protocols/irc/cmds.c	51376f84661a83c6d61c74fbe54dde476ec66706
@@ -367,7 +367,12 @@ int irc_cmd_privmsg(struct irc_conn *irc
 		if (!end)
 			end = cur + strlen(cur);
 		msg = g_strndup(cur, end - cur);
-		buf = irc_format(irc, "vt:", "PRIVMSG", args[0], msg);
+
+		if(!strcmp(cmd, "msg"))
+			buf = irc_format(irc, "vt:", "PRIVMSG", args[0], msg);
+		else /* seding a notice if we get here */
+			buf = irc_format(irc, "vt:", "NOTICE", args[0], msg);
+
 		irc_send(irc, buf);
 		g_free(msg);
 		g_free(buf);
============================================================
--- libpurple/protocols/irc/parse.c	24918c19b53c5d6aea472d0ff6df5fd8713e0ede
+++ libpurple/protocols/irc/parse.c	b8c32fdcabe7da81bd6d0de8f2f697cf7caa8bfa
@@ -136,6 +136,7 @@ static struct _irc_user_cmd {
 	{ "names", "c", irc_cmd_names, N_("names [channel]:  List the users currently in a channel.") },
 	{ "nick", "n", irc_cmd_nick, N_("nick <new nickname>:  Change your nickname.") },
 	{ "nickserv", ":", irc_cmd_service, N_("nickserv: Send a command to nickserv") },
+	{ "notice", "t:", irc_cmd_privmsg, N_("notice <target<:  Send a notice to a user or channel.") },
 	{ "op", ":", irc_cmd_op, N_("op <nick1> [nick2] ...:  Grant channel operator status to someone. You must be a channel operator to do this.") },
 	{ "operwall", ":", irc_cmd_wallops, N_("operwall <message>:  If you don't know what this is, you probably can't use it.") },
 	{ "operserv", ":", irc_cmd_service, N_("operserv: Send a command to operserv") },


More information about the Commits mailing list