mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 20:39:25 +01:00
Added some verbosity and made rquote better.
This commit is contained in:
parent
dc1a44b9cb
commit
97e5a8fc08
6
run.js
6
run.js
@ -31,6 +31,7 @@ instance.addListener('JOIN', function(data) {
|
|||||||
instance.addListener('KICK', function(data) {
|
instance.addListener('KICK', function(data) {
|
||||||
if(data.kickee == name) {
|
if(data.kickee == name) {
|
||||||
instance.join(data.channel);
|
instance.join(data.channel);
|
||||||
|
instance.say(data.channel, 'Thou shalt not kick ' + name);
|
||||||
} else {
|
} else {
|
||||||
instance.say(data.channel, data.kickee + '--');
|
instance.say(data.channel, data.kickee + '--');
|
||||||
}
|
}
|
||||||
@ -60,9 +61,11 @@ instance.addListener('PRIVMSG', function(data) {
|
|||||||
switch(params[0]) {
|
switch(params[0]) {
|
||||||
case 'join':
|
case 'join':
|
||||||
instance.join(params[1]);
|
instance.join(params[1]);
|
||||||
|
instance.say(admin, 'Joined ' + params[1]);
|
||||||
break;
|
break;
|
||||||
case 'part':
|
case 'part':
|
||||||
instance.part(params[1]);
|
instance.part(params[1]);
|
||||||
|
instance.say(admin, 'Left ' + params[1]);
|
||||||
break;
|
break;
|
||||||
case 'reload':
|
case 'reload':
|
||||||
instance.say(admin, 'Reloading DB.');
|
instance.say(admin, 'Reloading DB.');
|
||||||
@ -109,7 +112,8 @@ instance.addListener('PRIVMSG', function(data) {
|
|||||||
instance.say(data.channel, db.lampPuns.random());
|
instance.say(data.channel, db.lampPuns.random());
|
||||||
break;
|
break;
|
||||||
case '~rq':
|
case '~rq':
|
||||||
instance.say(data.channel, Object.values(db.quotes).random());
|
var rQuote = Object.keys(db.quotes).random();
|
||||||
|
instance.say(data.channel, rQuote + ': ' + db.quotes[rQuote]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user