Generalbot file search feature

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

Locked
drdreadies
Posts: 8
Joined: 2003-03-11 01:38
Location: Another wave in the spectrum
Contact:

Generalbot file search feature

Post by drdreadies » 2003-03-23 17:24

Generalbot file search feature is not working for whatever reason.....I also have a friend running a hub with the same problem. We have gotten our script from different sources, and for some reason it will not work....I need it to redirect when an mp3 file is found in the badfiles search....here is a portion of the script applicable:


Dim sBotName,sOpChatName,aPowerOps,iMinShare,iOpMinShare,iVIPMinShare,iMaxShare,iMaxHubs,iMinSlots,aMaxSlots,iMinSlotsPerHub,iMaxUsers
Dim iMinConnection,iKickCounter,iAllowNMDC,iAllowDCPP,iAllowSearchBots,sMinDCPPVersion,iAllowUploadLimit,aMinUploadLimit
Dim iMaxDescLength,iCheckNick,aBadNicks,iCheckFakeShare,aFakeShareAmount,aFakeNamePrefix,aFakeNameSuffix,sBotInfo
Dim iDynMinShare,iDynMinShareScale,aDynMinShare,aRedirHub,iSearchBadFiles,iSearchInterval,aSearchString,iMaxFileSize,iActiveOnly
Dim sReason(20),iPolicy(20),sPolicy(4),oIPs,oUsers,sStarted,sLastUser,sLastPunished,sLetUser,iMinute,iUserPeak,sCmdPrefix,sVersion
Dim sMyInfo,iPunish(5),sFollow,iVipCommands,iOpCommands

Sub Main()

'----------EDITABLE SETTINGS----------

sBotName = "botname" '<- Name of the bot
sOpChatName = "botname" '<- Name of Ops-Only chat.
aPowerOps = Array("owner","owner2") '<- Hub admins who can kick or ban other operators (must be at least one)
iMinShare = 500*1024^2 '<- (5 gigabytes) ^0=bytes, ^1=kilobytes, ^2=megabytes, ^3=gigabytes, ^4=terabytes.
iVIPMinShare = 500*1024^2 '<- (1 gigabytes)
iOPMinShare = 0*1024^3 '<- (0 gigabytes)
iMaxShare = 1*1024^4 '<- (1 terabytes)
iMaxHubs = 20 '<- Maximum number of connected hubs.
iMinSlots = 2 '<- Minimum number of slots.
aMaxSlots = Array(2,2,3,10,20,20,20,100) '<- Maximum number of slots for each connection type (n/a,modem,isdn,sat,cable,dsl,T1,T3).
iMinSlotsPerHub = 0.5 '<- Minimum number of slots per connected hub. i.e 0.5 means that users have open at least 3 slots if they are connected in 6 hubs.
iMaxHubUsers = 300 '<- Sets hub slider maximum value when script is reset (use larger value than iMaxUsers below so ops can log in when hub is full).
iMaxUsers = 280 '<- Maximum user count, ops can override this.
iMinConnection = 1 '<- 0=all, 1=no empty, 2=no modems, 3=no isdn (or slower), 4= no satellite, 5=no cable, 6=no dsl, 7=no T1, 8=nobody gets in
iKickCounter = 5 '<- From how many kicks counter begins to notice about it in main chat, 0=off
iAllowNMDC = True '<- True allows Neo-Modus/other clients without description, False does not.
iAllowDCPP = True '<- True allows DC++/Koala clients, False does not.
iAllowSearchBots = False '<- True allows searchbots like GLO-Search, False does not.
sMinDCPPVersion = "0.18" '<- Minimum DC++ version (0.175 recommended because there are problems between 0.181 and 0.174 and earlier versions).
iAllowUploadLimit = True '<- Allow upload limit setting (B:/L:) in some DC++ modifications.
aMinUploadLimit = Array(2000,5,10,20,20,20,100,2000) '<- Minimum upload limit setting for each connection type (kB/s n/a,modem,isdn,sat,cable,dsl,T1,T3).
iMaxDescLength = 200 '<- Maximum description length in characters.
iCheckNick = True '<- True=Nickname check for bad characters/substrings, False=No checking.
aBadNicks = Array(Chr(1),Chr(160)," ","$","<","|",">","\","google","search","moglo","fuck")
iCheckFakeShare = True '<- True=Check for known fake share amounts, False=No checking.
aFakeShareAmount = Array("13630010000","7970010000","65719010000","140301549174","183287729356") '<- Banned share amounts
aFakeNamePrefix = Array("(Cable)","(DSL)","(LAN(T1))","(LAN(T3))","[Cable]","[DSL]","[LAN(T1)]","[LAN(T3)]","Cable_","DSL_","LAN(T1)_","LAN(T3)_")
aFakeNameSuffix = Array("bdfhlmnrst","aeiouy","bdfhlmnrst","bdfhlmnrst","aeiouy","bdfhlmnrst") '<- Do not modify these if you don't know what these are
iDynMinShare = False '<- Is dynamic Min Share on (overrides iMinShare).
iDynMinShareScale = 1024^3 '<- ^0=bytes, ^1=kilobytes, ^2=megabytes, ^3=gigabytes, ^4=terabytes.
aDynMinShare = Array(0,5,100,10,200,15) '<- Dynamic Min Share limits <usercount>,<minsharegigs> etc.
aRedirHub = Array("thcmp3.serveftp.com:420","thcmp3.serveftp.com:420") '<---Redirect hubs, chosen randomly every minute.
iSearchBadFiles = True '<- True if you want to search users with bad files. False if you want to save hub bandwidth.
iSearchInterval = 10 '<- Bad file search interval in minutes.
aSearchString = Array("T?F?0?1?.mp3","T?F?0?1?download1$.dat","T?F?0?1?.vob","T?F?0?1?msimn.exe","T?F?0?1?_incomplete__","T?F?0?1?share$faker") '<- Bad file search strings (use "T?F?0?1?<filename>"). Result handling below.
iMaxFileSize = 2*1024^3 '<- (2 gigabytes) ^0=bytes, ^1=kilobytes, ^2=megabytes, ^3=gigabytes, ^4=terabytes.
iActiveOnly = False '<- True=deny passive mode users, False=allow passive mode.
sCmdPrefix = "" '<- Prefix for all operator and user commands, i.e. with "!" commands work only with "!ban", "!share" etc.
iVipCommands = True '<- True=enable vip/devip commands, False=disable
iOpCommands = True '<- True=enable op/deop commands, False=disable

'-----Policies: 0=no action, 1=redirect, 2=disconnect, 3=kick, 4=kick&permban
'-----WELCOME MESSAGE-----
sReason(0) = "Welcome to "+frmHub.txtName+". Type '"+sCmdPrefix+"+help' to main chat to see available commands."
iPolicy(0) = 0
'-----MIN SHARE LIMIT-----
sReason(1) = "You have not met the minimum share required in this hub."
iPolicy(1) = 1
'-----MIN OP SHARE LIMIT-----
sReason(2) = "You have not met the minimum operator/vip share required in this hub."
iPolicy(2) = 1
'-----MAX SHARE LIMIT-----
sReason(3) = "There is something wrong with your share."
iPolicy(3) = 1
'-----MAX HUB LIMIT-----
sReason(4) = "You are connected on too many hubs (maximum is "+CStr(iMaxHubs)+")."
iPolicy(4) = 1
'-----MIN SLOT LIMIT-----
sReason(5) = "You have not met the minimum number of slots for this hub."
iPolicy(5) = 1
'-----MIN SLOTS PER HUB-----
sReason(6) = "You have not met the minimum number of slots per hub."
iPolicy(6) = 1
'-----HUB FULL-----
sReason(7) = "Sorry! Due to popular demand we are getting full. Enjoy this hub in the (THC-420) Network and try again later."
iPolicy(7) = 1
'-----TOO SLOW CONNECTION-----
sReason(8) = "Your connection is too slow for this hub."
iPolicy(8) = 1
'-----NO NMDC-----
sReason(9) = "We dont allow Neo-Modus's Direct Connect in here. Go to http://dcplusplus.sourceforge.net/ and download DC++."
iPolicy(9) = 1
'-----NO DCPLUSPLUS-----
sReason(10) = "We don't allow DC++ or Koala in here. Go to http://www.neo-modus.com and download Direct Connect."
iPolicy(10) = 1
'-----OLD DCPLUSPLUS-----
sReason(11) = "Your DC++ is too old. Go to http://dcplusplus.sourceforge.net/ and download a newer version."
iPolicy(11) = 1
'-----NO UPLOAD LIMIT-----
sReason(12) = "Your client version is not allowed here. Go to http://dcplusplus.sourceforge.net/ and download a newer version."
iPolicy(12) = 1
'-----LOW UPLOAD LIMIT-----
sReason(13) = "Your upload limit setting is too low. PM an operator for assistance if needed."
iPolicy(13) = 1
'-----TOO LONG DESCRIPTION-----
sReason(14) = "Your description is too long."
iPolicy(14) = 1
'-----BAD CHARACTERS IN NICKNAME-----
sReason(15) = "Your nickname contains bad characters/strings."
iPolicy(15) = 2
'-----PASSIVE MODE USER-----
sReason(16) = "We dont allow passive mode users in this hub."
iPolicy(16) = 1
'-----BAD FILE FOUND-----
sReason(17) = "There is at least one bad file in your share. These include .vob, .exe, .mp3 files. Please check your share."
iPolicy(17) = 1
'-----CLIENT COMPARISION MISMATCH-----
sReason(18) = "Your client is unrecognized or modified. Go to http://dcplusplus.sourceforge.net/ and download DC++."
iPolicy(18) = 1
'-----MAX SLOTS-----
sReason(19) = "You have too many slots open."
iPolicy(19) = 1
'-----KICK OP-----
sReason(20) = "You kicked an operator."
iPolicy(20) = 3

'-----Policies: 0=no action, 1=redirect, 2=disconnect, 3=kick, 4=kick&permban
sPolicy(0) = "This time I let you in, but consider this as a warning!"
sPolicy(1) = "You have been redirected to another hub in the (THC-420) Network due to whatever reason listed. If you feel this is an error, PM an Operator in the redirect hub."
sPolicy(2) = "You have been disconnected. Get the hint and don't do what you just did again...."
sPolicy(3) = "You have been kicked. Wait for a while and re-enter if you can change your ways...."
sPolicy(4) = "You have been banned. Permbanned. Period."

'----------END OF SETTINGS----------
Set oIPs = CreateObject("Scripting.Dictionary")
Set oUsers = CreateObject("Scripting.Dictionary")
frmHub.RegisterBotName(sBotName)
frmHub.RegisterBotName(sOpChatName)
frmHub.sldrMaxUsers=iMaxHubUsers
sVersion="0.24"
sStarted=sFdate(Now())
x=Ban(sBotName,"Security issue",sBotName)
x=Ban(sBotName,"Security issue",sBotName)
x=Ban(sOPChatName,"Security issue",sBotName)
x=Ban("Hub","Security issue",sBotName)
x=Ban("Hub-Security","Security issue",sBotName)
If iAllowSearchBots Then
x=Unban("7www.glosearch.tk","Searchbot",sBotName)
x=Unban("GLO-SearchUser","Searchbot",sBotName)
If Right(CStr(frmHub.txtDescription),1)=Chr(160) Then
frmHub.txtDescription=Left(frmHub.txtDescription,Len(frmHub.txtDescription)-1)
End If
Else
x=Ban("7www.glosearch.tk","Searchbot",sBotName)
x=Ban("GLO-SearchUser","Searchbot",sBotName)
If Right(CStr(frmHub.txtDescription),1)<>Chr(160) Then
frmHub.txtDescription=frmHub.txtDescription+Chr(160)
End If
End If
tmrScriptTimer.Interval = 100000
tmrScriptTimer.Enabled = True
sLastUser="None"
sLastPunished="None"
sLetUser="None "
sFollow="None"
sBotInfo="None"
For i=0 to 5
iPunish(i)=0
Next
sBotInfo="None"
colUsers.sendChatToAll CStr(sBotName),"drdreadiesâ„¢ modded Generalbot"+CStr(sBotName)+" version "+CStr(sVersion)+" started on "+sStarted
End Sub

Sub tmrScriptTimer_Timer()
If UBound(aRedirHub)>0 Then frmHub.txtRedirect=CStr(Trim(aRedirHub(Int(Rnd*(UBound(aRedirHub)+1)))))
iMinute=iMinute+1
If iMinute=>iSearchInterval Then
iMinute=0
If iSearchBadFiles Then
For each sUser in colUsers
sUser.SendData "$Search Hub:"+CStr(sBotName)+" "+aSearchString(Int(Rnd*(UBound(aSearchString)+1)))+"|"
sUser.SendData "$Search Hub:"+CStr(sBotName)+" F?F?0?0?.|"
Next
End If
End If
End Sub




Any reason why this isn't working?

regards,

drdreadies

Locked