From 5e55fc5deec30587ee832c7a2036e90116f132e8 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Wed, 24 Sep 2014 14:28:19 +0000 Subject: [PATCH] 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 --- source/bot_link.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/source/bot_link.c b/source/bot_link.c index 267bfa2..2fc9db8 100644 --- a/source/bot_link.c +++ b/source/bot_link.c @@ -572,20 +572,17 @@ SocketList *s; int send_whom(int idx, char *arg) { -int i; -int j; -SocketList *s, *s1 = NULL; + int i; + SocketList *s, *s1; + tell_whom(idx, NULL); + + s1 = get_socket(idx); + for (i = 0; i < get_max_fd()+1; i++) { if (!check_dcc_socket(i)) continue; - if (idx == i) { s1 = get_socketinfo(i); break; } - } - if (!s1) return 0; - for (j = 0; j < get_max_fd()+1; j++) - { - if (!check_dcc_socket(j)) continue; - s = get_socketinfo(j); + s = get_socket(i); if ((s->flags & DCC_TYPES) == DCC_BOTMODE) { dcc_printf(s->is_read, "whom %d:%s@%s %s %d\n",