Mercurial > pidgin
comparison src/protocols/irc/irc.c @ 2305:0371b905baef
[gaim-migrate @ 2315]
hi
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Tue, 18 Sep 2001 18:17:21 +0000 |
| parents | 15fb364935ec |
| children | b2db2a76dcec |
comparison
equal
deleted
inserted
replaced
| 2304:15fb364935ec | 2305:0371b905baef |
|---|---|
| 1133 } else if (!g_strcasecmp(pdibuf, "SAY")) { | 1133 } else if (!g_strcasecmp(pdibuf, "SAY")) { |
| 1134 if (!*word_eol[2]) | 1134 if (!*word_eol[2]) |
| 1135 return -EINVAL; | 1135 return -EINVAL; |
| 1136 g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, word_eol[2]); | 1136 g_snprintf(buf, sizeof(buf), "PRIVMSG %s :%s\r\n", who, word_eol[2]); |
| 1137 irc_write(id->fd, buf, strlen(buf)); | 1137 irc_write(id->fd, buf, strlen(buf)); |
| 1138 return 1; | |
| 1138 } else if (!g_strcasecmp(pdibuf, "MSG")) { | 1139 } else if (!g_strcasecmp(pdibuf, "MSG")) { |
| 1139 if (!*word[2]) | 1140 if (!*word[2]) |
| 1140 return -EINVAL; | 1141 return -EINVAL; |
| 1141 if (!*word_eol[3]) | 1142 if (!*word_eol[3]) |
| 1142 return -EINVAL; | 1143 return -EINVAL; |
| 1187 if (!c) | 1188 if (!c) |
| 1188 return -EINVAL; | 1189 return -EINVAL; |
| 1189 write_to_conv(c, "<B>Currently supported commands:<BR>" | 1190 write_to_conv(c, "<B>Currently supported commands:<BR>" |
| 1190 "JOIN PART TOPIC<BR>" | 1191 "JOIN PART TOPIC<BR>" |
| 1191 "OP DEOP VOICE DEVOICE KICK<BR>" | 1192 "OP DEOP VOICE DEVOICE KICK<BR>" |
| 1192 "NICK ME MSG QUOTE SAY</B><BR>", | 1193 "NICK ME MSG QUOTE SAY</B>", |
| 1193 WFLAG_SYSTEM, NULL, time(NULL)); | 1194 WFLAG_SYSTEM, NULL, time(NULL)); |
| 1194 } | 1195 } else { |
| 1196 struct conversation *c = NULL; | |
| 1197 if (is_channel(gc, who)) { | |
| 1198 c = irc_find_chat(gc, who); | |
| 1199 } else { | |
| 1200 c = find_conversation(who); | |
| 1201 } | |
| 1202 if (!c) | |
| 1203 return -EINVAL; | |
| 1204 write_to_conv(c, "<B>Unsupported command</B>", WFLAG_SYSTEM, NULL, time(NULL)); | |
| 1205 } | |
| 1206 | |
| 1195 return 0; | 1207 return 0; |
| 1196 } | 1208 } |
| 1197 | 1209 |
| 1198 static int send_msg(struct gaim_connection *gc, char *who, char *what) | 1210 static int send_msg(struct gaim_connection *gc, char *who, char *what) |
| 1199 { | 1211 { |
