Cron.Bot.v1.3.LUA5.X-PtokaX
 

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

Cron.Bot.v1.3.LUA5.X-PtokaX

Started by st0ne-db, 27 September, 2006, 05:00:42

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

st0ne-db

Cron Bot is an admin tool that allows you to schedule events.
Based off Cron for Linux.

Types of Events that can be scheduled:
  • main - broadcast message's [sent from the cron bot to main chat]
  • pm - broadcast message's [sent from the cron bot to pm]
  • msg - send messages [from any user(s)]
  • lua - run lua chunks
  • http - retrieve and display rss feeds and web content
  • email - send email messages to user(s)
  • ftp-put - put a txt file onto a ftp site
  • ftp-get - read a txt file from a ftp site
  • ftp-dir - fetch a directory listing from a ftp site
  • host - host pinger

-[ Change Log v1.3 ]-

- Fixed, Improved error reporting for the Lua event
- Added, More Special Tags, See 'intro-demo.txt'
- Added, 'Cron Task' [OpProtection.lua] Match Op Client IP's to DNS or Static IP's
- Added, 'Cron Task' [GTime.lua] Time According To Google

-[ Change Log v1.2 ]-

- Fixed, Problems with trigger times and comma seperated number lists
- Fixed, Web page parsing for Lua 5.1 users ( Thx. Toobster )
- Added, Improved logging and reporting
- Added, Cronview filters
- Added, Lua event Special Tags
- Added, Lua task silent operation
- Added, Extended information returned about incorrect crontab commands
- Added, More right-click commands
- Added, 'Cron Task' [HublistVote.lua] Prompt users to vote at Hublist.org ( Requested by: Toobster )
- Added, 'Cron Task' [BotProtection.lua] Bot Protection/Blacklist
- Added, 'Cron Task' [LogRotation.lua] Cron Log Rotation
- Added, 'Cron Task' [CronTriggers.lua] Cron event to display all cron triggers
- Added, 'Cron Task' [NewPosts.lua] Cron event to display new posts on lua.uknnet.com
- Added, 'Cron Task' [EztvPosts.lua] Cron event to display new releases on eztv website

This bot requires PXLuaSockets. Some of the documentation is included in this post to provide detailed information about what this bot is capable of.

Download


==========================================================================
Summarized Help for Cron:
==========================================================================

	===================
	l  Bot Commands:  l
	------------------/

	!crontab	---- Schedule an Event
	!croned		---- Edit a Scheduled Event
	!crondel	---- Delete a Scheduled Event
	!cronview	---- View a Users Crontab
	!cron		---- Enable/Disable Cron Items
	!cronfile	---- Create a File for Cron
	!cronexe	---- Force a Cron Event to run
	!cronman	---- Cron Manual

	For help on a specific command Type: !cronman <command>

		ex. For detailed information about crontab:

			!cronman crontab


====================================
Entering Commands:
====================================

	You can enter commands in main or in a pm to the Cron bot.

==========================================================================
Summarized Syntax for Crontab Command:
==========================================================================

	!crontab <trigger> <event>


====================================
Trigger Format:
====================================


	==================
	l Time Format:   l
	-----------------/

	Position    l    Match Time	 l   Accepted Range (* = match any)
	------------+--------------------+---------------------------------
	      1	    l	Min: 		 l     * or 0-59,
	      2	    l	Hour:		 l     * or 0-23,
	      3	    l	Day: 		 l     * or 1-31,
	      4	    l	Month:	 	 l     * or 1-12,
	      5	    l	Day of Week:	 l     * or 0-6, (sun=0,mon=1,...sat=6)
      

	There are 5 parts to the trigger:
 
	- A complete trigger will look like this:
		    
		0 21 * * 0	= 21:00 hour, on the 0 min, on Sunday                                         
		20 * 4,16 * * 	= Any day at 4:00 and 16:00 hour, on the 20th min
		0 4,6,8 * * * 	= Any day at 4:00, 6:00 and 8:00 hour, on the 0 min
			
	- You may not have all wildcards:
 	
		ex. * * * * *

	========================
	l Connection Format:   l
	-----------------------/

	Trigger an event from: 
		
	- Connecting User   : enter the letter 'c' for all trigger times.

		ex. c c c c c
 
	- Disconnecting User: enter the letter 'd' for all trigger times.  

		ex. d d d d d

	- OnError events    : enter the letter 'e' for all trigger times.

		ex. e e e e e

	- To only trigger when a specific username connects or disconnects: 
	   Enter the nick in the Day of Week term

		ex.  c c c c NICK  <-- Trigger on connection of NICK only
		ex.  d d d d NICK  <-- Trigger on disconnection of NICK only

====================================
Event Format:
====================================


	=========================
	l  Available Events:    l
	------------------------/
	
	text	- broadcast message's [sent from the cron bot]
	msg	- send messages [from any user(s)]
	lua	- run lua chunks
	http	- retrieve and display rss feeds and web content
	email	- send email messages to user(s)
	ftp-put	- put a txt file onto a ftp site
	ftp-get	- read a txt file from a ftp site
	ftp-dir	- fetch a directory listing from a ftp site
	host	- host pinger


	====================
	l Event Format:    l
	-------------------/

	When a username or profile name is used the bot defaults to send a PM

	- main:[user] [message]

		[message] can be:
			message or filename

		[user] can be:
			all
			profile name
			username or {user} for connection event
			or filename with lists of usernames or profile names


	- pm:[user] [message]

		[message] can be:
			message or filename
	
		[user] can be:
			all
			profile name
			username or {user} for connection event
			or filename with lists of usernames or profile names


	- msg:[username] [user]:[message]

		[message] can be:
			message or filename

		[username] can be:
			nick to send message as

		[user] can be:
			all
			pm-all
			profile name
			username or {user} for connection event
			or filename with lists of usernames or profile names


	- lua:[file] [user]:[optional]

		[file] can be:
			any lua filename <file.lua> that returns 2 variables:

				1 - a string (the output of your script)
				2 - an error code (0=execute, [>0 or "error description"]=fail)

			view cron/ProfileTotals.lua for more information

		[user] can be:
			all
			pm-all
			profile name
			username or {user} for connection event
			filename with lists of usernames or profile names
			pm:[optional]
			main:[optional]
		
		[optional] can be:
			profile name 
			username or {user} for connection event
			filename with lists of usernames or profile names


	- http:[user] www.somesite.com/somefile.ext

		[user] can be:
			all
			pm-all
			profile name
			username or {user} for connection event
			or filename with lists of usernames or profile names


	- email:[email] [message]

		[message] can be:
			message or filename

		[email] can be:
			email address
			or filename with lists email addresses


	- ftp-put:[file] username:password@www.ftpsite.com/folder/filename.ext

		[file] can be:
			filename


	- ftp-get:[user] username:password@www.ftpsite.com/folder/filename.ext

		[user] can be:
			all
			pm-all
			profile name
			username or {user} for connection event
			or filename with lists of usernames or profile names


	- ftp-dir:[user] username:password@www.ftpsite.com/folder/

		[user] can be:
			all
			pm-all
			profile name
			username or {user} for connection event
			or filename with lists of usernames or profile names


	- host:[user] www.somesite.com

		[user] can be:
			all
			pm-all
			profile name
			username or {user} for connection event
			or filename with lists of usernames or profile names


	====================
	l  Special Tags:   l
	-------------------/

	You can use these special tags in messages only when the username
	or profile is given. They will be replaced with the appropriate info..

	- Connection and Disconnection:

		{user}	= users nick
		(profile}	= users profile
		(share)	= users share size
		{slots}	= users slots
		{desc}	= users description
		{email}	= users email

	- Error:

		{error}	= error message


====================================
Putting it all together:
====================================

	- A cron command to pm an advert(advert.txt) to everyone on the 0 min, 
	  every hour, every day, every month, any day of week. (once an hr)
	
		!crontab 0 * * * * pm:all advert.txt


	- A cron command to ping hub's listed in a file called hubs.txt 
	  at 00:30 and 12:30 and pm the info to only to the users in the file user.txt.

		!crontab 30 0,12 * * * host:user.txt hubs.txt


	- A cron command to pm a message in main to all connecting users..
	  (replace NICK with your nick)

		!crontab c c c c c msg:NICK pm:Hello {user}, welcome to the hub.


	- A cron command to PM intro.txt to all connecting users

		!crontab c c c c c main:{user} intro.txt


	- A cron command to run the lua script 'profiletotals.lua' which 
	  returns a message with user totals by profile name, and sends to only the 
	  profile of Operators every sunday at 14:25, in main chat.

		!crontab 25 14 * * 0 lua:profiletotals.lua main:Operator

st0ne-db

Version 1.1 is available.. a few fixes and additions.

Download

zvamp

Nice script!!

But I am only interested in the RSS function, is there any RSS only script that will work for Lua5.1.x??

st0ne-db


st0ne-db

#4
New Version 1.3, Edited 1st post.. or download

gizmo



SMF spam blocked by CleanTalk