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:
parent
a028aebdb9
commit
3ec950a7d7
|
@ -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,
|
||||
|
|
|
@ -1731,14 +1731,13 @@ extern char * BX_create_channel_list(Window *window)
|
|||
{
|
||||
ChannelList *chan;
|
||||
char buffer[BIG_BUFFER_SIZE];
|
||||
|
||||
buffer[0] = 0;
|
||||
|
||||
for (*buffer = 0, chan = get_server_channels(window->server); chan; chan = chan->next)
|
||||
for (chan = get_server_channels(window->server); chan; chan = chan->next)
|
||||
{
|
||||
if (chan->server == from_server)
|
||||
{
|
||||
strlcat(buffer, chan->channel, sizeof buffer);
|
||||
strlcat(buffer, space, sizeof buffer);
|
||||
}
|
||||
strlcat(buffer, chan->channel, sizeof buffer);
|
||||
strlcat(buffer, space, sizeof buffer);
|
||||
}
|
||||
return m_strdup(buffer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue