psyced/place/heise.c

39 lines
1.3 KiB
C
Raw Permalink Normal View History

#include <net.h>
#define SILENCE
#define NAME "Heise"
/* this is an example for a RSS-based newsfeed room for PSYC
* just copy it and enter your favourite RSS URL. you can also
* specify a RESET_INTERVAL in minutes. please don't run your
* own news gateway if one already exists - PSYC packets are
* much much more efficient than polling RSS files, therefore
* if you like getting heise news, simply /subscribe or /enrol
* to psyc://psyced.org/@heise (until heise catch the
* drift and provide such a PSYC news service themselves ;))
*
* by the way, RSS is not the only newsfeed interface to PSYC -
* in the perlpsyc distribution is an email filter script which
* parses dpa news coming by email and creates PSYC notices out
* of it. the best idea would obviously be if publishing tools
* learned how to notify changes directly to a PSYC newsroom.
* it's really simple.. just connect and dump a few lines!
*/
#ifdef BRAIN
# define NEWSFEED_RSS "http://www.heise.de/newsticker/heise.rdf"
# define RESET_INTERVAL 3 // heise is very popular and lively
#else
# define CONNECT_DEFAULT
#endif
#include <place.gen>
#ifdef BRAIN
publish(link, headline, channel) {
if (strstr(link, "/from/rss", -12) != -1)
link = link[0 .. <12];
return ::publish(link, headline, channel);
}
#endif