in gregoo clan files it was added. Would be nice if someone can help to add in sandurr clan files it.
Thanks
13-07-11
bobsobol
Re: How to add rejoin delay
That is a matter of the Server Side Scripting. Gregoo uses PHP (if I'm not mistaken) and Sandurrs clan system was ASP, but PHP and ASPX derivatives exist as well, I believe. (correct me if I'm wrong, I still don't have much luck with clans)
So it's not specifically the Sandurr Clan system (CSM, Clan SoD Manager) which is the problem.
If you know ASP / ASP .Net or PHP, then making the change shouldn't be too hard. If you don't, you should use files in the one you do understand... otherwise how do you edit them to fix the security when hackers exploit them? (Just a thought)
If you share the source of your clanjoin server-side script, we can suggest edits you could make. But unless you are using an unaltered version from of the stickied release I know many people have released various re-packs of this system, and what you do with each one is likely to be very different.
14-07-11
Vovozozo
Re: How to add rejoin delay
Gregoo system is written in ASP
15-07-11
tnrh1
Re: How to add rejoin delay
Bobsbol just said that -.-
learn some asp or post your script here and we will help you.
15-07-11
Vovozozo
Re: How to add rejoin delay
My script = Sandurr script
The default script
15-07-11
bobsobol
Re: How to add rejoin delay
Quote:
Originally Posted by tnrh1
Bobsbol just said that -.-
No, I said I thought Gregoo had used PHP. As you will see here Vovozozo was right to correct me. :wink: I think the download isn't working yet, but I also remember Gregoo saying to Osirus that they also needed some work, and he has said that time is in very short supply for him at the moment.
My guess that Vovzozos' files are like these:-
Spoiler:
clanInsertClanWon.asp
Code:
<!-- #include file ="settings.asp" -->
<%
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Version 2.0 NOVEMBER 2006
' Assign Global Variables
Dim dbhost, dbuser, dbpass, dbname, userid, gserver, chname, clName, clwon, clwonUserid, lv, ticket, chtype, chlv, chipflag
FillSettings()
Dim strSplit
strSplit = Chr("&H" & "0D")
' Parameter Variables
' clanInsertClanWon (userid, gserver, chname, clName, clwon, clwonUserid, lv, chtype, chlv, chipflag)
userid = Trim(Request("userid")) 'Userid of Leader
gserver = Trim(Request("gserver"))
chname = Trim(Request("chname")) 'Char name of Leader
clName = Trim(Request("clName"))
clwon = Trim(Request("clwon")) 'Char name of invited player
clwonUserid = Trim(Request("clwonUserid")) 'Userid of invited player
lv = Trim(Request("lv")) 'unimportant
chtype = Trim(Request("chtype"))
chlv = Trim(Request("chlv"))
chipflag = Trim(Request("chipflag")) 'char IP flag ? unimportant
ticket = Trim(Request("ticket"))
if userid = "" Or gserver = "" Or chname = "" Or clName = "" Or clwon = "" Or clwonUserid = "" Or lv = "" Or chtype = "" Or chlv = "" Or ticket = "" Then
Response.Write("Code=100" & strSplit)
Response.End
End if
Dim QUERY, RS, objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB; Data Source=" & dbhost & "; Initial Catalog=" & dbname & "; User ID=" & dbuser & "; Password=" & dbpass
Set RS = Server.CreateObject("ADODB.Recordset")
CheckTicket userid, ticket
QUERY = "SELECT IDX,ClanZang,MemCnt FROM CL WHERE ClanName='" & clName & "'"
RS.Open QUERY, objConn, 3, 1
Dim strReturn
Dim ClanLeader, ClanMembers, ClanSubChief, IDX
if RS.RecordCount >= 1 Then
ClanLeader = RS("ClanZang").Value
ClanMembers = CInt(RS("MemCnt").Value)
IDX = RS("IDX").Value
RS.Close
Else
Set RS = Nothing
objConn.Close
Set objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
If (CInt(MemCnt) + 1) > 100 Then
Set RS=Nothing
objConn.Close
Set objConn = Nothing
strReturn = "Code=2" & strSplit
Response.Write(strReturn)
Response.End
End If
QUERY = "SELECT ChName FROM UL WHERE Permi=2 AND ClanName='" & clName & "'"
RS.Open QUERY, objConn, 3, 1
If RS.RecordCount >= 1 Then
ClanSubChief = RS("ChName").Value
Else
ClanSubChief = ""
End If
if ClanLeader <> chname And ClanSubChief <> chname Then
Set RS = Nothing
objConn.Close
Set objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
RS.Close
QUERY = "SELECT ClanName FROM UL WHERE ChName='" & clwon & "'"
RS.Open QUERY, objConn, 3, 1
Dim UclName
if RS.RecordCount >= 1 Then
UclName = RS("ClanName").Value
Else
UclName = ""
End if
if Not UclName = "" Then
RS.Close
Set RS = Nothing
objConn.Close
Set objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
Else
if UclName = "" And RS.RecordCount >= 1 Then
RS.Close
QUERY = "DELETE FROM UL WHERE ChName='" & clwon & "'"
RS.Open QUERY, objConn, 3, 1
End if
End if
RS.Close
if userid = "" Or gserver = "" Or chname = "" Or clName = "" Or clwon1="" Or ticket="" Then
Response.Write("Code=100" & strSplit)
Response.End
End if
Dim QUERY, RS, objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB; Data Source=" & dbhost & "; Initial Catalog=" & dbname & "; User ID=" & dbuser & "; Password=" & dbpass
Set RS = Server.CreateObject("ADODB.Recordset")
CheckTicket userid, ticket
QUERY = "SELECT ClanName FROM UL WHERE ChName='" & clwon1 & "'"
RS.Open QUERY, objConn, 3, 1
Dim strReturn
Dim clName2
if RS.RecordCount >= 1 Then
clName2 = RS("ClanName").Value
if clName2 = "" Then
QUERY = "DELETE FROM UL WHERE ChName='" & clwon1 & "'"
RS.Open QUERY, objConn, 3, 1
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
if Not clName2 = clName Then
RS.Close
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
Else
RS.Close
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
RS.Close
QUERY = "SELECT ClanZang,MemCnt FROM CL WHERE ClanName='" & clName & "'"
RS.Open QUERY, objConn, 3, 1
if clwon1 = ClanLeader Then
RS.Close
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=4" & strSplit
Response.Write(strReturn)
Response.End
End if
QUERY = "UPDATE CL SET MemCnt='" & ClanMembers & "' WHERE ClanName='" & clName & "'"
Dim QUERY2
QUERY2 = "DELETE FROM UL WHERE ChName='" & clwon1 & "'"
RS.Close
RS.Open QUERY, objConn, 3, 1
RS.Open QUERY2, objConn, 3, 1
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=1" & strSplit
Response.Write(strReturn)
%>
clanWonSelfLeave.asp
Code:
<!-- #include file ="settings.asp" -->
<%
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Written By Sandurr COPYRIGHT Sandurr 2006
'Version 2.0 NOVEMBER 2006
' Assign Global Variables
Dim dbhost, dbuser, dbpass, dbname, userid, gserver, chname, clName, ticket
if userid = "" Or gserver = "" Or chname = "" Or clName = "" Or ticket = "" Then
Response.Write("Code=100" & strSplit)
Response.End
End if
Dim QUERY, RS, objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=SQLOLEDB; Data Source=" & dbhost & "; Initial Catalog=" & dbname & "; User ID=" & dbuser & "; Password=" & dbpass
Set RS = Server.CreateObject("ADODB.Recordset")
CheckTicket userid, ticket
QUERY = "SELECT ClanName,Permi FROM UL WHERE ChName='" & chname & "'"
RS.Open QUERY, objConn, 3, 1
Dim strReturn
Dim clName2
if RS.RecordCount >= 1 Then
clName2 = RS("ClanName").Value
if clName2 = "" Then
QUERY = "DELETE FROM UL WHERE ChName='" & chname & "'"
RS.Open QUERY, objConn, 3, 1
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
if Not clName2 = clName Then
RS.Close
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
Else
RS.Close
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=0" & strSplit
Response.Write(strReturn)
Response.End
End if
RS.Close
QUERY = "SELECT ClanZang,MemCnt FROM CL WHERE ClanName='" & clName & "'"
RS.Open QUERY, objConn, 3, 1
if chName = ClanLeader Then
RS.Close
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=4" & strSplit
Response.Write(strReturn)
Response.End
End if
QUERY = "UPDATE CL SET MemCnt='" & ClanMembers & "' WHERE ClanName='" & clName & "'"
Dim QUERY2
QUERY2 = "DELETE FROM UL WHERE ChName='" & chname & "'"
RS.Close
RS.Open QUERY, objConn, 3, 1
RS.Open QUERY2, objConn, 3, 1
SET RS = Nothing
objConn.Close
SET objConn = Nothing
strReturn = "Code=1" & strSplit
Response.Write(strReturn)
%>
One should record the date and time when a player leaves a clan, and disallow Clan join if that date is too close to the present date.
I don't understand how the files are used well enough to inform much, but I think these should be the files executed when you join, are kicked or chose to leave.