Permalink
Browse files

make the weather plugin have a method for deciding whether to do respond

  • Loading branch information...
1 parent d63a83e commit 681da7b21dcf928f6ca97762e063d3dc993c39c5 @obra committed Aug 6, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 app/scripts/plugins/weather.js
@@ -3,6 +3,9 @@ define(['plugins/weather'], function() {
return {
name: 'weather',
reply: function(args) {
+ if (!this.handleQuery(args)) {
+ return [0, "No weather word"]
+ }
jQuery = args.jQuery;
var url = 'http://www.google.com/ig/api?weather=San%20Francisco,%20CA';
@@ -16,6 +19,9 @@ define(['plugins/weather'], function() {
}
});
return [1, output];
+ },
+ handleQuery: function(args) {
+
}
}
});

0 comments on commit 681da7b

Please sign in to comment.