chatbotScript only sees private messages

I have got an ASH script (surprising, isn't it) that I would like to use as a chatbot script. The problem is, it only ever seems to fire for private messages. Regardless of what account I use it with and whether I am in GUI or CLI mode, the function

Code:
void main(string sender, string message, string channel)
{
        print("DEBUG: ch=" + channel + " se=" + sender);
        // [snip - here be actual script]
}

only prints the debug messages if channel is an empty string. No channel messages, no events.

I have double-checked and confirmed that in both the GUI and the CLI case I do initialise chat: the accounts I have run tests on do show as present in chat when I run /whois on them, "update" requests from clannies do get processed, and of course as I have already mentioned the script does see private messages.

Of note is the fact that when run by a clannie, the very same script works fine. This might imply that some Mafia setting interferes with chat processing, unfortunately our configurations are vastly different so it is hard to identify the culprit. Having had a look at ChatManager source code has no revealed anything obvious either.

Any ideas, guys? Thank you in advance, the only idea I have still got is to wipe my Mafia settings and start from scratch - and I would hate to have to manually reset many years' worth of fine-tuning.

PS. I have tried this on r18370, r18453 and r18471.
 
Last edited:

fronobulax

Developer
Staff member
our configurations are vastly different so it is hard to identify the culprit.

Sometimes a good diff utility applied to the settings files can help. I am partial to a side by side display and just jumping from difference to difference. I know a priori that some settings won't be of interest, even if they differ, so it can be only a few minutes. There is also a script out there that will help you find settings which are not at the default which might turn up something.

But as noted elsewhere, check the KoL settings first.
 

Darzil

Developer
Crazy thought (based on half remembered chat on another thread), is there a space in the name of the person it doesn't work for?
 
I have figured it out - it was due to greenScreenProtection having been set to true in the global settings of my instance of Mafia. At first I thought that option implemented rate limiting of some sort (clearly I didn't look at the source code of CharManager carefully enough) but I when I found out what the corresponding preference-panel description was, all became clear.
 
Top