MOTD editor
 

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

MOTD editor

Started by TheKnowledge, 23 June, 2005, 03:10:31

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TheKnowledge

Is it possible to make a script that enables you to edit the welcome message from an external pc? I'm running my hub from a server pc. I tried to access the motd.txt file through FTP access. After I edited it, and uploaded it to replace the existing one, the welcome message went back to the following message; "Push it!", and that's it. Being able to edit and update news on my motd as an OP or master would be awesome. Not nececcarily looking for a script, just a solution to what I have to do to be able to edit motd.txt through FTP or whatever.

bastya_elvtars

There is a script called SaveString, written by chill & Herodes. Find it and somebody can use that to make you this, because this IS possible.

../motd.txt
Everything could have been anything else and it would have just as much meaning.

jiten

Well, you could try UltraVNC that "... is a great and famous remote controle, multi-OS tool..." for those things.
That's just an example, because there are other programs like that one.

Cheers

bastya_elvtars

#3
A quick and dirty one...

-- Mini MOTD saver.
-- use the command you specify below. using without parameters results in empty motd.
-- only Masters can use it.
-- works in PM with the bot.


bot="MOTD"
conmmand="motd"

function ToArrival(user,data)
  data=string.sub(data,1,string.len(data)-1)
  local _,_,whoto,cmd = string.find(data,"$To:%s+(%S+)%s+From:%s+%S+%s+$%b<>%s+[%!%+%#](%S+)")
  if whoto==bot and cmd==conmmand then
    if user.iProfile==0 then
      local _,_,motd=string.find(data,"%b<>%s+%S+%s+(.+)")
      local f,err=io.open(frmHub:GetPtokaXLocation().."cfg/motd.txt","w+")
      if err then user:SendPM(bot,err) end
      if motd then
        f:write(motd)
        user:SendPM(bot,"MOTD saved.")
      else
        f:write("")
        user:SendPM(bot,"MOTD emptied.")
      end
      f:close()
    else
      user:SendPm(bot,"Not allowed...")
    end
    return 1
  end
end

function Main()
  frmHub:RegBot(bot)
end

-- // IMPORTANT: only works with 0.331!
Everything could have been anything else and it would have just as much meaning.

GeceBekcisi

Tested the script. Saves given motd successfully but PtokaX saves current motd on exit or restart, and also motd doesnt dynamically change.
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

bastya_elvtars

QuoteOriginally posted by GeceBekcisi
Tested the script. Saves given motd successfully but PtokaX saves current motd on exit or restart, and also motd doesnt dynamically change.

I know, this would need to set file's priority over GUIs. I think the GUI one should only be a text editor (with a Save button), and the actual MOTD should load from the file. I will ask PPK.
Everything could have been anything else and it would have just as much meaning.

TheKnowledge

Thanks for fast reply's. I use PtokaX 0.3.3.1, and my rank at the hub is Master.

I tried the quick and dirty one, but the MOTD still says "Push it!".

Regarding the SaveString and UltraVNC, could you link me or paste the code?

Another solution would be a simple script that pops up a welcome message as PM when users log on to the hub. I've seen this in other hubs, but don't know what the name of the script is called, so I don't know what to look for.

bastya_elvtars

You can send the MOTD in PM.
Everything could have been anything else and it would have just as much meaning.

TheKnowledge

I tried that. It says MOTD Saved, but the when I restart or reconnect, the MOTD still only says "Push it!".

bastya_elvtars

QuoteOriginally posted by TheKnowledge
I tried that. It says MOTD Saved, but the when I restart or reconnect, the MOTD still only says "Push it!".

That's due to the above. You can only do remote admin or ftp.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk