PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: ??Empie?? on 13 November, 2003, 02:13:39

Title: pm to ops on connect
Post by: ??Empie?? on 13 November, 2003, 02:13:39
Hi I need a simple script that PM's a message (in a .txt file) to every connecting operator. I feel kinda stupid that I can't make it myself, but it just wont work :( (and I cant find it on the board anywhere).

A script that pm's a message that is in the script to connecting operators will also do(, but its a message of 12 lines) :)

thx in advance!
Title:
Post by: klownietklowniet on 13 November, 2003, 02:26:15
Why don't you post the script you have been working on here. Then we can help you complete it and you learn some more scripting...  ;-)

Hint nr1:
-----------
   SendToOps(from, data) - Sends data to main chat of all operators
  from - nick of sending user or bot or anything
  data - string to send
  Ex.: SendToOps("Banner", "User XX has been banned.")
       Shows in mainchat of every operator User XX has been banned.

   SendPmToOps(from, data) - Sends private message to all operators from specified nick
  from - nick of user or bot who's sending the PM
  data - string to send

-- From Scripting.txt

Hint nr2:
-----------
   NewUserConnected()


Hint nr3:
-----------
   readfrom(filename)
   local line = read("*a'')
   readfrom()
Title:
Post by: ??Empie?? on 13 November, 2003, 09:57:13
Thx!

The reading from a file  I already have, I'll give it a try with the other hints added :)

Please give me a day, I will post the script here, working or not :)
Title:
Post by: klownietklowniet on 13 November, 2003, 11:28:09
Great! :-)