From 141fc40a042625c800755605f72645191597dd73 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Sat, 11 Feb 2012 15:45:10 +0000 Subject: [PATCH] opme takes channel argument --- modules/admin.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/admin.js b/modules/admin.js index 4e51e4b..7e99ad9 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -10,7 +10,7 @@ var adminCommands = function(dbot) { }, 'opme': function(data, params) { - dbot.instance.send('MODE #42 +o ', dbot.admin); + dbot.instance.send('MODE ' + params[1] + ' +o ', dbot.admin); }, 'part': function(data, params) { @@ -80,6 +80,9 @@ var adminCommands = function(dbot) { }; return { + // These commands are implemented as their own listener so it can easily + // check whether the user is the admin, and so that the admin can't ban + // themselves and then not be able to rectify it... 'listener': function(data) { if(data.channel == dbot.name) data.channel = data.user;