Permalink
Browse files

tidied

  • Loading branch information...
1 parent 5826bc0 commit 57a8d6636591348e28f9a7231cf3e9d34277388e @aanoaa committed Jan 2, 2013
Showing with 8 additions and 4 deletions.
  1. +2 −2 lib/Hubot/Adapter/Irc.pm
  2. +6 −2 lib/Hubot/Scripts/shorten.pm
View
4 lib/Hubot/Adapter/Irc.pm
@@ -172,7 +172,7 @@ sub close {
sub exist {
my ( $self, $user, $nick ) = @_;
- return $self->findUser($user->{room}, $nick);
+ return $self->findUser( $user->{room}, $nick );
}
sub createUser {
@@ -195,7 +195,7 @@ sub createUser {
sub findUser {
my ( $self, $channel, $nick ) = @_;
- return $self->irc->nick_modes($channel, $nick);
+ return $self->irc->nick_modes( $channel, $nick );
}
sub checkCanStart {
View
8 lib/Hubot/Scripts/shorten.pm
@@ -52,9 +52,13 @@ sub load {
### <meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
### [FILTER] - <script type="text/javascript" src="http://news.chosun.com/dhtm/js/gnb_news_2011.js" charset="euc-kr"></script>
$body =~ s{\r\n}{\n}g;
- my @charset_lines = grep { $_ !~ /script/ } grep { /charset/ } split /\n/, $body;
+ my @charset_lines =
+ grep { $_ !~ /script/ } grep { /charset/ } split /\n/,
+ $body;
my $charset;
- if ( "@{[ @charset_lines ]}" =~ /charset=(?:'([^']+?)'|"([^"]+?)"|([a-zA-Z0-9_-]+)\b)/ ) {
+ if ( "@{[ @charset_lines ]}" =~
+ /charset=(?:'([^']+?)'|"([^"]+?)"|([a-zA-Z0-9_-]+)\b)/ )
+ {
$charset = lc( $1 || $2 || $3 );
}

0 comments on commit 57a8d66

Please sign in to comment.