Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
7 lib/App/Twirc/Manual.pod
@@ -130,6 +130,11 @@ option to C<&log>, then you can join the C<&log> channel and see the copious
debug messages that C<twirc> generates. This may be useful for trouble
shooting or problem reporting.
+=item log_level
+
+Twirc supports C<log_level> values OFF, FATAL, ERROR, WARN, INFO, DEBUG, and
+TRACE. The default is WARN.
+
=item state_file
File used to store state information between sessions, including Twitter OAuth
@@ -174,7 +179,7 @@ Is a shortcut for:
post @twirc you make twitter usable!
-C<twirc> uses the Twitter User Streams API to recieve updates in real-time.
+C<twirc> uses the Twitter User Streams API to receive updates in real-time.
Use IRC private messaging to send direct messages. In C<irssi>:
View
16 lib/POE/Component/Server/Twirc.pm
@@ -294,17 +294,6 @@ sub twitter_error {
$self->bot_notice($self->irc_channel, "Twitter error: $text");
};
-my $zero_id = "0" x 19;
-sub id_gt { id_cmp(@_) > 0 }
-
-sub id_cmp {
- # Twitter now uses 64 bit ints for status IDs, so we use id_str to avoid trouble on
- # 32-bit platforms. So we do string comparison on IDs after zero padding them to their
- # maximum length.
- my ( $a, $b ) = map substr($zero_id . $_, -19), @_;
- $a cmp $b;
-}
-
# set topic from status, iff newest status
sub set_topic {
my ($self, $text) = @_;
@@ -456,6 +445,7 @@ sub connect_twitter_stream {
on_connect => sub {
$self->twitter_stream_watcher($w);
$self->log->info('Connected to Twitter');
+ $self->bot_notice($self->irc_channel, "Twitter stream connected");
$self->reconnect_delay(0);
},
on_eof => sub {
@@ -464,7 +454,6 @@ sub connect_twitter_stream {
$self->connect_twitter_stream if $self->has_twitter_stream_watcher;
},
on_error => sub {
- undef $w;
my $e = shift;
$self->log->error("on_error: $e");
$self->bot_notice($self->irc_channel, "Twitter stream error: $e");
@@ -685,8 +674,7 @@ event ircd_daemon_quit => sub {
$self->log->trace("[ircd_daemon_quit]");
return unless my($nick) = $user =~ /^([^!]+)!/;
- return if $self->get_user_by_nick(lc $nick);
- return if $nick eq $self->irc_botname;
+ return unless $nick eq $self->irc_nickname;
$self->joined(0);
$self->yield('poco_shutdown');
View
28 t/99-pod_coverage.t
@@ -21,23 +21,47 @@ plan tests => 2;
pod_coverage_ok(
'POE::Component::Server::Twirc',
{ trustme => [ map qr/^$_$/, qw/
- DEFAULT
- START
+ add_follower_id
add_user
+ are_followers_stale
bot_notice
bot_says
+ BUILD
+ connect_twitter_stream
+ DEFAULT
delete_user
+ followers_stale_after
+ formatted_status_text
+ friends_stale_after
+ get_authenticated_user
get_friends_timeline
get_replies
get_statuses
handle_favorite
+ is_follower_id
+ is_user_stale
+ max_reconnect_delay
merge_replies
nicks_alternation
+ on_event_block
+ on_event_favorite
+ on_event_follow
+ on_event_list_member_added
+ on_event_list_member_removed
+ on_event_retweet
+ on_event_unblock
+ on_event_unfavorite
post_ircd
+ remove_follower_id
set_topic
sort_unique_statuses
+ START
+ status_text_too_long
twitter
twitter_error
+ twitter_id
+ twitter_screen_name
+ twitter_stream_timeout
/],
},
'POE::Component::Server::Twirc coverage'
View
3  t/99-pod_spelling.t
@@ -38,9 +38,11 @@ configfile
favoriting
irc
irssi
+OAuth
plugins
redisplaying
retweet
+retweeting
spammers
timeline
timelines
@@ -48,4 +50,5 @@ twirc
un
unfollow
username
+verifier
whois

No commit comments for this range

Something went wrong with that request. Please try again.