changeset 2301:171d11fb37b9

[gaim-migrate @ 2311] /say /help committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 17 Sep 2001 22:21:07 +0000
parents d2686f757d6e
children 722a912562a0
files src/protocols/irc/irc.c
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/irc/irc.c	Mon Sep 17 21:30:47 2001 +0000
+++ b/src/protocols/irc/irc.c	Mon Sep 17 22:21:07 2001 +0000
@@ -1129,6 +1129,11 @@
 			return;
 		g_snprintf(buf, sizeof(buf), "%s\r\n", word_eol[2]);
 		irc_write(id->fd, buf, strlen(buf));
+	} else if (!g_strcasecmp(pdibuf, "SAY")) {
+		if (!*word_eol[2])
+			return;
+		g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, word_eol[2]);
+		irc_write(id->fd, buf, strlen(buf));
 	} else if (!g_strcasecmp(pdibuf, "KICK")) {
 		if (!*word[2])
 			return;
@@ -1164,6 +1169,19 @@
 			g_snprintf(buf, sizeof(buf), _("You have left %s"), chan);
 			do_error_dialog(buf, _("IRC Part"));
 		}
+	} else if (!g_strcasecmp(pdibuf, "HELP")) {
+		struct conversation *c = NULL;
+		if (is_channel(gc, who)) {
+			c = irc_find_chat(gc, who);
+		} else {
+			c = find_conversation(who);
+		}
+		if (!c)
+			return;
+		write_to_conv(c, "<B>Currently supported commands:<BR>"
+				 "JOIN PART TOPIC<BR>"
+				 "OP DEOP VOICE DEVOICE KICK<BR>"
+				 "NICK ME QUOTE SAY</B><BR>", WFLAG_SYSTEM, NULL, time(NULL));
 	}
 }