Skip to content

Commit

Permalink
tidied
Browse files Browse the repository at this point in the history
  • Loading branch information
aanoaa committed Jan 2, 2013
1 parent 5826bc0 commit 57a8d66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Hubot/Adapter/Irc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
8 changes: 6 additions & 2 deletions lib/Hubot/Scripts/shorten.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down

0 comments on commit 57a8d66

Please sign in to comment.