projects
/
twirssi-net-twitter-lite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b8bd67a
)
Improve OAuth error message (patch from kiyose)
author
Dan Boger
<zigdon@irc.peeron.com>
Tue, 9 Feb 2010 18:30:24 +0000
(10:30 -0800)
committer
Dan Boger
<zigdon@irc.peeron.com>
Tue, 9 Feb 2010 18:30:24 +0000
(10:30 -0800)
twirssi.pl
patch
|
blob
|
history
diff --git
a/twirssi.pl
b/twirssi.pl
index 4f4ef642c0bfa8abcaf2270c34a93007e6ae273f..7147981a504f0644a8f0b69480792ac092dcb881 100644
(file)
--- a/
twirssi.pl
+++ b/
twirssi.pl
@@
-554,18
+554,15
@@
sub cmd_login {
eval { $url = $twit->get_authorization_url; };
if ($@) {
eval { $url = $twit->get_authorization_url; };
if ($@) {
- ¬ice(
-"ERROR: Failed to get OAuth authorization_url. Try again later."
- );
+ ¬ice( "ERROR: Failed to get OAuth authorization_url. " .
+ "Try again later.");
return;
}
return;
}
-
- ¬ice("Twirssi not autorized to access $service for $user.");
- ¬ice(
- "Please authorize at the following url, then enter the pin "
+ ¬ice( "Twirssi not autorized to access $service for $user.",
+ "Please authorize at the following url, then enter the pin",
+ "supplied with /twirssi_oauth $user\@$service <pin>",
+ $url
);
);
- ¬ice("supplied with /twirssi_oauth $user\@$service <pin>");
- ¬ice($url);
$oauth{pending}{"$user\@$service"} = $twit;
return;
$oauth{pending}{"$user\@$service"} = $twit;
return;
@@
-693,7
+690,7
@@
sub verify_twitter_object {
$poll = Irssi::timeout_add( &get_poll_time * 1000, \&get_updates, "" );
¬ice("Logged in as $user\@$service, loading friends list...");
&load_friends();
$poll = Irssi::timeout_add( &get_poll_time * 1000, \&get_updates, "" );
¬ice("Logged in as $user\@$service, loading friends list...");
&load_friends();
- ¬ice( "loaded friends: "
,
scalar keys %friends );
+ ¬ice( "loaded friends: "
.
scalar keys %friends );
if ( Irssi::settings_get_bool("twirssi_first_run") ) {
Irssi::settings_set_bool( "twirssi_first_run", 0 );
}
if ( Irssi::settings_get_bool("twirssi_first_run") ) {
Irssi::settings_set_bool( "twirssi_first_run", 0 );
}
@@
-1569,7
+1566,7
@@
sub monitor_child {
}
if ( not $failwhale and time - $last_poll > 60 * 60 ) {
}
if ( not $failwhale and time - $last_poll > 60 * 60 ) {
-
foreach my $whale
(
+
&ccrap
(
q{ v v v},
q{ | | v | v},
q{ | .-, | | |},
q{ v v v},
q{ | | v | v},
q{ | .-, | | |},
@@
-1578,10
+1575,7
@@
sub monitor_child {
q{ \\ a |},
q{ ',.__. ,__.-'/},
q{ '--/_.'----'`}
q{ \\ a |},
q{ ',.__. ,__.-'/},
q{ '--/_.'----'`}
- )
- {
- &ccrap($whale);
- }
+ );
$failwhale = 1;
}
$failwhale = 1;
}
@@
-1596,11
+1590,15
@@
sub debug {
}
sub notice {
}
sub notice {
- $window->print( "%R***%n @_", MSGLEVEL_PUBLIC );
+ foreach my $msg (@_) {
+ $window->print( "%R***%n $msg", MSGLEVEL_PUBLIC );
+ }
}
sub ccrap {
}
sub ccrap {
- $window->print( "%R***%n @_", MSGLEVEL_CLIENTCRAP );
+ foreach my $msg (@_) {
+ $window->print( "%R***%n $msg", MSGLEVEL_CLIENTCRAP );
+ }
}
sub update_away {
}
sub update_away {
@@
-1990,10
+1988,9
@@
if ($window) {
);
Irssi::signal_add_last( 'complete word' => \&sig_complete );
);
Irssi::signal_add_last( 'complete word' => \&sig_complete );
- ¬ice(" %Y<%C(%B^%C)%N TWIRSSI v%R$VERSION%N");
- ¬ice(" %C(_(\\%N http://twirssi.com/ for full docs");
- ¬ice(
- " %Y||%C `%N Log in with /twitter_login, send updates with /tweet");
+ ¬ice(" %Y<%C(%B^%C)%N TWIRSSI v%R$VERSION%N",
+ " %C(_(\\%N http://twirssi.com/ for full docs",
+ " %Y||%C `%N Log in with /twitter_login, send updates with /tweet");
my $file = Irssi::settings_get_str("twirssi_replies_store");
if ( $file and -r $file ) {
my $file = Irssi::settings_get_str("twirssi_replies_store");
if ( $file and -r $file ) {