From 66becbf9851fda7960fb350b89421028eada90b7 Mon Sep 17 00:00:00 2001 From: cyan <> Date: Tue, 18 May 2010 16:31:48 +0000 Subject: [PATCH] * Allow message type to be defined in 'srv.o' type notation --- exec/load/ircbot_functions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/exec/load/ircbot_functions.js b/exec/load/ircbot_functions.js index e903c823df..3b204b7dbc 100644 --- a/exec/load/ircbot_functions.js +++ b/exec/load/ircbot_functions.js @@ -284,12 +284,16 @@ function Server_writeout(str) { this.sock.write(str.slice(0, 512) + "\r\n"); } -function Server_target_out(target,str) { +function Server_target_out(target,str,msgtype) { for (c in squelch_list) { if (target.toUpperCase() == squelch_list[c].toUpperCase()) return; } - var outstr = "PRIVMSG " + target + " :" + str; + + if (!msgtype) + msgtype = "PRIVMSG"; + + var outstr = msgtype + " " + target + " :" + str; log("--> " + this.host + ": " + outstr); this.sock.write(outstr.slice(0, 512) + "\r\n"); } -- GitLab