badlop / neutron

Automatically exported from code.google.com/p/neutron
GNU General Public License v2.0
0 stars 0 forks source link

Sometimes neutron unexpectedly adds footer to a chatlog page #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run neutron.
2. Join some conference.

What is the expected output? What do you see instead?
See normal log.
Instead neutron inserts footer in the middle of page.

What version of the product are you using? On what operating system?
last from svn

Please provide any additional information below.
http://misc.myths.ru/chatlogs/xkcd@conference.jabber.ru/2009/1/27.html
Here is the sample.
At [11:08] font changes.
This happend because neutron insterted folowing:
</code>
</body>
</html>
after [10:36]

Original issue reported on code.google.com by Yash...@gmail.com on 27 Jan 2009 at 1:31

GoogleCodeExporter commented 9 years ago
We cannot reproduce it quite well. But it seems that this happens after bot 
recieves
a private message.

Original comment by Yash...@gmail.com on 27 Jan 2009 at 2:28

GoogleCodeExporter commented 9 years ago
It looks like we can probably fix it by replacing every line in plugins/log.py 
that
accesses LOG_FILENAME_CACHE with `source` to access it with `(source, type)`. 
This
will prevent neutron from thinking private and public messages have the same 
cache
key even though they are in different files. If we make this change, though, it 
will
invalidate existing cache files, so anyone who updates will have to remove their
dynamic/logcache.txt file.

Original comment by mikemi...@gmail.com on 28 Jan 2009 at 2:06

GoogleCodeExporter commented 9 years ago
Thanks. I will try to do this.
And report on results.

Original comment by Yash...@gmail.com on 28 Jan 2009 at 10:34

GoogleCodeExporter commented 9 years ago
Here is my patch. 
I'll test it.

Original comment by Yash...@gmail.com on 28 Jan 2009 at 12:11

Attachments:

GoogleCodeExporter commented 9 years ago
By the way, the problems seems to be more serious.

This patch seems to solve a bug. But the problem is that bot cannot see a 
difference
between private message on channel and private message from another JID.

So this leads to the following: in private chatlog (which comes from private 
messages
on channel) it's impossible to determine who sent the private message.

for xkcd channel log looks like this:
[10:40] <xkcd> !help
[10:44] <xkcd> quote
[13:51] <xkcd> тест
[13:52] <xkcd> тест
[13:54] <xkcd> help
[13:54] <neutron> Type !commands for a list of commands.
[13:55] <xkcd> два
[13:56] <xkcd> три
[13:58] <xkcd> !commands
...
(and my nickname is not xkcd, it's channel name)

But anyway I think it's more important to apply this patch first.

Original comment by Yash...@gmail.com on 28 Jan 2009 at 12:40

GoogleCodeExporter commented 9 years ago
Great! I added your patch to svn in trunk.

I think maybe the reason the private messages aren't getting the right JID is 
that
get_true_jid in neutron.py must not be working correctly with groupchats anymore
(maybe the protocol or server implementation changed since it was written). 
These
JIDs should be set in neutron.py around lines 439-456.

Mike

Original comment by mikemi...@gmail.com on 31 Jan 2009 at 7:13