mIRC Home    About    Download    Register    News    Help

Print Thread
#267043 27/03/20 12:28 AM
Joined: Dec 2019
Posts: 20
S
Stephen Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2019
Posts: 20
I am trying to come up with a scripted way to create a list of users on the UAL that have not been send in some time.

I have a seen script that uses $ctime so is it possible to create a script that will pull each name from the UAL, look it up in the !seen script (nickname.ini) pull the $cdate and generate a sorted text file that I could then determine if the user has not been since in say in 5 weeks or more remove them from the UAL?

Anyone have any ideas?

Joined: Dec 2019
Posts: 20
S
Stephen Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2019
Posts: 20
I figured out a way to do it. its not pretty but it works.

As I have the scene script running which creates a nick.ini file. As the file is updated each time the person joins etc the file should never be out of date. So if I take the ones that have not been updated in a month and create a text file of the names using dir /b >purge.txt then at the top line I put in the total number of lines.

The script then becomes

upurge {
set %purgecount $read(purge.txt,0)
:next
if %purgecount == 0 goto done
set %upurge $remove($read(purge.txt,%purgecount),.ini))
if %upurge == $null halt
/ruser %upurge
dec %purgecount
goto next
:done
}

the set reads the first line which is the total number of lines, the working backward grabs each line removes the .ini extension and does a /ruser the count is decreased and it runs again until the count hits 0.

I ran this with over 1,803 lines and it worked removing users. Granted there were a great deal of no such user messages. but it functioned to remove any of the ones found.


Link Copied to Clipboard