View Full Version : OCSCRIPT - site open/close & site enable/disable
bounty
01-13-2004, 04:41 PM
hi m8s,
here is a new script called OCScript i hope it will be usefull for some of you ;)
new link: http://www.ioftpd.com/scripts/script.php?id=57
have fun
bounty
phoenixfr
01-13-2004, 04:45 PM
hehe nice one thx 4 sharing
typhon|wk
01-13-2004, 05:13 PM
thx a lot, very appreciate :D
bounty
01-13-2004, 06:15 PM
ehehe already an update ;)
DL link & changelog on 1st post (like always)
have fun
bounty
bounty
01-13-2004, 07:06 PM
ehehe already another update ;)
DL link & changelog on 1st post (like always)
have fun
bounty
typhon|wk
01-14-2004, 07:02 AM
work fine :D
now waiting for site start and site shutdown cmd on mirc ;)
fobban
01-14-2004, 07:24 AM
think we'll have to wait until d1 makes site shutdown work first :)
memory-error each time i do it (if there are users online)
Guardian
01-14-2004, 07:25 AM
Very nice addon bounty :)
Already implemented it to dzsbot and it works perfectly :D
Just noticed a funny thing. This could probably be a wrong setup ini but it aint that much to put in the ini so i doubt it is.
Ive closed the site added a user and he was added to the NoGroup. This group could access the server even if the admin has closed the site(site close). So I changed the user to same group as admin(ioftpd) and the user can still login even if ive closed the site. Made a new group to check it out and user can login somethings even there.
Try and close the site and disconnect and login with a non 1M(flags) user a few times to check if you can login even if site is closed.
EDIT: Remember that they cant always login. Sometimes the scripts denys login as it should. Another thing, useing 5.5.6r
alturismo
01-17-2004, 01:05 AM
after some looks it looks like "site close"
only close 1 time, means
site close, 1st who trys login is denied, 2nd ++ can login
typhon|wk
01-17-2004, 03:51 AM
true :(
tryed again.....and after 2/3 mins user was blocked (for only 1 time again)
maybe problem can be cache ?
alturismo
01-17-2004, 11:51 AM
seems io problem, 553 working, 556 not :(
bounty
01-19-2004, 06:09 PM
ehehe again an update
DL link & changelog on 1st post (like always)
have fun
bounty
bounty
01-19-2004, 07:49 PM
v1.3 still don't work for ioftpd 5.5.6 with the new external file system
it seems init.itcl is reloaded sometimes in some case when a new user connect to the ftp
i really dunno why
i hope darkone will know better than me ;)
have fun
bounty
bounty
01-20-2004, 08:09 AM
ehehe another update ;)
this one should work on ioftpd 5.5.6
DL link & changelog on 1st post (like always)
have fun
bounty
bounty
01-20-2004, 10:30 AM
ehehe another fast update ;)
DL link & changelog on 1st post (like always)
have fun
bounty
Another open/close script had an cool feature. You could have a specific the reason why site was closed by typing "SITE CLOSE <reason>". It also told user how long site had been closed. The script that had these features doesnt work with 5.5.6r same problem as OCscript had.
I see you can have a specific reason with yours but you have to manualy go into the script dir and change a file so thats abit messy. Just a suggestion.
bounty
01-20-2004, 12:31 PM
Originally posted by odd
Another open/close script had an cool feature. You could have a specific the reason why site was closed by typing "SITE CLOSE <reason>". It also told user how long site had been closed. The script that had these features doesnt work with 5.5.6r same problem as OCscript had.
I see you can have a specific reason with yours but you have to manualy go into the script dir and change a file so thats abit messy. Just a suggestion.
ok i'll see what i can do for you ;)
have fun
bounty
bounty
01-20-2004, 03:12 PM
ehehe another fast update ;)
DL link & changelog on 1st post (like always)
have fun
bounty
site close
550 Command failed.
why?
***SOLVED*** (works perfectly)
nice script
MaZza_Dj
01-21-2004, 04:45 AM
the script work and is very cool thanks but i have a problem with the last version for enter in a site when the script is active:
--------------------------- ErrorInfo ----------------------------
couldn't open "../scripts/ocscript/server.status": no such file or directory
while executing
"open $ocscript(PATH)/server.status r"
(procedure "ocscript_onpostuser" line 3)
invoked from within
"ocscript_onpostuser"
(file "..\scripts\ocscript\OnPreUser.itcl" line 40)
------------------------------------------------------------------
01-21-2004 00:59:52 "..\scripts\ocscript\OnPreUser.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
couldn't open "../scripts/ocscript/server.status": no such file or directory
while executing
"open $ocscript(PATH)/server.status r"
(procedure "ocscript_onpostuser" line 3)
invoked from within
"ocscript_onpostuser"
(file "..\scripts\ocscript\OnPreUser.itcl" line 40)
------------------------------------------------------------------
01-21-2004 01:00:29 "..\scripts\ocscript\OnPreUser.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
couldn't open "../scripts/ocscript/server.status": no such file or directory
while executing
"open $ocscript(PATH)/server.status r"
(procedure "ocscript_onpostuser" line 3)
invoked from within
"ocscript_onpostuser"
(file "..\scripts\ocscript\OnPreUser.itcl" line 40)
------------------------------------------------------------------
01-21-2004 01:05:30 "..\scripts\ocscript\OnPreUser.itc" terminated abnormally
init.itcl file must be in ..\scripts dir, the others files where u want.
nice,
Working fine here.
This might be stealing alot of ideas from the old open/close scripted ive had. I liked it but the scripter doesnt seem to care anymore so I got one more suggestion to yours Bounty if you agree. A reminder that site is already open/closed if trying to open/closed it if its already open/close. Would be a nice feature to a complete ocscript atleast for me ;)
site open
200-OCScript v2.1: Server is already OPEN
200 Command successful.
site close
200-OCScript v2.1: Server is already CLOSED <reason>
200 Command successful.
bounty
01-21-2004, 07:37 AM
hmm sorry i'll not add a check if server is already open or closed
because if you want change the closed reason:
with my system you can do it directly by using a 2nd 'site close <reason>'
with your system you should reopen 1st your server and close it again to change the closed <reason>
PS ocscript v2.2 soon available with reason cookie support in dzsbot (1.10) ;)
have fun
bounty
MaZza_Dj
01-21-2004, 07:57 AM
from me the command site close and site open go, but when i hve the script installed and the site is open, all users has a problem to enter on a site...now i have disabled the script and all work more good
and your point is ?
works fine here and is a great addon 4 maintence on the box when needed
typhon|wk
01-23-2004, 12:35 PM
Originally posted by MaZza_Dj
from me the command site close and site open go, but when i hve the script installed and the site is open, all users has a problem to enter on a site...now i have disabled the script and all work more good
same here, users must retry several times to join and connecting to myself i join w/o probs.
IO freez on before require password and cause login timeout
bounty
01-26-2004, 05:21 PM
ehehe another update
DL link & changelog on 1st post (like always)
have fun
bounty
MaZza_Dj
01-28-2004, 06:36 AM
Man i have a problem to enter in a FTP when your script is active:
[12.31.19] Connecting to SITE
[12.31.19] Connected to SITE -> IP=*.*.*.* PORT=*
[12.31.19] Ident Request: *.*.*.*
[12.31.21] 220 FTP Server ready.
[12.31.21] USER login
[12.31.34] 421 Timeout (15 seconds): closing control connection.
[12.31.34] Connection failed
[12.31.34] Delaying for 32 seconds before reconnect attempt #1
[12.31.36] Retry attempt Aborted
why?
bounty
01-28-2004, 08:01 AM
Originally posted by MaZza_Dj
Man i have a problem to enter in a FTP when your script is active:
[12.31.19] Connecting to SITE
[12.31.19] Connected to SITE -> IP=*.*.*.* PORT=*
[12.31.19] Ident Request: *.*.*.*
[12.31.21] 220 FTP Server ready.
[12.31.21] USER login
[12.31.34] 421 Timeout (15 seconds): closing control connection.
[12.31.34] Connection failed
[12.31.34] Delaying for 32 seconds before reconnect attempt #1
[12.31.36] Retry attempt Aborted
why?
hmmm dunno
do you use special chars in login names or something like this ?
MaZza_Dj
01-28-2004, 08:24 AM
no i have mazzadj in login name and other user have the same problem....
i have one bnc and get external ident active, i don't know if is this ot what...
mr_F_2
01-28-2004, 05:25 PM
wicked, ma site needs this
typhon|wk
01-29-2004, 03:36 AM
finaly OCscript 2.2 work for me....
here wath i did
edited init.itc in scripts dir and pasted at the end the lines from init.itc in OCscript pak (i use newdir too)
deleted init.itcl from ocscript dir
added under [events]
OnServerStart = TCL ..\scripts\ocscript\OnServerStart.itcl
at 1st place in this section
tested on 553 556 and 562 work fine
on damned .it FW under bnc too mazza-dj
:)
MaZza_Dj
01-29-2004, 09:37 AM
my init.tlc is this:
first newdir and for second open close script
.
.
..
##### OnSiteUnnuke #####
# !!! WARNING !!!
# the good work of this script depend of the length of the Nuke_Header in ioA
# the default ioA Nuke_Header is: [Nuked]-
# define here the ioA Nuke_Header you use !! don't remove {} !!
set IOA_NUKE_TAG {[NUKED]-}
# so the ioA_Nuke_Length should be set to 8 chars
set IOA_NUKE_LENGTH 8
##### OnSiteWipe #####
# EXPERIMENTAL substrings path for ppl who need it (README-1ST.TXT exemple 2)
# if you use exemple 2: set ND_SUBSTRINGS "/INCOMING /ARCHIVES"
# if you use exemple 1 & /ARCHIVES dir : set ND_SUBSTRINGS "/ARCHIVES"
set ND_SUBSTRINGS ""
################################################## ###############################
##### GLOBAL OCSCRIPT 2.2 INI #####
# set here the path for ocscript
set ocscript(PATH) "../scripts/ocscript"
# set here the default reason message (if none are set in 'site close <reason>')
set ocscript(REASON) "Upgrading Hardware or Admin Problem"
# set here the flags who can bypass the close & the masskick
set ocscript(BYPASS) "1M"
my ioftpd.ini is this:
Reset = 0 0 * * &Reset
Service_Update = 10,30,50 * * * &Service_Update
spidersl = 0 0 * * EXEC php.exe -q E:\ioFTPD\scripts\php_psio\zipscript-c.php spidersl
Newday = 0 0 * * EXEC ..\scripts\ioA\ioA.exe NEWDATE
Weekly = 0 0 * 6 EXEC ..\scripts\ioA\ioA.exe WEEKLYSET
static = 57 23 * * TCL ..\scripts\static.itcl all
static = 58 23 * * TCL ..\scripts\static.itcl atopdn 20
static = 59 23 * * TCL ..\scripts\static.itcl dtopup 10
DailyReset = 0 0 * * TCL ..\scripts\Readd\reset.itcl day
WeeklyReset = 0 0 * 0 TCL ..\scripts\Readd\reset.itcl week
MonthlyReset = 0 0 1 * TCL ..\scripts\Readd\reset.itcl month
[Events]
OnUploadError = EXEC php.exe -q E:\ioFTPD\scripts\php_psio\zipscript-c.php
OnUploadComplete = EXEC php.exe -q E:\ioFTPD\scripts\php_psio\zipscript-c.php
OnUploadError = TCL ..\scripts\newdir\OnUploadError.itcl
OnUploadComplete = TCL ..\scripts\newdir\OnUploadComplete.itcl
OnUploadComplete = TCL ..\scripts\nfourl.itcl
OnUploadComplete = TCL ..\scripts\badurl.itcl
;OnDownloadError =
;OnDownloadComplete =
;OnResume =
;OnUpload =
OnNewDir = TCL ..\scripts\newdir\OnNewDir.itcl
OnDelDir = TCL ..\scripts\newdir\OnDelDir.itcl
;OnLogIn =
OnServerStart = TCL ..\scripts\newdir\OnServerStart.itcl
OnServerStart = TCL ..\scripts\ocscript\OnServerStart.itcl
;OnServerStop =
;OnServiceStart =
;OnServiceStop =
OnFtpLogIn = EXEC ..\scripts\ioA\ioA.exe logon
[Modules]
;MessageVariableModule = ..\modules\cookie.dll
;UserModule = ..\modules\networkuser.dll
;GroupModule = ..\modules\networkgroup.dll
;EventModule = ..\modules\eventmodule.dll
[FTP_Pre-Command_Events]
list = TCL ..\scripts\newdir\OnPreList.itcl
stor = TCL ..\scripts\newdir\OnPreStor.itcl
mkd = TCL ..\scripts\newdir\OnPreMkd.itcl
site = TCL ..\scripts\Readd\presite.itcl
user = TCL ..\scripts\ocscript\OnPreUser.itcl
[FTP_Post-Command_Events]
;mkd =
;stor =
dele = EXEC php.exe -q E:\ioFTPD\scripts\php_psio\postdel.php
dele = TCL ..\scripts\newdir\OnPostDele.itcl
rmd = TCL ..\scripts\newdir\OnPostRmd.itcl
My config are right? or i can put after one other script the ocscript?
bounty
02-04-2004, 04:10 PM
hi m8s
here is a new version of OCScript ;)
i hope you'll like this one
DL link & changelog on 1st post
have fun
bounty
typhon|wk
02-04-2004, 05:26 PM
just in time.... before i upgraded my sites :)
great job! work fine..... time to upgrade all
works perfectly m8! good job :)
MaZza_Dj
02-04-2004, 07:27 PM
mmm this work for now
perfect 8))))
and fantastic command enabled or disabled 8))))))
:i'm not g
Originally posted by MaZza_Dj
fantastic command enabled or disabled 8))))))
hmmm, me see's a new bquota coming :cool:
bounty
02-04-2004, 08:17 PM
Originally posted by Ren
hmmm, me see's a new bquota coming :cool:
you need something new ?
is bquota 1.1 not working ? ;)
Is it only me that gets all kind of errors when useing OC?
I cant close the site.
site close SomeReason
200 Command successful.
Here are all errors Id get
------------------------------------------------------------------
02-16-2004 15:54:46 "..\scripts\ocscript\ocscript\OnSiteClose.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
can't read "ocscript(REASON)": no such element in array
while executing
"set args $ocscript(REASON) "
(procedure "ocscript_onsiteclose" line 3)
invoked from within
"ocscript_onsiteclose"
(file "..\scripts\ocscript\ocscript\OnSiteClose.itcl" line 34)
------------------------------------------------------------------
02-16-2004 15:54:51 "..\scripts\OCScript\ocscript\OnSiteEnable.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
can't read "args": no such variable
while executing
"lindex $args 0"
(procedure "ocscript_onsiteenable" line 3)
invoked from within
"ocscript_onsiteenable"
(file "..\scripts\OCScript\ocscript\OnSiteEnable.itcl" line 32)
------------------------------------------------------------------
02-16-2004 15:55:42 "..\scripts\OCScript\ocscript\OnSiteDisable.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
can't read "args": no such variable
while executing
"lindex $args 0"
(procedure "ocscript_onsitedisable" line 3)
invoked from within
"ocscript_onsitedisable"
(file "..\scripts\OCScript\ocscript\OnSiteDisable.itcl" line 39)
I updated the old tcl84.dll with new tcl84t.dll(and renamed it to tcl84.dll). Havent been able to test the enable disable due to this errors. But Ive already have a suggestion to it. Would be nice if there is a way to list all disable users :)
BTW: Iam useing 5.6.3r
I get some random errors. It workes sometimes and other times not. It feels like the script cant handle fast open/close cmds.
If I open the site and the right after ive open it close it just in a matter of a seconds it doesnt respond. If I wait a while before closing it it works.
site open
200-OCScript v3.0: Server is now OPEN
200 Command successful.
site close
200 Command successful.
site close
200-OCScript v3.0: Server is now CLOSED & all users KICKED
200 Command successful.
EDIT: Never mind I think I found the problem. Was useing the new tcl84t.dll(renamed to tcl84.dll) instead of the old tcl84.dll.
Originally posted by odd
But Ive already have a suggestion to it. Would be nice if there is a way to list all disable users :)
Got another suggestion to Enable/Disable section. No one should be able to disable Master account(Flag M).
nagelrit
03-08-2004, 02:29 PM
was it any irc commands for this? like !sitenameCLOSE/OPEN reason?
_rage_ thegod
03-10-2004, 12:19 PM
great script, but sometimes it hangs (hangs after "Connected to XXX -> IP=XXX.XXX.XXX.XXX PORT=XXX") with the following msg in systemerror.log
--------------------------- ErrorInfo ----------------------------
couldn't open "../scripts/ocscript/server.status": no such file or directory
while executing
"open $ocscript(PATH)/server.status r"
(procedure "ocscript_serverstatus" line 3)
invoked from within
"ocscript_serverstatus"
(file "..\scripts\ocscript\OnPreUser.itcl" line 60)
------------------------------------------------------------------
this is even tho the "server.status" file existed.
bounty
03-10-2004, 02:10 PM
Originally posted by _rage_ thegod
great script, but sometimes it hangs (hangs after "Connected to XXX -> IP=XXX.XXX.XXX.XXX PORT=XXX") with the following msg in systemerror.log
--------------------------- ErrorInfo ----------------------------
couldn't open "../scripts/ocscript/server.status": no such file or directory
while executing
"open $ocscript(PATH)/server.status r"
(procedure "ocscript_serverstatus" line 3)
invoked from within
"ocscript_serverstatus"
(file "..\scripts\ocscript\OnPreUser.itcl" line 60)
------------------------------------------------------------------
this is even tho the "server.status" file existed.
hmmm it's strange ... i have no idea why you have this problem if the file already exist
_rage_ thegod
03-11-2004, 04:22 PM
its also happening with
"ocscript_userstatus"
(file "..\scripts\ocscript\OnPreUser.itcl" line 62)
btw.
even tho the user.status file exists as a 0byte file.
you should make the script so that if it doesnt find or cant open those files, it returns 0 and lets the user login instead of having him hang on "Connected to ...................".
think this is possible?
MalcolmX
04-15-2004, 02:34 PM
Using ocscript, very nice little piece of work:)
Just wanted to know how i can create the BYPASS flag mentioned in the install text. I need to keep a few users online even if i close the site down.
Originally posted by MalcolmX
Using ocscript, very nice little piece of work:)
Just wanted to know how i can create the BYPASS flag mentioned in the install text. I need to keep a few users online even if i close the site down.
In your init file u can set flags which are allowed to login while CLOSE is activated. I think default is flag 1M. Just edit your init file and add a your flag you want to use and give all users u want to be able to login this Flag. Simple as that.
MalcolmX
04-15-2004, 03:46 PM
Originally posted by odd
In your init file u can set flags which are allowed to login while CLOSE is activated. I think default is flag 1M. Just edit your init file and add a your flag you want to use and give all users u want to be able to login this Flag. Simple as that.
Yes, thats correct, i´ve got those flags. Then i´ll just add the suitable flag and give it to the users i want to keep when closing the site down. Thanks for your help:)
dreadlrd
04-18-2004, 10:00 PM
Hi..
Might have found a bug in this OCscript (awesome script btw)... when you set the site to close and login with a !nick after a couple attempts you can get in. Anyone else experienced this?
test123
06-21-2004, 07:49 AM
yes, its true! i have postet since 2-3month about this bug!
this bug is in ionED too! I think thats is the style/art of programming of ioftpd??? because both scripts (OCScript&ionED) have this bug..
edit:
possibly i have found a new bug with the !login, when you login with !username and you are admin/siteop and you "SITE SHUTDOWN" ioftpd than come a Memory Error, without the ! come not error...test it pls
neoxed
06-21-2004, 10:50 AM
Originally posted by test123
"SITE SHUTDOWN" ioftpd than come a Memory Error, without the ! come not error...test it pls
This is a known bug for ioFTPD, since the shutdown procedures are not finished yet. When darkones finishes his new module initialization routines, this will be fixed.
Since Beta-5.7 ioFTPD has an exception handler, so you shouldn't see those application error popups. What version of ioFTPD are you using?
test123
06-21-2004, 11:05 AM
i have test with the newest version..
hiho i have problems too...
07-29-2004 17:06:31 "..\scripts\ocscript\OnSiteClose.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
can't read "ocscript(PATH)": no such variable
while executing
"open $ocscript(PATH)/server.status w"
(procedure "ocscript_onsiteclose" line 5)
invoked from within
"ocscript_onsiteclose"
(file "..\scripts\ocscript\OnSiteClose.itcl" line 35)
------------------------------------------------------------------
07-29-2004 17:06:36 "..\scripts\ocscript\OnSiteOpen.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
can't read "ocscript(PATH)": no such variable
while executing
"open $ocscript(PATH)/server.status w"
(procedure "ocscript_onsiteopen" line 4)
invoked from within
"ocscript_onsiteopen"
(file "..\scripts\ocscript\OnSiteOpen.itcl" line 16)
------------------------------------------------------------------
greetz
Zer0Racer
07-31-2004, 11:43 AM
"can't read "ocscript(PATH)": no such variable"
A clue.. where is ocscript(PATH) defined?
Read the install txt?
!!! WARNING !!! !!! WARNING !!! !!! WARNING !!!
COPY init.itcl included in OCSCRIPT to ../scripts dir
if you already have ../scripts/init.itcl installed
you should open ../scripts/init.itcl (with an editor)
copy/past infos from init.itcl included in OCSCRIPT inside the other (at bottom)
you should setup ocscript part in init.itcl and SAVE ;)
!!! WARNING !!! !!! WARNING !!! !!! WARNING !!!
In short.. your init.itcl in ioFTPD/scripts is either missing of not configured properly.
And oh.. after changing/installing init.itcl you need to restart ioFTPD. It's read on startup.
yup, i confirm !login bug when site is closed. just tried and !user (flag 3, ratio) logged without problems :(
bounty
08-08-2004, 11:30 AM
OCscript v3.2 is out ;)
i finally fixed that ugly bug with "!" at login
sorry for the delay m8s i'm very busy atm
have fun
bounty
bounty
11-28-2004, 06:43 AM
OCscript v3.3 is out ;)
have fun
bounty
chuddy
11-29-2004, 04:10 AM
Hello Bounty,
I found this bug in 3.2 and also in 3.3 seeing your code :
if a user have no flag (whatever the reason is) he can logon when site is closed or disabled.
In fact ocscript crashes with 'can't read "flagline": no such variable'..
Yes user without any flag have no 'flags' tag in their user file.
Anyway good job :)
bounty
11-29-2004, 08:37 PM
Originally posted by chuddy
Hello Bounty,
I found this bug in 3.2 and also in 3.3 seeing your code :
if a user have no flag (whatever the reason is) he can logon when site is closed or disabled.
In fact ocscript crashes with 'can't read "flagline": no such variable'..
Yes user without any flag have no 'flags' tag in their user file.
Anyway good job :)
eheh ok thx to report this i'll see what i can do for it ;)
anyway user w/o flags (whatever the reason is) looks strange and have no sense for me ;)
have fun
bounty
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.