This is a simple SITE KILL command for ioFTPD. Use it as follows: Parameters are any combination of Parameters are any combination of The following needs a string to compare and uses = or != 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 path group=groupname - kick on main group groups=groupname - kick on groups action=lastaction - kick on last FTP command transfer=idle|up|down|list - kick on transferstate flags=userflags - kick on userflags login=YYYYMMDDWHHMMSS - kick on logged in since (W=weekday 0=sunday, 1=monday ...) service=ftp|http|telnet - kick only people on this service The following needs a number to compare with and uses =, != to compare, but also <, <=, >, >= when surrounded by double quotes idle=seconds - kick on idlers in seconds up=nr - kick on upload speed in K/s down=nr - kick on download speed in K/s login=seconds - kick on logged in since in seconds list=seconds - kick on list in seconds uid=uid - kick on uid gid=gid - kick on gid logintime=seconds - kick on logged in how many seconds Preceed a parameter with a - and it will exclude that option times=all|once|nr - Number for the amount of kicks, once, all or a number. all is the default Comparisons allowed: == = < > <= >= != <> 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*u 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 "idle>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/* "idle>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 servicename=FTP_Service "down<10" - kill all ftp leechers that are downloaading < 10K/s sitekill "path=/Stay out *" "logintime>600" - kill all ftp services that are logged in longer then 600 seconds. 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 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? 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 * * * ..\scripts\SiteKill.exe "idle>120" service=ftp or as a site command: [Scripts] KILL = ..\scripts\sitekill.exe To run this same command from a tcl script you could use: [exec -- "c:\\ioFTPD\\scripts\\SiteKill.exe" "idle>120" "service=ftp"] 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 1.0.7: fixed:user!=x idle>y kicked idle<=y as well 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. 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) 1.0.8: fixed:BAD COMPARISON on compares. 1.0.9: changed:return code is now 1 so it can be used to override the default site kick command 1.0.10:changed:override parameter added to override site kick and set return code to 1 changed:override, debug and silent can now be used together 1.0.11:Changed:it seems I forgot a WM_SHMEM_FREE so now it is added 1.0.12:Fixed:crash