From efcdbfdeb5fed2808862b0232564f83c33c02a68 Mon Sep 17 00:00:00 2001 From: Marcus Wellhardh <wellhard@roxen.com> Date: Mon, 8 Nov 1999 20:50:47 +0100 Subject: [PATCH] Added support to send messages. Rev: lib/modules/Protocols.pmod/LysKOM.pmod/Session.pike:1.13 --- .../Protocols.pmod/LysKOM.pmod/Session.pike | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/lib/modules/Protocols.pmod/LysKOM.pmod/Session.pike b/lib/modules/Protocols.pmod/LysKOM.pmod/Session.pike index b9de8eb588..430fa3c621 100644 --- a/lib/modules/Protocols.pmod/LysKOM.pmod/Session.pike +++ b/lib/modules/Protocols.pmod/LysKOM.pmod/Session.pike @@ -1,4 +1,4 @@ -// $Id: Session.pike,v 1.12 1999/10/18 21:53:09 js Exp $ +// $Id: Session.pike,v 1.13 1999/11/08 19:50:47 wellhard Exp $ //! module Protocols //! submodule LysKOM //! class Session @@ -895,3 +895,26 @@ object|void _create_text(string textstring, return text(res); } +//! method object send_message(string message, mapping options) +//! Sends a message. +//! +//! options is a mapping that may contain: +//! <data_description type=mapping> +//! <elem name=recpt type="Conference">recipient conference</elem> +//! </data_description> + +object|void send_message(string textstring, mapping options) +{ + int|object res; + string call; + + if(!options) options = ([]); + + if(!options->recpt) + res = con["broadcast"](textstring); + else + res = con["send_message"](options->recpt->no, textstring); + + if (objectp(res)) return res; + return text(res); +} -- GitLab