Questionnaires store the various information about users. The administration has possibility to place the questionnaire of the user in the black list. Thus the questionnaire will be accessible to viewing only to the author and administration before elimination of the interdiction reasons. Has a search of questionnaires in various parametres and system of ratings. Also has a cleaning of questionnaires base from not registered accounts.
To create the questionnaire it is possible by command !ank_add. To delete the questionnaire it is possible by command !ank_del. To set the content of chosen questionnaire point (key) it is possible by command !ank_set <key> <content>. The key represents the identifier of questionnaire point. To look the questionnaire of the user it is possible by command !ank_see [<nick>]. If nick not specified, the list of users with questionnaires will be deduced. To find the questionnaire by parametres (keywords) of the chosen field (key) of the questionnaire it is possible by command !ank_find <key> <parameters>. In parametre at the task of search template it is possible to use a special symbol "*", that means that on this place there can be any letter (symbol). To look activity rating of questionnaires it is possible by command !ank_rate. To forbid/resolve the questionnaire of the chosen user it is possible by command !ank_bl [<nick> [<reason>]]. At a questionnaire interdiction it is necessary to specify the reason. The command without parametres will deduce the list of the forbidden questionnaires. To clean questionnaires from not registered accounts it is possible by command !ank_clean. Thus points which are not used any more (in case of change of the template table of the questionnaire will be removed from questionnaires). To look the inquiry under questionnaires it is possible by command !ank_help.
If constant Anketa_isClean in file Vars.lua sets to 1, daily clearing of questionnaires base from not registered users will be made. If constant Anketa_isChat sets to 1, to users who have a possibility to create the questionnaire, the corresponding reminder will stand out at login. Constant AnketaTable represents the table with templates of questionnaires points. Them it is possible to change and create any desirable points. Here its structure:
AnketaTable = {
{
"key",
"Point name",
"Pont description",
Content length,
"Content pattern",
},
}
This table is loaded at startup from the file in the plugin's folder AnketaTable_lang.lua, where lang - the language by default. In this table tables of points contain. The first element of the point table represents the identifier (key). The second is a name of point. The third - the explanatory. Fourth - quantity of the resolved symbols of point content. If the user sets for it more number of symbols the Bot will inform on inadmissible quantity of symbols. Fifth element is template LUA RegEx of a content. If the setted text does not correspond to template for this point, the Bot will inform on the inadmissible maintenance of point content.
The base of questionnaires is stored in file Anketa. The base of the black list is stored in file AnketaBL. In the file AnketaLog the time base of questionnaires viewings is stored.