change command ?
 

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

change command ?

Started by slick, 23 September, 2005, 18:28:59

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

slick

can somebody change the following for me so that the first SendToAll will send to masters such as SendToMaster
and the second SendToAll will send to regged users such as SendToReg i tried the change myself but didn't work


function cl.funcs.clean()
   SendToall(cl.sets.bot , "The regcleaner has been called any registered user that hasn't be in the hub for "..cl.sets.weeks.." weeks will be deleted. ")
   SendToAll(cl.sets.bot , "Contact one of the MASTERS if you will be away for a longer period of time")
   local juliannow = cl.funcs.jdate(tonumber(os.date("%d")), tonumber(os.date("%m")), tonumber(os.date("%Y")))
   local oldest = cl.sets.weeks*7
   local chkd, clnd = 0,0
   for prof, v in cl.levels do
      for a, b in GetUsersByProfile(GetProfileName(prof)) do
         chkd = chkd + 1
         if cl.user then
               if not cl.no then
                  local s, e, month, day, year = string.find(cl.user, "(%d+)%/(%d+)%/(%d+)");
                  year = "20"..year
                  local julian = cl.funcs.jdate( tonumber(day), tonumber(month), tonumber(year) )
                  if ((juliannow - julian) > oldest) then
                     cl.user = nil;
                     DelRegUser(b);
                     clnd = clnd + 1;
                  end
               end
         else
            cl.user = os.date("%x")
         end
      end
   end


Appreciate the help



slick

Dessamator

#1
It cant be done that way, u need a loop to find those profiles, and  SendToNick, or user:senddata(user,"msg").
Unless you create functions that do that, u can find some of those in the forum if you Just search !
Ignorance is Bliss.

SMF spam blocked by CleanTalk