Created
August 3, 2011 00:31
-
-
Save mikelietz/1121612 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var NerdieInterface = require('nerdie_interface.js') | |
| , nerdie = null | |
| , prefix = null | |
| , config = null; | |
| function Jira_Issue(parentNerdie) { | |
| config = (parentNerdie.config.plugins.jira_issue) ? parentNerdie.config.plugins.jira_issue : {}; | |
| this.pluginInterface = new NerdieInterface(parentNerdie, this); | |
| nerdie = parentNerdie; | |
| } | |
| Jira_Issue.prototype.init = function () { | |
| this.pluginInterface.registerPattern(/.*(?:terry\s+chay|tychay)/i, this.getChayism); | |
| var pattern = "/^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$/"; | |
| this.pluginInterface.registerPattern( pattern, | |
| this.jira_issue | |
| ); | |
| }; | |
| Jira_Issue.prototype.jira_issue = function(msg) { | |
| msg.say( "it works?" ); | |
| msg.say( msg.matches[1] ); | |
| }; | |
| module.exports = Jira_Issue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment