This is a simple SITE KILL command for ioFTPD 5.x. Use it as follows: Parameters are any combination of The following needs a string to compare and uses =, ==, !=, <> to compare, the string may have wildcards * and ? When the string itself has a space in it you need to surround the comparison with double quotes Parameters are any combination of The following needs a string to compare and uses =, ==, !=, <> to compare, the string may have wildcards * and ? When the string itself has a space in it you need to surround the comparison with double quotes ======================================================== user=username - kick on user ip=ipnr - kick on ip ident=ident@ipnr - kick on ident@ip host=hostname - kick on hostname path=somepath - kick on virtual path vpath=somepath - kick on virtual path rpath=somepath - kick on real path file=somepath - kick on virtual filepath vfile=somepath - kick on virtual filepath rfile=somepath - kick on real filepath service=name of service - kick on servicename group=groupname - kick on main group groups=groupname - kick on groups admingroups=groupname - kick on admingroups action=lastaction - kick on last FTP command transfer=idle|up|down|list - kick on transferstate flags=userflags - kick on userflags tagline=tagline - kick on tagline ======================================================== The following needs a number to compare with and uses =, ==, <>, != to compare, but also <, <=, >, >= when surrounded by double quotes idletime=seconds - kick on idlers in seconds logintime=seconds - kick on logged in how many seconds listtime=seconds - kick on list in seconds upime=seconds - kick on busy upload current file in seconds downtime=seconds - kick on busy download current file in seconds listspeed=nr - kick on list speed in K/s upspeed=nr - kick on upload speed in K/s downspeed=nr - kick on download speed in K/s uid=uid - kick on uid gid=gid - kick on gid cid=cid - kick on cid cnr=nr - kick on connection number (from 0 to last one) ======================================================== times=all|once|nr - Number for the amount of kicks, once, all or a number. all is the default if you run with beginning parameter debug then you get debug info if you run with beginning parameter silent then you get no output if you run with beginning parameter override then you get can use this sitekill for overriding the SITE KICK command Be aware that debug, silent and override arguments must precede any other argument. Due to the windows rdirection (using < and >) you will need to surround your partial or complete query with double quotes. Also when the string you comapre with has a space in it you need to surround the argument with double quotes. Be aware that the parameters are used as AND so: site kill groups=group1 groups=group2 will kill everyone belonging to group1 AND group2. Thus someone only belonging to group1 will not be killed. If the first parameter is debug then all kinds of debug info is given out. It helps me to resolve bugs. Example: sitekill debug "idle>120" If the first parameter is silent then there will be no output given whatsoever. This is needed when sitekill runs in the scheduler. Example: sitekill silent "idle>120" If the first parameter is override then you can use this command to override the SITE KICK command (dont forget to change your ioFTPD.ini tho). Example: sitekill debug override "idle>120" You can use debug silent and override together but they MUST precede any other blahblah= parameter. Be aware that the things you type after the = are case insensitive Allowed for wildcards are * and ? Examples: sitekill user=lamer - kills the user lamer once sitekill user=lamer times=once - kills the user lamer once sitekill user=lamer times=25 - kills max 25 lamer users sitekill user=l*r - kills users that match the l*r wildcard so lamer looser leecher in this example but not winner sitekill ip=127.0.0.1 - kills the 127.0.0.1 connections sitekill ip=192.168.*.* - kills the 192.168.*.* connections sitekill "idletime>120" - kills idlers that are longer then 120 secs idle sitekill group=l*s - kills connections with main group l*s so leechers, loosers, lamers sitekill action=noop - kills connections where the last command was NOOP sitekill ident=TEST - kills connections with TEST as ident sitekill user!=sitebot path=/movies/svcd/* "idletime>120" - kills all connections that are in /path/movies/svcd/ somewhere and that are 120 seconds or more idle but dont kill user sitebot in this process sitekill service=FTP_Service "downspeed<10" - kill all ftp leechers that are downloading < 10K/s sitekill "vpath=/Stay out *" "logintime>600" - kill all ftp services that are logged in longer then 600 seconds in a path that I dont want them in. sitekill "logintime>3600" - kill everyone logged in for more then an hour sitekill login=????????08???? - kill everyone at 08:00:00 to 08:59:59 sitekill debug override user=lamer - use command in debug mode, override site kick from io and kill user lamer. Now if you run this command and it gives back: "uid=-1 can not be found in ..\etc\passwd" or something like that then you may have a dead connection on your hands. It rarely happens but it can happen tho. Therefore I implemented site kill uid so you can do site kill uid=-1 which would kill those dead connections. For completeness I added site kill gid= as well. How to use this command in ioFTPD 5.x? (not 5.0.x) Lets say we for example want to kick all idle ftp users. [Schedule] KillIdlers = 0,5,10,15,20,25,30,35,40,45,50,55 * * * EXEC ..\scripts\SiteKill.exe silent "idletime>120" service=FTP_Service or as a site command SITE KILL or SITE KICK (site kick is a standard command so here I override it). [FTP_Custom_Commands] KILL = EXEC ..\scripts\sitekill.exe KICK = EXEC ..\scripts\sitekill.exe override To run this same command from a tcl script you could use: [exec -- "c:\\ioFTPD\\scripts\\SiteKill.exe" "idletime>120" "service=FTP_Service"] Version info: 0.3.0:first public version since it already can be used to kill people via mirc or so. 0.4.0:added site kill path 0.5.0:added site kill idle and site kill group 0.9.0:added site kill ident@ip and site kill action so now it looks kinda finished. 1.0.0:added several options and the possibility to run multiple options in one line 1.0.1:fixed:extra code to handle when uid cant be found and changed some internal code. changed:handled userflags another way. added:debug mode. 1.0.2:fixed idle refering to transfer mode 1.0.3:fixed in idle I mistakingly user User->Interval where it should be User->Idle 1.0.4:fixed SHELL32.DLL routines can not be found occured incorrectly 1.0.5:fixed:long list of users and their uid displayed when for some odd reason uid = -1 is logged in (which shouldnt be possible) fixed:idle>xxx could cause a down/upload to be kicked as well fixed:ioFTPD can somehow get connections that shouldnt be there having UID=-1 added:sitekill uid= and sitekill gid = 1.0.6:added:error is returned in debug mode if io doesnt give a shared memory block (it shouldnt occur normally). fixed:forgot to initialize a variable 2.0.0:Branched off from 1.0.6. This 2.x version ONLY works for ioftpd version 5.x and up. Changed:internal code changed for ioftpd 5.x, several options renamed added and even some removed. 2.0.1:Added:support for uid=-1 which according toe the forum can occur. This user willget name InvalidUser and group InvalidGroup Fixed:crash in certain cases. Added:reply on who is killed. 2.0.2:Fixed:memory allocation error Added:last line gives the reason why people are kicked. 2.0.3:Fixed:BADHOW with number comparison Added:idle as synonym for idletime 2.0.4:Fixed:user!=y idle>x kicked wrongly. Fixed:upload time was wrong Changed:logintime is now back to normal, so you can kick everyone logged in for x seconds or more Added:login for ascii representation so you can kick everyone logged in according to a wildcard date/time setting 2.0.5:Changed:Cosmetic update on total connections killed, the reasons were not seperated by a space. Added:parameter to disable the output (needed when running from the scheduler) 2.0.6:Added:transfer=idle/up/down/list seems I forgot that one 2.0.7:Added:cid= to kill on a connection id. Use site who (standard swho.itcl script) from the scripts\swho.itcl file. 2.0.8:Changed:return code is now 1 (no zero) so you can override the default site kick command. 2.0.9:Added:override argument to make return code 1 if you override SITE KILL return code set back to 0 per default. Changed:debug silent and override can now be used together. 2.0.10:It seems I forgot a WM_SHMEM_FREE so it is added now. 2.0.11:Fixed:crash 2.0.12:Changed:cid= now in accordance to the cid as from dark0n3 Added:cnr=