comparison src/protocols/irc/irc.c @ 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 b5b7dece5249
children 722a912562a0
comparison
equal deleted inserted replaced
2300:d2686f757d6e 2301:171d11fb37b9
1127 } else if (!g_strcasecmp(pdibuf, "QUOTE")) { 1127 } else if (!g_strcasecmp(pdibuf, "QUOTE")) {
1128 if (!*word_eol[2]) 1128 if (!*word_eol[2])
1129 return; 1129 return;
1130 g_snprintf(buf, sizeof(buf), "%s\r\n", word_eol[2]); 1130 g_snprintf(buf, sizeof(buf), "%s\r\n", word_eol[2]);
1131 irc_write(id->fd, buf, strlen(buf)); 1131 irc_write(id->fd, buf, strlen(buf));
1132 } else if (!g_strcasecmp(pdibuf, "SAY")) {
1133 if (!*word_eol[2])
1134 return;
1135 g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, word_eol[2]);
1136 irc_write(id->fd, buf, strlen(buf));
1132 } else if (!g_strcasecmp(pdibuf, "KICK")) { 1137 } else if (!g_strcasecmp(pdibuf, "KICK")) {
1133 if (!*word[2]) 1138 if (!*word[2])
1134 return; 1139 return;
1135 if (*word_eol[3]) 1140 if (*word_eol[3])
1136 g_snprintf(buf, sizeof(buf), "KICK %s %s :%s\r\n", who, word[2], word_eol[3]); 1141 g_snprintf(buf, sizeof(buf), "KICK %s %s :%s\r\n", who, word[2], word_eol[3]);
1162 gc->buddy_chats = g_slist_remove(gc->buddy_chats, c); 1167 gc->buddy_chats = g_slist_remove(gc->buddy_chats, c);
1163 c->gc = NULL; 1168 c->gc = NULL;
1164 g_snprintf(buf, sizeof(buf), _("You have left %s"), chan); 1169 g_snprintf(buf, sizeof(buf), _("You have left %s"), chan);
1165 do_error_dialog(buf, _("IRC Part")); 1170 do_error_dialog(buf, _("IRC Part"));
1166 } 1171 }
1172 } else if (!g_strcasecmp(pdibuf, "HELP")) {
1173 struct conversation *c = NULL;
1174 if (is_channel(gc, who)) {
1175 c = irc_find_chat(gc, who);
1176 } else {
1177 c = find_conversation(who);
1178 }
1179 if (!c)
1180 return;
1181 write_to_conv(c, "<B>Currently supported commands:<BR>"
1182 "JOIN PART TOPIC<BR>"
1183 "OP DEOP VOICE DEVOICE KICK<BR>"
1184 "NICK ME QUOTE SAY</B><BR>", WFLAG_SYSTEM, NULL, time(NULL));
1167 } 1185 }
1168 } 1186 }
1169 1187
1170 static void send_msg(struct gaim_connection *gc, char *who, char *what) 1188 static void send_msg(struct gaim_connection *gc, char *who, char *what)
1171 { 1189 {