zerowidth / camper_van

A Campfire to IRC bridge
MIT License
129 stars 25 forks source link

Some messages are recognized as commands which are not recognized. #19

Closed artkrz closed 11 years ago

artkrz commented 12 years ago

Basically we have a Pager user sending messages to our room but they are not recognized:

│00:21:01 campfire =!= | irc: command "Cloud" not found: │00:21:01 campfire =!= | Cloud server 25 - https://foo.com/servers/5 - Unreachable Mon Oct 29 00:17:55 UTC 2012 │00:21:01 campfire =!= | irc: command "http://foo..com/pages/24312" not found: │00:21:01 campfire =!= | http://foo.com/pages/24312

Here's HTML from campfire website:

Campfire HTML

Is this something that can be fixed ?

zerowidth commented 12 years ago

I don't have access to the html from campfire. Could you send the camper_van logs as well as the relevant portion of the campfire transcript?

artkrz commented 12 years ago

Here you go:

<tr class="sound_message message user_285506" id="message_719032768" style=""><td class="person"><span class="author" data-avatar="http://asset0.37img.com/global/missing/avatar.gif?r=3" data-email="pager@....com" data-name="Pager">Pager</span></td>
  <td class="body" data-sound="trombone"><div class="body">
    <a href="#" onclick="chat.soundmanager.playMessage(this); return false;"><img alt="Sound" height="12" src="/images/sound.png?1351870051" width="12" /></a>
    plays a sad trombone
  </div></td>
</tr>

<tr class="text_message message user_285506" id="message_719032770" style=""><td class="person"><span class="author" data-avatar="http://asset0.37img.com/global/missing/avatar.gif?r=3" data-email="pager@....com" data-name="Pager" style="display:none">Pager</span></td>
  <td class="body">
    <div class="body">production
Multi-type server - 10.1.1.1 - <a href="https://....com/servers/1" target="_blank">https://....com/servers&hellip;</a> - responding to ping, but not SSH Fri Nov 02 06:32:53 UTC 2012

<a href="https://....com/pages/24436" target="_blank">https://....com/pages/24436</a>
</div>
    <span class="star ">
  <strong></strong>
</span>
  </td>
</tr>
artkrz commented 12 years ago

Could not find camper_van logs but my IRC client says something like this:

2012-11-02 06:32:53 =!= irc: command "https://....com/pages/24436" not found: 2012-11-02 06:32:53 =!= https://....com/pages/24436 2012-11-02 06:32:53 =!= irc: command "Multi-type" not found: 2012-11-02 06:32:53 =!= Multi-type server server 1 - 10.1.1.1 - https://....com/servers/1 - responding to ping, but not SSH Fri Nov 02 06:32:53 UTC 2012

zerowidth commented 12 years ago

Unfortunately, that isn't enough detail for me to know what's going on. I'd have to see the actual IRC commands that camper_van is sending to your irc client in order for me to know what or how certain content is being misinterpreted. If you see this again, could you show me the camper van logs and corresponding client errors?

artkrz commented 12 years ago

Will do.

zerowidth commented 11 years ago

Closing pending further detail.

yorickpeterse commented 11 years ago

I've been experiencing similar issues. The problem seems random, usually occurring on normal text. For example, I've had co-workers paste in a quote and then camper_van went bananas thinking part of that text were IRC commands.

Sadly my log files don't contain any information on the specific errors, even though the logging level is set to log error messages. My IRC client (Weechat) however shows the following in my status buffer (the text is Dutch):

15:21:00 campfire =!= | irc: command "NL:" not found:
15:21:00 campfire =!= | NL: Dit behoort tot de mogelijkheden!
15:21:00 campfire =!= | irc: command "Br:" not found:
15:21:00 campfire =!= | Br: Dè ken!
15:21:00 campfire =!= | irc: command "NL:" not found:
15:21:00 campfire =!= | NL: Hieromtrent kunnen wij u geen enkele zekerheid bieden!
15:21:00 campfire =!= | irc: command "Br:" not found:
15:21:00 campfire =!= | Br: We witten ut nie!
15:21:00 campfire =!= | irc: command "NL:" not found:
15:21:00 campfire =!= | NL: Zou u dat nog eens willen herhalen?

Looking back in the Campfire transcripts it seems that text in the format of lorem ipsum: dolor sit amet causes it, though I have a feeling that there's more going on (e.g. malformed Campfire messages).

zerowidth commented 11 years ago

Can you see if you can reproduce this with --log-level=debug? I need to see what camper_van is sending to your irc client.

yorickpeterse commented 11 years ago

Just tried a bit of text that caused this particular issue last time using the Campfire web client. Sadly I can't reproduce it that way which leads me to believe it might be an issue caused by using other clients. In my case my co-workers all use "Flint" which is an OS X client for Campfire.

yorickpeterse commented 11 years ago

Just had this issue re-appear after the following message was sent:

2013-02-25T16:33:09+00:00 stewie campfire[18576]: 2013-02-25 16:33:09 18576 DEBUG CamperVan : irc <- :REDACTED!REDACTED@campfire PRIVMSG #backchannel :I dont encounter any problems…
2013-02-25T16:33:09+00:00 stewie campfire[18576]: Guys, will work from home tomorrow, have to write for TravelNext and

Note that the newline between the two messages is not something I added, it was written to the log file in this way. Perhaps it's possible that camper_van barfs whenever a newline is used in a certain place or when \r\n is used.

zerowidth commented 11 years ago

Bingo. I bet that's it. I'll take a look at the line splitting code.

yorickpeterse commented 11 years ago

Nice work! I'll give this a try to see if it solves the issue.