Permalink
Browse files

added IsItUp

  • Loading branch information...
1 parent 1b101b8 commit cb80faf407232435b14049ebced92dd423b5112b @mrshu mrshu committed Apr 29, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 lib/DDG/Spice/IsItUp.pm
View
@@ -0,0 +1,20 @@
+package DDG::Spice::IsItUp;
+
+use DDG::Spice;
+
+spice is_cached => 0;
+
+triggers query_lc => qr/^(:?is\s)?([a-z0-9\-\.]+\.[a-z]{2,4})(:?\sup\s*(:?\?)?)?$/;
+
+spice to => 'http://isitup.org/$1.json';
+
+handle matches => sub {
+ if ($1 && $2 && $3) {
+ return $2;
+ } elsif ($2 && $3) {
+ return $2;
+ }
+ return;
+};
+
+1;

0 comments on commit cb80faf

Please sign in to comment.