Наметки для relay-скрипта
local db = require('m_database')
local proto = require('m_protocols')
local message = require('m_message')
local relayContact = 0
proto.OnReceiveMessage(function(w, l)
if l.hContact ~= relayContact then
local module = db.GetSetting(l.hContact, 'Protocol', 'p')
local nick = db.GetSetting(l.hContact, module, 'Nick')
local account = proto.GetAccount(module)
local text = string.format('%d:%s:%s:%s', l.hContact, nick, account.ProtoName, l.Message)
message.Send(relayContact, text)
else
local hContact, text = l.Message:match('^(%d+):(.*)$')
if hContact ~= relayContact then
message.Send(tonumber(hContact), text)
end
end
end)
p.s. нужно заменить в "local relayContact = 0" 0 на номер релейного контакта