Autoreplaces and antiflood

Plugin: Avtozameny.Autoreplaces

This function serves for automatic replacement of the text in chat by the list of the templates. For each template of autoreplacement the answer is set. Thus it is sets the URL-addresses autoreplaces possibility flag. If this flag is 0, then autoreplaces not makes inside the URL-addresses. If this flag is 1, then autoreplaces makes inside the any place in text. Autoreplaces table stored in file ReplaceTable.lua. By default in the script distribution kit are already sets the templates of autoreplacements for removal flood in the text of main chat.

To get the autoreplaces list is possible by command !seereplaces. To add the autoreplace possible by command !addreplaces <flag> <pattern> <replace_text>. To delete the replace with chosen index possible by command !delreplaces <index>.

Enable/disable the autoreplaces function possible by command !autoreplaces.

Templates are represent an short patterns, representing a superstructure over LUA-regex with some simplifications and automation for the simplified addition of phrases. More details about the general rules of templates and answers in the description of short patterns system.

Also has possibility to group autoreplacement to groups for convenience. To add autoreplace with the choosen index in group with the setted name it is possible by command !replacesaddgroup <index> <group_name>. To remove autoreplacement from any group in which it consists, it is possible by command !replacesdelgroup <index>. To delete group with all autoreplacements inside it is possible by command !replacesremgroup <group_name>. To rename the group bossible by command !replacesrengroup <group_name>$<new_name>. To disband group of autoreplacements it is possible by command !replacesclsgroup <group_name>. To look autoreplacements entering into group it is possible by command !replacesseegroup <group_name>.

On the basis of autoreplacements the elementary antiflood is realised, a representing standard set of autoreplacements of group "ANTIFLOOD", replacing symbols going successively on one letter, one space or line "<...>".

For example, the pattern of autoreplace *([kb])ot* with answer %1%2at%3 will replace text "kot" or "bot" to "kat" and "bat". Because of some features of short templates in the answer two captures (one %1, another on 1 more set by the user) are already transferred by default. The pattern with flag 1 [%%%S%%%s]?badsite[%%%.]com[%%%S%%%s]? and text goodsite.com will replace text "badsite.com" to "goodsite.ru".


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