This is a major problem, and drawback of the script.
There is no simple way of making this detection, without adding code that will slow the bot down even more.
By taking a string, you can remove the spaces with one of these two
Code: Select all
set string [join [split $string] {}]
regsub -all -- " " $string "" string
However, this will prevent some of the better matching strings.
IE
using "*join #*" would no longer be valid, as there is a space in the string, which would never be there.
There is one possibility, of using new matching code, but this does not exist as of yet.
The current wildcards, are those of the Tcl "string match" command. These are * and ? (there is a third, which wouldn't work in this situation either, though is perfectly valid for a match, these can be looked at in detail at
this page).
Eggdrop provides it's own matching system (uses the * and ?, plus two others % and ~. These are documented at the base of tcl-commands.doc), though this is still not suffiecient for this kind of matching.
It would need to be a new char, that would have one of the following matching properties
Match 0 or 1 characters of any type.
This would require that a second match take place, to determine in the matching character is a infact a space.
Match 0 or 1 whitespaces
This would be the better solution, as it would only require one match.
Tcl would simply not be fast enough to process such matching, and it would need implimentation is C.