PM to Ops
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

PM to Ops

Started by uffetjur, 17 March, 2008, 03:25:35

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

uffetjur

I search the forum but couldnt find script for sending Pm to Ops
So hopegully someone could ill my request or point to a thread a missed
Thanks in advance!
Somewhere in Cyberspace

Madman

#1
--[[
	Pm to bot sends message to opchat
	Made by C??o?y†?
	Converted to API2 by Madman
]]--
 
Bot = "PM_to_OPs"
 
OnStartup = function() 
	Core.RegBot(Bot,"PM me to give message to all operators","",true)
end
 
ToArrival = function(user,data)
	data = string.sub(data,1,-2)
	local _,_,to,msg = string.find(data,"$To:%s+(%S+)%s+From:%s+%S+%s+$%b<>%s+(.*)")
	if to == Bot then
		Core.SendToOpChat("Message from: <"..user.sNick.."> -> "..msg)
		Core.SendPmToUser(user,Bot,"Your message is sent to all Operators, they will get back to you when they have readed the message.")
	end
end
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

uffetjur

Thanks alot again for fast respons!

Thank god for our friendly scripters who keeps us ptokax lovers satisfied!
Somewhere in Cyberspace

badboyyyyyy

Quote from: Madman on 17 March, 2008, 08:16:15
--[[
	Pm to bot sends message to opchat
	Made by C??o?y??
	Converted to API2 by Madman
]]--
 
Bot = "PM_to_OPs"
 
OnStartup = function() 
	Core.RegBot(Bot,"PM me to give message to all operators","",true)
end
 
ToArrival = function(user,data)
	data = string.sub(data,1,-2)
	local _,_,to,msg = string.find(data,"$To:%s+(%S+)%s+From:%s+%S+%s+$%b<>%s+(.*)")
	if to == Bot then
		Core.SendToOpChat("Message from: <"..user.sNick.."> -> "..msg)
		Core.SendPmToUser(user,Bot,"Your message is sent to all Operators, they will get back to you when they have readed the message.")
	end
end



how to reorganize so that only namen sends messages to me and not OPchat :) sorry for my english

badboyyyyyy

#4
Quoteremoved, please do not quote code blocks... -- b_e


thank you Mutor :)

badboyyyyyy

#5
Can you add Pm to Pm sends message to opchat and to me (mainchat/pm)

user  < - >  user                      Message To <"user.sNick"> from: <"..user.sNick..">"..msg)
user < - > OP                           Message To <"user.sNick"> from: <"..op.sNick..">"..msg)   
Op < - > user                            Message To <"..op.sNick"> from: <"..user.sNick..">"..msg)

[0=no 1=yes],

Profiles = {
    
  • = {1,"Master"},
              [1] = {1,"Operator"},
              },

    Thanks in advance  ::) ::) ::)  sorry for my English

LeBleu

ok, how about answering maschine bot that keeps messages for me i'm not at hub?
bot named like me that when PMed tells anybody "I'm currently offline, I'll answer as soon as I connect"
and forwards all messages with sender when i connect to hub.

ATAG


LeBleu

i saw it, but 1. it's beta, and 2. i'd like to keep it as simple as it can be, i run lan hub on old, very low-end pc.
and, as this topic is very close to what i'd like to recive, therefore i hoped someone could enhance that just a little bit..

Anyway, is its ok that doesn't do what it's supposed to, but tells user he sent the message?
when there is no OPs, user reads the message that's sent anyway- 'Your message was sent..',
so why he should care if there is any OP online? So, the best solution should be to just deliver the message
as soon as any OP logs in, correct?

LeBleu

#9
simply, because I work on my latop and I take it with me often out. And hub is old desktop with no keyboard or monitor connected, usualy  working 24/7 under my bed in dorm. I connect to it and manage by telenet and uploading files to shared drive, so no way i could read messages from client i could possibly run on it.

please, can you add there a routine that if no OPs are online writes message to file and when OP connects it would just take all messages from that file and PM them to operator? Or reading/writing files by lua is so much harder than it sounds?

LeBleu

#10
It runs microXP, telenet serviced by netcat, but has 96Mb ram so it's kinda short of system resources to run additional apps..
It's only hub and nothing else so i don't need virtual desktop or anything.
Is it that much a trouble to simply write msg at the end of file and to read whole file and clean it?

LeBleu

Quote from: LeBleu on 21 November, 2008, 23:26:50
Anyway, is its ok that doesn't do what it's supposed to, but tells user he sent the message?
when there is no OPs, user reads the message that's sent anyway- 'Your message was sent..',
so why he should care if there is any OP online? So, the best solution should be to just deliver the message
as soon as any OP logs in, correct?
Quote from: LeBleu on 22 November, 2008, 03:12:05
please, can you add there a routine that if no OPs are online writes message to file and when OP connects it would just take all messages from that file and PM them to operator? Or reading/writing files by lua is so much harder than it sounds?
I'm pretty sure that's on topic, right?
If not, then I give up.

SMF spam blocked by CleanTalk