WebInform or triggers by timer

Plugin: WebInform

This plugin is addition for plugin of triggers. Represents service with performance on the timer (or to the schedule) the set line of the trigger. Has possibility to accept individual subscriptions to reception of the information from users. The plugin is named so, because web services the most suitable function for this plugin. But as matter of fact it only performance of line of the trigger under the schedule or the timer. And actions can be practically any, everything that it is possible to make by means of triggers.

On/off services is made by command !isinform. The list of services is accessible by command !informlist. To add new service it is possible by command !informset <name> <main_period> <user_period> <answer>. The name should correspond to rules for nicks (should not contain space and inadmissible symbols). The general period is the period of performance of service for information sending by all in chat (if any text comes back) or performance of line of the trigger is simple. The individual period differs from the general that is applied to subscribers of service, if any text it goes to subscribers comes back. The general and individual periods can be as simply number that will be means the timer period in minutes for performance, and the schedule in format hh:mm, Where time for service performance is underlined. It is possible to specify the list of time of performance through comma without blanks. If any period is specified as 0 this type of service will be inactive. For example, if the general period is specified as 0 service will be carried out only for subscribers and if the period for subscribers is set as 0 subscriptions to service are not accepted. The answer represents line of the trigger by rules of addition of answers for triggers. To remove service with the chosen name it is possible by command !informdel <name>. To subscribe for service with the chosen name it is possible by command !informget <name> <type>. If the type is specified as 1 the information will go to chat. If the type is specified as 2 the information will go in PM. If the type is specified as 0 there is removal of subscription to service.

In the language localization file Text_lang.lua the name of bot, description and email are sets. If constant informerShow in the file Vars.lua is 1, that the plugin bot is visible in the list of users, and if 0 it is not visible. Constant informerMatCut sets the floormate autoreplacement mode with Antimate plugin (1 - yes, 0 - no).

The base of services is stored in file informerData.lua.

Services examples:

News\World
Main period:    720
User period:    360
Answer:        {repl:</?[pa]>="" <br.->="" <br>=" " <a%shref.->="" <img.->="" ’="'" –="-" &quot;="'"}{varurl:T:http://rss.news.yahoo.com/rss/world,,,"<item>.-<title>.-%s*%(.-</title>.-<link>.-%*.-</link>.-<category>.-</category>.-<pubDate>.-</pubDate>.-<description>.-</description>.-</item>"<item>.-<title>(.-)%s*%(.-</title>.-<link>.-%*(.-)</link>.-<category>(.-)</category>.-<pubDate>(.-)</pubDate>.-<description>(.-)</description>.-</item>"\n\t %1 /%3/ (%4)\n%5\n( %2 )\n}[T]{exit}
It is News feed example.

FakeUsers
Main period:    1
User period:    0
Answer:        {rand:SHARE1:100000000:5000000000}{rand:SHARE2:100000000:5000000000}{rand:SHARE3:100000000:5000000000}{rand:SHARE4:100000000:5000000000}{rand:SHARE5:100000000:5000000000}{chat:$MyINFO $ALL FakeUser1 I am fake user1 :) $ $1$fake@user1$[SHARE1]$|}{chat:$MyINFO $ALL FakeUser2 I am fake user2 :) $ $1$fake@user2$[SHARE2]$|}{chat:$MyINFO $ALL FakeUser3 I am fake user3 :) $ $1$fake@user3$[SHARE3]$|}{chat:$MyINFO $ALL FakeUser4 I am fake user4 :) $ $1$fake@user4$[SHARE4]$|}{chat:$MyINFO $ALL FakeUser5 I am fake user5 :) $ $1$fake@user5$[SHARE5]$|}
This example creates sending service once per minute to users of the information on five artificial users with random share (effect of presence at the list of users).

<<< back | print | To main...
PhazaSoft Ekzekutor
Hosted by uCoz