Allow $mychannels() to query a window attached to a different server
Otherwise, there's really no point in passing this function a window refnum at all.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
[Changes 1.2.2]
|
||||
|
||||
* Allow $mychannels() to query a window attached to a different server. (caf)
|
||||
|
||||
* Fix crash when passing $mychannels() a non-existent window refnum. (caf)
|
||||
|
||||
* Remove dll_functions, dll_numeric, dll_commands, dll_variable, dll_ctcp,
|
||||
|
||||
@@ -1732,14 +1732,13 @@ extern char * BX_create_channel_list(Window *window)
|
||||
ChannelList *chan;
|
||||
char buffer[BIG_BUFFER_SIZE];
|
||||
|
||||
for (*buffer = 0, chan = get_server_channels(window->server); chan; chan = chan->next)
|
||||
{
|
||||
if (chan->server == from_server)
|
||||
buffer[0] = 0;
|
||||
|
||||
for (chan = get_server_channels(window->server); chan; chan = chan->next)
|
||||
{
|
||||
strlcat(buffer, chan->channel, sizeof buffer);
|
||||
strlcat(buffer, space, sizeof buffer);
|
||||
}
|
||||
}
|
||||
return m_strdup(buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user