1. Plugin BASIC (version 10): Added allowed PM messages count per minute from one user function. File Vars.lua: Added string (4): PM_antispam_OP_Notoces = 1 --уведомлять операторов о превышении лимита получателей PM-сообщений (1-да,0-нет) --notice OPs about exceeded allowed PM recipients amount (1-yes,0-no) In table BASIC_commands added string (27): ["pm_count"]= "pm_count", Added string (44): PM_antispam_cache={} File Killer.lua: Added code: PM_antispam_OP_Notoces=nil PM_antispam_cache=nil File OnPlugTimer.lua: Added string (4): PM_antispam_cache={} File Config.lua: Added string (11): ["AllowedPMRecipients"] = 0, -- разрешённое число получателей PM-сообщений в минуту (0-выкл) -- allowed PM recipients amount per minutes (0-off) Language localization file Text_[lang].lua: Added index 44 (45 in verlihub). File OnMsgAny.lua: Added code (strings 54-80): Localization verlihub: if MySettings["AllowedPMRecipients"]>0 then if isOp(curUser)==false then local sTmp=GetIP(curUser) or "" if PM_antispam_cache[sTmp] then if PM_antispam_cache[sTmp][2]>MySettings["AllowedPMRecipients"] then PMToUser(To, curUser, To, gl("Bot_61",curUser)..gl(CurPlugName.."_45",curUser)) if PM_antispam_OP_Notoces==1 then PMToOPs(MySettings["BotName"], OpChat, "*** "..curUser.." ("..sTmp.."): "..gl(CurPlugName.."_45","")..": "..data) end return true else if not PM_antispam_cache[sTmp][1][To] and sTmp~=(GetIP(To) or "") and (GetIP(To) or "")~="" then PM_antispam_cache[sTmp][1][To]=1 PM_antispam_cache[sTmp][2]=PM_antispam_cache[sTmp][2]+1 if PM_antispam_cache[sTmp][2]>MySettings["AllowedPMRecipients"] then PMToUser(To, curUser, To, gl("Bot_61",curUser)..gl(CurPlugName.."_45",curUser)) if PM_antispam_OP_Notoces==1 then PMToOPs(MySettings["BotName"], OpChat, "*** "..curUser.." ("..sTmp.."): "..gl(CurPlugName.."_45","")..": "..data) end return true end end end else PM_antispam_cache[sTmp]={} PM_antispam_cache[sTmp][1]={} PM_antispam_cache[sTmp][1][To]=1 PM_antispam_cache[sTmp][2]=1 end end end Other localizations: if MySettings["AllowedPMRecipients"]>0 then if isOp(curUser)==false then local sTmp=GetIP(curUser) or "" if PM_antispam_cache[sTmp] then if PM_antispam_cache[sTmp][2]>MySettings["AllowedPMRecipients"] then PMToUser(To, curUser, To, gl("Bot_61",curUser)..gl(CurPlugName.."_44",curUser)) if PM_antispam_OP_Notoces==1 then PMToOPs(MySettings["BotName"], OpChat, "*** "..curUser.." ("..sTmp.."): "..gl(CurPlugName.."_44","")..": "..data) end return true else if not PM_antispam_cache[sTmp][1][To] and sTmp~=(GetIP(To) or "") and (GetIP(To) or "")~="" then PM_antispam_cache[sTmp][1][To]=1 PM_antispam_cache[sTmp][2]=PM_antispam_cache[sTmp][2]+1 if PM_antispam_cache[sTmp][2]>MySettings["AllowedPMRecipients"] then PMToUser(To, curUser, To, gl("Bot_61",curUser)..gl(CurPlugName.."_44",curUser)) if PM_antispam_OP_Notoces==1 then PMToOPs(MySettings["BotName"], OpChat, "*** "..curUser.." ("..sTmp.."): "..gl(CurPlugName.."_44","")..": "..data) end return true end end end else PM_antispam_cache[sTmp]={} PM_antispam_cache[sTmp][1]={} PM_antispam_cache[sTmp][1][To]=1 PM_antispam_cache[sTmp][2]=1 end end end File Menu.lua: Added menu for command BASIC_commands["pm_count"] File OnCommand.lua: Added the processing block for command BASIC_commands["pm_count"]