Relief-1 / Relief1

Relief1 - Providing a complete Disaster Preparedness, Relief and Recovery System for use worldwide.
15 stars 6 forks source link

IRC-Bot: Show tweet level in the topic #10

Open thejh opened 12 years ago

thejh commented 12 years ago

Would be nice to have something like "tweet level: 2" (for magnitude 2, just an example) in the topic.

thejh commented 12 years ago

For this, the bot needs to be chanop, and for that, it needs to be registered.

AvianFlu commented 12 years ago

I don't understand what you mean. Are you talking about the volume? The volume is auto-set based on channel activity, and has a hard cap - the bot is allowed five tweets, and then gets one more tweet back every seven minutes, so to speak. It takes ten messages in the channel in a minute before the bot reaches zero volume. These numbers were chosen for a different twitter feed in a different channel, and can be tweaked in any way desired. The volume, however, updates too quickly for putting it in the topic to be realistic. We'd be seeing the topic change every time someone spoke.

thejh commented 12 years ago

I'm not talking about the output volume. I'm talking about the incoming volume level, e.g. "500 tweets per minute about earthquakes although 3 are normal" would get transformed to a volume level of log2(500/3), so the bot would put "Twitter emergency tweet volume: 7" or so in the topic.

AvianFlu commented 12 years ago

I understand. We're still talking about ~50 tweets a minute, so we need to decide how often we want the topic updated. Topic updates will take up a lot more visual space than the tweets did when the room is quiet.

thejh commented 12 years ago

Hmm, this is more complicated than I thought. :(

AvianFlu commented 12 years ago

Yeah, filtering good information out of a heavy twitter stream is non-trivial. Improving our list of tracking terms will help.

mmalecki commented 12 years ago

@AvianFlu First thing we should do should be to look for duplicates, and this should be easy.

AvianFlu commented 12 years ago

https://github.com/hookio/twitter/blob/master/lib/twitter.js#L147-162 is already in play with a distance threshold of 30 and a history of the last 100 tweets. We can certainly tighten the distance, and we can add checking for duplicate links, although the latter is made somewhat useless by shortlinking services. Any other thoughts?