Bug - Cannot Reproduce Automatic Chat Spam?

Underfoot

New member
This is a bit of a long shot, and a rare occurrence, but when it occurs the consequences can be devastating.
On two occasions, I've had KoLmafia spam "... ..." into the chat. I can't figure out what I typed just before this occurred, but it's likely that it included a single line containing just "...", and then a line containing other text.

Now, these occurrences are *very* rare! How rare?
The two documented occurrences I have are November 7th, 2011, and December 4th, 2014.
What version I was using in November 2011, I don't know. The current version I'm using is v16.1
I'll attach relevant sections of the chat logs in a second post.
 

Underfoot

New member
Excerpt: 20111107_underfoot_[veteran].html

[06:16] Mr_A hugs Gnocci good night.
[06:17] Gnocciwhore: *hugs*
[06:23] Underfoot: Hm. I typed a bunch of Ns. ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Underfoot: ... ...
[06:23] Emhgee Personal Shopper: I think not.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 54 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 51 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 51 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 51 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 51 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 51 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 50 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 50 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 50 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 50 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 50 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 50 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 49 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 49 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 49 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 49 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 49 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 48 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 48 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 48 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 48 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 48 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 47 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 47 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 47 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 47 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 47 seconds.
[06:23] You have been banned from the chat. Your chat privileges will be reinstated in 1 hour 59 minutes 46 seconds.
[06:23] Stony Porker: What the fuck? >_>
[06:23] AvangionQ: the hell ...
[06:23] AvangionQ: that just doesn't happen in /vet
[06:23] Stony Porker: You know better than that, Underfoot. :|
[06:23] Emhgee Personal Shopper: Ive seen it once before. I forget who it was -

Evidently, the rate of spammed messages can be as fast as 5 per second.
 

Underfoot

New member
Excerpt: 20141204_underfoot_[veteran].html

[14:43] El Capitan: Hey
[14:44] sleepy G: is for horses?
[14:44] sleepy G: thank you TheGiver.. )
[14:45] Flurry: That doesn't work so well in typed text...
[14:46] Flurry: Ooh! Thanks, TheGiver!
[14:46] sleepy G: yeah.. doesnt really work well face to face either
[14:46] sleepy G: how about a "Howdy!" instead?
[14:49] sleepy G: woo.. 900 coins-spiracy
[15:39] Underfoot: YOU'RE for horses
[15:39] New message received from TheGiver
[15:45] Underfoot: ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: um
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... ...
[15:45] Underfoot: ... The ...
[15:45] Underfoot: ... auto-giver script is

And then I hit Alt-F4
 

Veracity

Developer
Staff member
You are using the chat GUI, right?

KoL has a limit of 256 character per line of chat. KoLmafia will allow you type a much longer line and will split it into multiple chat requests. When it does so, it will look like this:

This is actually ...
... a very long line which KoLmafia ...
... split in to three lines.

It looks like that process went wrong, some how.

Somebody should look at the algorithm in ChatSender.getGrafs. Here it is, for your amusement.

Code:
		String command = "";
		String splitter = " ";
		String prefix = "... ";
		String suffix = " ...";

		if ( message.startsWith( "/" ) )
		{
			int spaceIndex = message.indexOf( " " );

			if ( spaceIndex != -1 )
			{
				command = message.substring( 0, spaceIndex ).trim();
				message = message.substring( spaceIndex ).trim();
			}
			else
			{
				command = message.trim();
				message = "";
			}
		}

		String graf;

		int maxPiece = 255 - command.length() - suffix.length();

		while ( message.length() > maxPiece )
		{
			int splitPos = message.lastIndexOf( splitter, maxPiece );
			if ( splitPos <= prefix.length() )
			{
				splitPos = maxPiece;
			}

			graf = ChatSender.getGraf( contact, command + " " + message.substring( 0, splitPos ) + suffix );

			if ( graf != null )
			{
				grafs.add( graf );
			}

			message = prefix + message.substring( splitPos + splitter.length() );
		}

		graf = ChatSender.getGraf( contact, command + " " + message );

		if ( graf != null )
		{
			grafs.add( graf );
		}
 

Underfoot

New member
Yes, I'm using the chat GUI.

Is it possible that backspaces are somehow being parsed? I noticed that the prefix is "... " and the suffix is " ...", but the chat messages have only one space between.

Also, this is a tough thing to test, as the only channel I can think of that one could have to oneself is /clan, which tends to work differently...
 

Bale

Minion
I think that /talkie also works differently, but /challenge is often quiet and if you preface any testing by announcing that you're testing mafia by encoding "... ..." to mean "butts" then you are arguably on topic.

You don't have the channel to yourself, but anyone there will love it and the moderation is next to non-existent.
 

lostcalpolydude

Developer
Staff member
I've seen someone else have a message repeated lots of times too, in a PM to me. There was no ... or anything special-looking in the message, and I'm sure they weren't running a chat script. I don't think I have any other relevant info about that occurrence though.
 
Top