Skip to content

Commit

Permalink
modules: add testlog module
Browse files Browse the repository at this point in the history
disabled by default since it allows injecting errors basically
  • Loading branch information
euank committed Jun 26, 2017
1 parent 7e642e7 commit bf99431
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"channelPrefixes": "&#",
"messageSplit": 512,
"moduleFolders": ["modules"],
"disabledModules": ["github"],
"disabledModules": ["github", "testlog"],
"datafolder": "data",
"tmpfolder": "tmp",
"configfolder": "conf"
Expand Down
13 changes: 13 additions & 0 deletions modules/testlog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports.name = "sirc-testlog";
module.exports.command = "testlog";


module.exports.run = function(remainder, parts, reply, command, from, to, text, raw, regex) {
if(p.length == 2) {
this.log[p[0]](p[1]);
reply("logged at " + p[0]);
} else {
this.log.info(r);
reply("logged at info");
}
};

0 comments on commit bf99431

Please sign in to comment.