Increase size of buffer to handle maximum-length topics in status_topic().
This affects the maximum length of the topic that can be displayed by the %- status format. No topic can be longer than IRCD_BUFFER_SIZE, so use that. Reported by oxy. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@508 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
[Changes 1.2c01]
|
[Changes 1.2c01]
|
||||||
|
|
||||||
|
* Allow %- status format to handle max-length topics (reported by oxy). (caf)
|
||||||
|
|
||||||
* Add /FSET WOHIS_LOGGEDIN for services login info on hybrid, ratbox and
|
* Add /FSET WOHIS_LOGGEDIN for services login info on hybrid, ratbox and
|
||||||
ircu. (caf)
|
ircu. (caf)
|
||||||
|
|
||||||
|
|||||||
@@ -1301,7 +1301,8 @@ static char my_buffer[MY_BUFFER/2+1];
|
|||||||
|
|
||||||
static char *status_topic (Window *window)
|
static char *status_topic (Window *window)
|
||||||
{
|
{
|
||||||
static char my_buffer[MY_BUFFER+41];
|
static char my_buffer[IRCD_BUFFER_SIZE];
|
||||||
|
|
||||||
if (window && window->current_channel && window->wset->topic_format)
|
if (window && window->current_channel && window->wset->topic_format)
|
||||||
{
|
{
|
||||||
ChannelList *chan;
|
ChannelList *chan;
|
||||||
@@ -1315,11 +1316,11 @@ static char my_buffer[MY_BUFFER+41];
|
|||||||
double_quote(t, "()[]$\"", t2);
|
double_quote(t, "()[]$\"", t2);
|
||||||
else
|
else
|
||||||
strcpy(t2, t);
|
strcpy(t2, t);
|
||||||
snprintf(my_buffer, MY_BUFFER, window->wset->topic_format, stripansicodes(t2));
|
snprintf(my_buffer, sizeof my_buffer, window->wset->topic_format, stripansicodes(t2));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
strlcpy(my_buffer, "No Topic", sizeof my_buffer);
|
strlcpy(my_buffer, "No Topic", sizeof my_buffer);
|
||||||
return(my_buffer);
|
return my_buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RETURN_EMPTY;
|
RETURN_EMPTY;
|
||||||
|
|||||||
Reference in New Issue
Block a user