Fix .cmsg crash reported by zimzum.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@62 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
[Changes 1.2c01 ]
|
||||
|
||||
* [1.1s01] Fixed .cmsg crash reported by zimzum. (caf)
|
||||
|
||||
* Changed the defaults for JOIN_NEW_WINDOW_TYPE and QUERY_NEW_WINDOW_TYPE
|
||||
so that they work out of the box. (caf)
|
||||
|
||||
|
||||
@@ -654,19 +654,22 @@ SocketList *s;
|
||||
|
||||
int cmd_cmsg(int idx, char *par)
|
||||
{
|
||||
char *nick, *user;
|
||||
SocketList *s, *s1 = NULL;
|
||||
char *nick, *user;
|
||||
SocketList *s, *s1 = NULL;
|
||||
|
||||
nick = next_arg(par, &par);
|
||||
|
||||
nick = LOCAL_COPY(next_arg(par, &par));
|
||||
if ((user = strchr(nick, '@')))
|
||||
*user++ = '\0';
|
||||
if (nick)
|
||||
{
|
||||
int i;
|
||||
|
||||
if ((user = strchr(nick, '@')))
|
||||
*user++ = '\0';
|
||||
|
||||
for (i = 0; i < get_max_fd()+1; i++)
|
||||
{
|
||||
if (!check_dcc_socket(i)) continue;
|
||||
if (idx == i) { s1 = get_socketinfo(i); break; }
|
||||
if (idx == i) { s1 = get_socket(i); break; }
|
||||
}
|
||||
if (!s1) return TCL_OK;
|
||||
s = find_dcc(nick, "chat", NULL, DCC_CHAT, 0, 1, -1);
|
||||
|
||||
Reference in New Issue
Block a user