robotirc

Multifonction IRC bot written in Node.js
Log | Files | Refs | README | LICENSE

commit 98249a292036cc731a78bcdf36764a85e524696d
parent a4405b310b4e5f9116f5cc22b9d462b96e5866f5
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Fri,  3 Jan 2014 00:39:38 +0100

Handling private messages

Diffstat:
Mlib/robotirc.js | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/robotirc.js b/lib/robotirc.js @@ -54,6 +54,10 @@ client.addListener('ctcp-version', function(from, to, message) { client.addListener('message', function(from, to, message) { var params = message.split(' ').slice(1).join(' '); + if (to == client.nick) { // Handling private messages + to = from; + } + /**************************************************************[ !help ]**/ if (message.match(/^!help/)) {