XChat 2.8.6 on linux
When certain text events occur there may be NULL elements between non-NULLs. If there is, then the elements after the NULL element are unavailable to the script. The change is needed to the Util_BuildList function in python.c; currently that function scans forward until it finds a NULL and assumes that to be the end of the data.
An example of when a NULL may precede a non-NULL is when a QUIT occurs with no quit message. In this case the host is unavailable to the script because the word data only contains the nickname (normally the word = [nickname, reason, host], in this case it will just be [nickname]).
The following is a comment from the equivalent section of the perl plugin (print_cb in perl.c), which illuminates the problem and solution:
/* need to scan backwards to find the index of the last element since some
events such as "DCC Timeout" can have NULL elements in between non NULL
Log in to post a comment.