Slight cleanup to some xlink code.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@502 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -106,23 +106,29 @@ int i;
|
|||||||
|
|
||||||
void chanout_but(int idx, char *format, ...)
|
void chanout_but(int idx, char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
char putbuf[BIG_BUFFER_SIZE+1];
|
char putbuf[BIG_BUFFER_SIZE+1];
|
||||||
SocketList *s;
|
SocketList *s;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
vsnprintf(putbuf, BIG_BUFFER_SIZE, format, args);
|
vsnprintf(putbuf, BIG_BUFFER_SIZE, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
for (i = 0; i < get_max_fd()+1; i++)
|
for (i = 0; i < get_max_fd()+1; i++)
|
||||||
{
|
{
|
||||||
if (!check_dcc_socket(i) || (idx == i)) continue;
|
if (!check_dcc_socket(i))
|
||||||
s = get_socket(i);
|
continue;
|
||||||
if (!(s->flags & DCC_ACTIVE)) continue;
|
|
||||||
|
|
||||||
if (idx != i && (s->flags & DCC_BOTCHAT))
|
s = get_socket(i);
|
||||||
|
if (!(s->flags & DCC_ACTIVE))
|
||||||
|
continue;
|
||||||
|
if (!(s->flags & DCC_BOTCHAT))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (idx != i)
|
||||||
send(i, putbuf, strlen(putbuf), 0);
|
send(i, putbuf, strlen(putbuf), 0);
|
||||||
else if (idx == i && (s->flags & DCC_ECHO))
|
else if (s->flags & DCC_ECHO)
|
||||||
send(i, putbuf, strlen(putbuf), 0);
|
send(i, putbuf, strlen(putbuf), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user