Cleanup send_whom(), and fix bug where get_socketinfo() was used instead of get_socket().

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@504 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2014-09-24 14:28:19 +00:00
parent 337c3128d1
commit 5e55fc5dee

View File

@@ -573,19 +573,16 @@ SocketList *s;
int send_whom(int idx, char *arg) int send_whom(int idx, char *arg)
{ {
int i; int i;
int j; SocketList *s, *s1;
SocketList *s, *s1 = NULL;
tell_whom(idx, NULL); tell_whom(idx, NULL);
s1 = get_socket(idx);
for (i = 0; i < get_max_fd()+1; i++) for (i = 0; i < get_max_fd()+1; i++)
{ {
if (!check_dcc_socket(i)) continue; if (!check_dcc_socket(i)) continue;
if (idx == i) { s1 = get_socketinfo(i); break; } s = get_socket(i);
}
if (!s1) return 0;
for (j = 0; j < get_max_fd()+1; j++)
{
if (!check_dcc_socket(j)) continue;
s = get_socketinfo(j);
if ((s->flags & DCC_TYPES) == DCC_BOTMODE) if ((s->flags & DCC_TYPES) == DCC_BOTMODE)
{ {
dcc_printf(s->is_read, "whom %d:%s@%s %s %d\n", dcc_printf(s->is_read, "whom %d:%s@%s %s %d\n",