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

Sun, 30 Dec 2007 18:46:56 +0000

author
John Bailey <rekkanoryo@rekkanoryo.org>
date
Sun, 30 Dec 2007 18:46:56 +0000
changeset 22092
52c00ca73f6f
parent 22091
1568343b965c
child 22093
a5e784e3b6a7

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

libpurple/protocols/irc/cmds.c file | annotate | diff | comparison | revisions
libpurple/protocols/irc/parse.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/irc/cmds.c	Sun Dec 30 13:56:01 2007 +0000
+++ b/libpurple/protocols/irc/cmds.c	Sun Dec 30 18:46:56 2007 +0000
@@ -367,7 +367,12 @@
 		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);
--- a/libpurple/protocols/irc/parse.c	Sun Dec 30 13:56:01 2007 +0000
+++ b/libpurple/protocols/irc/parse.c	Sun Dec 30 18:46:56 2007 +0000
@@ -136,6 +136,7 @@
 	{ "names", "c", irc_cmd_names, N_("names [channel]:  List the users currently in a channel.") },
 	{ "nick", "n", irc_cmd_nick, N_("nick &lt;new nickname&gt;:  Change your nickname.") },
 	{ "nickserv", ":", irc_cmd_service, N_("nickserv: Send a command to nickserv") },
+	{ "notice", "t:", irc_cmd_privmsg, N_("notice &lt;target&lt;:  Send a notice to a user or channel.") },
 	{ "op", ":", irc_cmd_op, N_("op &lt;nick1&gt; [nick2] ...:  Grant channel operator status to someone. You must be a channel operator to do this.") },
 	{ "operwall", ":", irc_cmd_wallops, N_("operwall &lt;message&gt;:  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") },

mercurial