Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Commit

Permalink
say command
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Mar 4, 2012
1 parent c43e60d commit 04da330
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion brains.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ commands.say = function (m, who, what, where, words) {
if (!words.length)
return respond.call(this, who, who, "Say where? (#channel or username)")

respond.call(this, who, who, JSON.stringify(m))
// the thing to say is everything after the first two words.
var msg = m.what

respond.call(this, who, who, msg)
}

commands.bomb = function (m, who, what, where, words) {
Expand Down Expand Up @@ -384,6 +387,7 @@ function handleMsg (m) {
if (atMe) {
what = what.substr(this.nick.length).replace(/^[^a-zA-Z0-9]+/, '')
}
m.what = what
var words = what.toLowerCase()
.replace(/['"“”‘’]/g, "")
.replace(/\s+/g, " ")
Expand Down

0 comments on commit 04da330

Please sign in to comment.