Skip to content

Instantly share code, notes, and snippets.

@mikelietz
Created August 3, 2011 00:31
Show Gist options
  • Select an option

  • Save mikelietz/1121612 to your computer and use it in GitHub Desktop.

Select an option

Save mikelietz/1121612 to your computer and use it in GitHub Desktop.
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