| |
Sonickillu
Posts: 1
Score: 0
Joined: 9/29/2004
From: USA
Status: offline
|
[code]========================================================================================================= 'TheNOP Made TheNOPBOTver.002 Script <------ must use Selyb's Sdch hubsoft '--------------------------------------------------------------------------------------------------------- ' TheNOPBOTver.002? edit by Sonickillu <------ must use TasMan's SDCH hubsoft ' Beautiful Script better than thenop that will no plm ' :-P J/K LOL ' -------------------------------------------------- ' ' Thanks to, in no particuliar order, RollTheDice, TasMan, ButterFlySoul, ' Leppari, Selyb, Sonickillu and all of those who gave me ideas. ' ' -------------------------------------------------- ' note to self. arrange UserCommands, they look yucky ' note to self. add RegExp support for deny URL/words and meabe translator too ' note to self. a different action for unregged on timer ??? ' note to self. add a add/remove bad words to deny array(must add load array from xml and see RegExp first) ' -------------------------------------------------- ' ------------------->>>>>>> WARNING <<<<<<---------->>>>>>>> this script need DNS.ocx. <<<<<<<<<------ ' Look in help folder, unzip ONLY DNS.ocx to windows\system folder and register it in windows registry. ' view the instructions in DNS.zip to know how to register DNS.ocx in windowa registry. ' ' 'all of the settings that can be changed are, should be, from here to the end of Sub Main() ====================================================================== Option Explicit Private m_objMuted Private m_objComFlood 'commands/messages flooding Private m_objVipSC 'vip slot/share Private m_colTranslations 'translator Private m_objPing Private m_objMessages 'welcome Private l_objMessages 'Messages specific to a user leave Private m_objKick 'x kick = action Private m_objRedir 'redirect unregged <--on timer. Private m_objRBan 'Range Ban 'part of the redirect unreged users <--on timer give them time to register (regme) Const blnREna = False ' true to redirect unregistred users after their delay have pass. Const bytRTime = 15 ' time allowed to unregistred user to stay in hub.If they are still unregistred after that delay they will be redirected to SDCH default redirection in settings. 'notification/error msg Const sAdmin = "Sonickillu" ' Set who will receive errors message. (if any), also receive Notify message if Notify is disabled for Ops Const blnNATO = True ' True to notify Ops that an action has been taken against a user. False ,only sAdmin will be notify. Const aVersion = "<(TheNOPBOTver.002?)>" 'New Version Script in Furter 'commands flood Const blnNCFTO = True ' True to Notify Ops of commands flooding attempt. Const bytCFMC = 8 ' set the min Class not affected by commands/message anti-flood.(number of messages sent in 1 minute) Const bytCMFM = 10 ' Trigger limit, limit how many messages/commands can be send in 1 minute. Const bytCFA = 4 ' actions can be add together for more options. There is special cases where 1 and 2 can be add together to specify that both action are permanent in multi action cases. ex: case such as: 195,203 and 227(case 227 = banip perm+banname perm+redirect+2+1) ' 0 = disable, 1 = Temporary(script time length(not valid with all actions)), 2 = permanent(not valid with all actions), 4 = mute,8 = Disconnect, 16 = kick, 32 = Redirect, 64 = banname 128 = BanIP. ' valide numbers are 0,4,6,8,16,17,32,64,66,72,74,80,81,82,83,96,98,128,130,136,138,160,162,192,194,195,200,202,203,224,226 or 227 ' ex: (BanIP + banname) + permanent + Disconnect = (128 + 64) + 2 + 8 = 202 obviously you can't kick because you can't add an IP in both temp IPs Ban and and Perm IPs Ban field at same time. 'advertising Const blnANTO = True ' True to Notify Ops of advertising attempt. Const bytAMC = 5 ' set the min Class not affected by anti-advertising.(IPs or URL(Deny Array)) Const bytAA = 4 ' actions can be add together for more options. There is special cases where 1 and 2 can be add together to specify that both action are permanent in multi action cases. ex: case such as: 195,203 and 227(case 227 = banip perm+banname perm+redirect+2+1) ' 0 = disable, 1 = Temporary(Force time length(not valid with all actions)), 2 = permanent(not valid with all actions), 4 = mute,8 = Disconnect, 16 = kick, 32 = Redirect, 64 = banname 128 = BanIP. ' valide numbers are 0,4,6,8,16,17,32,64,66,72,74,80,81,82,83,96,98,128,130,136,138,160,162,192,194,195,200,202,203,224,226 or 227 ' ex: (BanIP + banname) + permanent + Disconnect = (128 + 64) + 2 + 8 = 202 obviously you can't kick because you can't add an IP in both temp IPs Ban and and Perm IPs Ban field at same time. 'msg size flood Const blnNFTO = True ' True to Notify Ops of message floods attempt Const iMML = 1024 ' Max carracters allowed in a message, MainChat/PM Anti-Flood. User will be mute. Const bytFMC = 5 ' Minmum Class allow to not be affected by messages lenght restrictions. Const bytFA = 4 ' actions can be add together for more options. There is special cases where 1 and 2 can be add together to specify that both action are permanent in multi action cases. ex: case such as: 195,203 and 227(case 227 = banip perm+banname perm+redirect+2+1) ' 0 = disable, 1 = Temporary(Force time length(not valid with all actions)), 2 = permanent(not valid with all actions), 4 = mute,8 = Disconnect, 16 = kick, 32 = Redirect, 64 = banname 128 = BanIP. ' valide numbers are 0,4,6,8,16,17,32,64,66,72,74,80,81,82,83,96,98,128,130,136,138,160,162,192,194,195,200,202,203,224,226 or 227 ' ex: (BanIP + banname) + permanent + Disconnect = (128 + 64) + 2 + 8 = 202 obviously you can't kick because you can't add an IP in both temp IPs Ban and and Perm IPs Ban field at same time. so, 128 +16 +8 is imposible. 'Banname Const blnBR = True ' WARNING, True will allow you to banname registred users,WARNING user account will be deleted. limited to class lower then set by bytBRMC Const blnKCEna = True ' Enable x kick = banname. same warning then above. uneffective on class higher or equal to the class of the kicker. limited to class lower then set by bytBRMC Const bytBRMC = 5 ' Maximum Class that Protector and the banname command is allow to Banname(delete user account). Warning Admin can still banname any users(delete their accounts) Const blnNKC = True ' semd msg to OPs in main stating the number of times a user has been kicked(when he is kicked) Const iKN = 3 ' Number of main message found with, is kicking, sent by an OPs before banname occure.(Won't ban OPs) Const iTBTL = 360 ' Banname time in minutes 'mute Const iMTL = 1 ' Time lenght of the Temporary Mute in minuts Const bytMCMC = 7 ' class lower or equal to this setting are NOT allow to clear temp/perm/clearall Mute. set to 5 allow Ops to use those options, set to 7 allow SOps, etc... 'kick Const iKTL = 60 ' Time lenght of the Temporary Kick in minuts. This has nothing to do with the default hub's temp IP ban time. it is use by the script to extend the hub's default temp IP ban for some of the actions. 'PMs Const blnACP = True ' True to scan PM for advertising (IPs and URL(Deny Array)),does'nt affect users with class >= bytFMC even if True Const blnMMLP = True ' True to limit message size in PM. does'nt affect users with class >= bytFMC even if True 'minimum msg length Const blnMME = True ' True to prevent 1 carracter messages,in Main Chat and PM.(disable in PM if blnMMLP = False) Const bytMMC = 5 ' set the min Class not affected by one carracter message length 'VIP slot/share Const blnNSSTO = True ' True to Notify Ops of VIPs failing Slot/Share and that action, after delay is over, has been taken. Const bytSlot = 1 ' set the min slot requirement of reg and VIP, bypass hub's setting if set lower then the hub's setting. Const dblSS = 1073741824 ' Minimum share size(in bytes) requirement of reg and VIP, bypass hub's setting if set lower then the hub's setting. Ex: 5120000000 = 5 Gigs = 5 * 1024 * 10 ^ 6 Const iDSS = 15 ' delay (in minuts) before action is taken for vip/reged/unreged not meeting minimun slot and share.(reged/unreged <--only if hub require less than the script slot/share settings) Const bytSSA = 0 ' actions can be add together for more options. There is special cases where 1 and 2 can be add together to specify that both action are permanent in multi action cases. ex: case 195,203 and 227(case 227 = banip perm,banname perm,redirect) ' 0 = disable, 1 = Temporary(Force time length(not valid with all actions)), 2 = permanent(not valid with all actions), 4 = mute,8 = Disconnect, 16 = kick, 32 = Redirect, 64 = banname 128 = BanIP. ' valide numbers are 0,4,6,8,16,17,32,64,66,72,74,80,81,82,83,96,98,128,130,136,138,160,162,192,194,195,200,202,203,224,226 or 227 ' ex: (BanIP + banname) + permanent + Disconnect = (128 + 64) + 2 + 8 = 202 obviously you can't kick because you can't add an IP in both temp IPs Ban and and Perm IPs Ban field at same time. so, 128 +16 +8 is imposible. 'Hub Link Const blnLink = True ' True to allow connection from sAFIP only Const sAFIP = "127.0.0.1" ' Allow connection from this IP only... 127.0.0.1 = localhost = the puter running this script. (If you don't know what this is for, don't change the IP, witch is your own puter by default). Const bytHLDA = 17 ' set action for un-authorise access attempt. 'dcgui Const blnDCGUI = True ' False to ALLOW dcgui clients Const bytDCGUIA = 17 ' action for dcgui, 0 = no action. but if blnDCGUI = True, a message will still be sent to DCGUI client that they are not welcome. 'misc Const iIsIP = 5 ' anti IP advertising sensibility, MUST be between 4 and 12, if you see to many false possitive increment it by 1 Const blnKFS = True ' Fake Share Detection. Catch more fake share then the hub do. Const blnRB = True ' Warning This is not a Firewall, use as few Ranges as possible. True to enable IPs Range Banning,Add Ips range to IPs_Ban_Range.txt.txt. 'special Const blnROK = True ' True to Kick, False to Redirect, do nothing if blnKNoS = False Const blnKNoS = True ' If True, Kick or redirect user if is share is lower then 10 Bytes, so they don't try to re-connect each 2 minutes. Const bytKNoSC = 5 ' minimun Class not check for lower then 10 Bytes share. Const sRUNoS = "thenopdchub.no-ip.com" ' users with share lower then 10 Byte will be redirected to this Address. Const blnKOR = True ' True to Kick, False to Redirect, do nothing if blnKHTMH = False Const blnKHTMH = True ' If True, Kick or redirect users witch are in more hubs then the hub's max hubs count setting, so they don't try to re-connect each 2 minutes. ' It got side effect,It will also kick client with no tag, in faq, all clients without a standard H: in there tag. only check unregistred hubs count. Const bytKHTMHC = 5 ' Minimum Class not checked against the max hubs count setting. Const sRHHC = "thenopdchub.no-ip.com" ' users with hubs count higher then SDCH max hubs setting count will be redirected to this address. Const bytMaxHubs = 50 ' maximum number of hubs a user is allow to be in at same time. only count hubs where the user is un-registred. 'Welcome msg Const blnWelR = False ' True to enable, Send Welcome message for normal registred users.'enabled this could potentialy spam the main chat Const blnWelV = True ' True to enable, Send Welcome message for VIP Const blnWelO = True ' True to enable, Send Welcome message for Ops Const blnWelS = True ' True to enable, Send Welcome message for SOps Const blnWelA = True ' True to enable, Send Welcome message for Admin Const blnNOWel = True ' enable Send custom Welcome messages,IF THIS IS DISABLED ALL OF THE PREVIOUS WELCOME SETTINGS MUST BE DISABLE Const blnHITU = False ' true to send welcome hub's uptime to unregistred, could be potentially hard on computer resources. Const blnHITR = True ' true to send welcome hub's uptime to All users except unregistred users, 'Left msg Const blnLeftV = True ' True to enable, Send Welcome message for VIP Const blnLeftO = True ' True to enable, Send Welcome message for Ops Const blnLeftS = True ' True to enable, Send Welcome message for SOps Const blnLeftA = True ' True to enable, Send Welcome message for Admin Const blnLeft = True 'Messages specific to a user leave 'User Commands Const userCom = True ' True to send $UserCommand, False to disable, even set to false OPs will get them. Const RegCom = True ' True to send $UserCommand, False to disable, even set to false OPs will get them. Const VipCom = True ' True to send $UserCommand, False to disable, even set to false OPs will get them. 'Translator Const blnTMC = True ' Main Chat, Replace / translate words that are in Translations.xml Const blnTPM = True ' PM, Replace / Translate words that are in Translations.xml Const bytTMC = 5 ' Class not affected by Words Translation. Include all the class higher then this one. 'Connector Const iMDC = 2 ' Minimum userclass which can download (0=allow all) this setting +1 = class allow ex: set to 2 = class 3 and up can dl/upl/search. Const blnIU = True ' If you want the script to informs connecting users about Upload/Download limiting(if their class is not allowed). Const iCI = 5 ' Time before oRequests is cleared in minutes Const blnSSW = True ' Warn users if they try to search but can NOT due to their class not high enough. 'Chat Bots Const blnCO = True ' activate/de-activate ChatBot 1. Const sCOName = "*VipChat-Local" ' name of ChatBot 1.(name can be anything) (space are not allowed in name) Const bytCOMC = 5 ' 1=All users Chat, 2=Mentored chat 3=RegChat, 5=VipChat, 6=OpChat, 8=SuperOpChat, 10=AdminChat Const blnCT = True ' activate/de-activate ChatBot 2. Const sCTwo = "*SOpChat-Local" ' name of ChatBot 2.(name can be anything) (space are not allowed in name) Const bytCTMC = 9 ' 1=All users Chat, 2=Mentored chat 3=RegChat, 5=VipChat, 6=OpChat, 8=SuperOpChat, 10=AdminChat Const blnCThr = True ' activate/de-activate ChatBot 3. Const sCThr = "*AdmChat-Local" ' name of ChatBot 2.(name can be anything) (space are not allowed in name) Const bytCThrMC = 11 ' 1=All users Chat, 2=Mentored chat 3=RegChat, 5=VipChat, 6=OpChat, 8=SuperOpChat, 10=AdminChat Dim Deny, Allow, NA, AL 'Array of URL and banned/allow words Dim blnMTmr 'timer control for mute dictionary clearing Dim blnBNTmr 'timer control for temp Banname DataBase clearing Dim aCurData 'predata split array Dim sUser 'predata, temp Dim oRequests, iCounter 'predata, connector Dim asData 'dataarrival split array Dim oDNS, sIP, sIP1 'DNS To IP / IPs check Dim sTitle 'topic , see if i could pass as a param instead... Dim sPP, iPort, WhoHow 'ping Dim aRLC(4) 'in hub regged(reglist) Dim blnTL 'traffic logging on/off. See traffic command. Dim aVipcb 'commands that Vips can use Dim aOpcb 'commands that Ops can use Dim aSOpcb 'commands that SOps can use Dim aAdmcb 'commands that Admins can use Dim aAsso 'action/action number association Dim aAdmin 'Admins Array Dim aFakeSS, sFake, arrSplit 'fake share size Dim sTmpByt 'hubs count Dim sRKey 'Range Ban Dim sLanIP Dim sDNS1 ' DNS for protection of some critical commands NEED DNS.ocx Dim sDNS ' Only a puter connecting from this URL will be able to log in hub with Hub-Link, the URL is convert to an IP. NEED DNS.ocx Dim NLT3 'typing saver Dim NLT1 'typing saver NLT3 = vbNewline & String(3, vbTab) NLT1 = vbNewline & String(1, vbTab) Class clsTranslate Public Find Public Replace End Class ' -------------------------------------------------- Sub Main() Dim x, y, aLIPB, lngTOne, lngTTwo 'translation Dim objXML Dim colNodes Dim colAttr Dim objNode Dim objTrans 'use to protect some critical commands and combo actions. 'do not forget to disable the action(s)(delete the action(s) number from aAdmcb array), 'to disable the action for admins not in this array. Make sure that those users have strong passworded accounts as they will have access to commands like set. aAdmin = Array("TheNOP") ' deny words Deny = Array("-com",".com ","com:",".uni.",".homeip.", ".sytes.", "myftp", "servebeer","no-ip","n o - i p","n o - i p",".mine.","kicks-ass",".ath.","gotdns",".net", ".com",".ru ",".nu ",".ru:",".nu:",".org","servehttp","dyndns","udgnet",".tropico",".biz","zapto","hopto",".info",".se ",".ro ",".lv ",".ca ",".cx ",".dk ",".nz ",".se:",".ro:",".lv:",".ca:",".cx:",".dk:",".nz:") ' allow words. Keep http://hub-link.sf.net in this array if you wish to use hub link. Allow = Array("thenopdchub.no-ip.com", "gamesworldz.com", "TND.sytes.net","http://hub-link.sf.net","@gmail.com","@hotmail.com") 'Administrative combo commands available to vip, remove/add action(s) number that you don't want, or want Vip to use. By default only mute and Disconnect are enable. aVipcb = Array("4","8") 'Administrative combo commands available to Ops, remove/add action(s) number that you don't want, or want Ops to use. By default, no redirection / perm combo actions are enable. aOpcb = Array("4","8","16","17","64","72","80","81","128","136","192","200") 'Administrative combo commands available to SOps, remove/add action(s) number that you don't want, or want SOps to use. By default all combo actions, except Redirection, are enable. aSOpcb = Array("4","6","8","16","17","64","66","72","74","80","81","82","83","128","130","136","138","192","194","195","200","202","203") 'Administrative combo commands available to Admins, remove action(s) number that you don't want all admins to use. By default all combo actions are enable. aAdmcb = Array("4","6","8","16","17","32","64","66","72","74","80","81","82","83","96","98","128","130","136","138","160","162","192","194","195","200","202","203","224","226","227") 'fake share size aFakeSS = Array("098765","987654","876543","765432","654321","543210","123456","123450","234567","345678","456789","567890","11111","00000","22222","33333","44444","55555","66666","77777","88888","99999") blnTL = False Set m_objMuted = NewDictionary Set m_objComFlood = NewDictionary 'commands/messages Set m_objVipSC = NewDictionary 'Vip slot/share Set m_objRedir = NewDictionary 'part of the redirect unreged users auto Set oDNS = CreateObject("DNSControl.DNS") 'DNS to IP, DNS.ocx Set oRequests=NewDictionary 'connector Set m_objPing = NewDictionary Set m_objKick = NewDictionary 'X kick = banname ,can't be any other action, user is already kicked... 'translation Set m_colTranslations = NewCollection Set objXML = NewXMLParser If blnNOWel Then Set m_objMessages = CreateObject("Scripting.Dictionary") 'welcome If blnLeft Then Set l_objMessages = CreateObject("Scripting.Dictionary") 'Left objXML.Data = FileAccess.ReadFile(FileAccess.AppPath & "\Scripts\help\Translations.xml") objXML.Parse Set colNodes = objXML.Nodes("Translations").Nodes For Each objNode In colNodes Set colAttr = objNode.Attributes Set objTrans = New clsTranslate objTrans.Find = colAttr("Find").Value objTrans.Replace = colAttr("Replace").Value m_colTranslations.Add objTrans frmHub.DoEventsForMe Next Set colAttr = Nothing Set colNodes = Nothing Set objNode = Nothing Set objTrans = Nothing Set objXML = Nothing Set m_objRBan = NewDictionary 'Range Ban aLIPB = Split(Replace(CStr(FileAccess.ReadFile(".\Scripts\IPs_Ban_Range.txt")), VbNewLine, " "), " ") If UBound(aLIPB) Then For y = 0 to Ubound(aLIPB)-1 Step 2 If bIsIP(aLIPB(y)) Then If bIsIP(aLIPB(y+1)) Then lngTOne = IPtoDec(aLIPB(y)) lngTTwo = IPtoDec(aLIPB(y+1)) m_objRBan.Add CLng(lngTOne), CLng(lngTTwo) Else Exit For End If Else Exit For End If Next End If aAsso = Split(Replace(CStr(FileAccess.ReadFile(".\Scripts\help\Names_ActionsNumber.txt")), VbNewLine, " "), " ") If Not colCommands.Exists("mute") Then colCommands.Add 5434, "mute", "Mute a user", 5, True If Not colCommands.Exists("unmute") Then colCommands.Add 5434, "unmute", "Un-mute a user ", 6, True If Not colCommands.Exists("listmute") Then colCommands.Add 5434, "listmute", "Show a list of Muted user(s)", 6, True If Not colCommands.Exists("dnstoip") Then colCommands.Add 5434, "dnstoip", "Resolve a DNS to an IP", 5, True If Not colCommands.Exists("topic") Then colCommands.Add 5434, "topic", "Add a topic to the Hub's Name in DC++ Title bar", 10, True If Not colCommands.Exists("ping") Then colCommands.Add 5434, "ping", "Hub Pinger, to see if a hub is alive.", 5, True If Not colCommands.Exists("userhelp") Then colCommands.Add 5434, "userhelp", "Send User a help File", 1, True If Not colCommands.Exists("reg") Then colCommands.Add 5434, "reg", "Registration command.", 6, True If Not colCommands.Exists("regme") Then colCommands.Add 5434, "regme", "Self-Registration command.", 1, True '<---- set to False if you don't want users to reg themself If Not colCommands.Exists("reglist") Then colCommands.Add 5434, "reglist", "Shows list of registered users and their class, type reglist or reglist [one of the following: Regged=3 ; Vip=5 ; Op=6 ; SOp=8 ; Admin=10]", 6, True If Not colCommands.Exists("unreg") Then colCommands.Add 5434, "unreg", "Users account deletion command.", 6, True If Not colCommands.Exists("hubinfo") Then colCommands.Add 5434, "hubinfo", "Show hub information", 2, True If Not colCommands.Exists("uptime") Then colCommands.Add 5434, "uptime", "Show hub uptime", 10, True If Not colCommands.Exists("hubstat") Then colCommands.Add 5434, "hubstat", "Show hub status", 2, True If Not colCommands.Exists("changeclass") Then colCommands.Add 5434, "changeclass", "Change the Class of other user.", 6, True If Not colCommands.Exists("changepass") Then colCommands.Add 5434, "changepass", "Changes your own password", 2, True If Not colCommands.Exists("mmtc") Then colCommands.Add 5434, "mmtc", "Mass Message To a specific Class", 10, True If Not colCommands.Exists("rules") Then colCommands.Add 5434, "rules", "Send the Rules to user", 1, True If Not colCommands.Exists("network") Then colCommands.Add 5434, "network", "Network Infos", 2, True If Not colCommands.Exists("traffic") Then colCommands.Add 5434, "traffic", "Start/Stop loging traffic on/off", 6, True If Not colCommands.Exists("MyIP") Then colCommands.Add 5434, "myip", "Tell you your own IP", 1, True If Not colCommands.Exists("set") Then colCommands.Add 5434, "set", "Show / change the Hub's settings", 10, True If Not colCommands.Exists("cb") Then colCommands.Add 5434, "cb", "Combo Commands / disconnect,kick,ban,etc...", 5, True If Not colCommands.Exists("clear") Then colCommands.Add 5434, "clear", "Clear temp or perm IPs Ban", 10, True If Not colCommands.Exists("banname") Then colCommands.Add 5434, "banname", "temp/perm ban a user nick", 6, True If blnCO Then frmHub.RegisterBotName CStr(sCOName),True If blnCT Then frmHub.RegisterBotName CStr(sCTwo),True If blnCThr Then frmHub.RegisterBotName CStr(sCThr),True frmHub.oPermaCon.Execute "Delete UsrClass.* From UsrClass Inner Join BanNames On UsrClass.UserName = BanNames.UserName Where (BanNames.Perm=False And BanNames.RefDate<#" &DBDate(Now()) &"#);", x, 129 If x>0 Then RefreshBanGrid x = CountTB() If x>0 Then blnBNTmr = True tmrScriptTimer.Interval=60000 tmrScriptTimer.Enabled=True sIP = oDNS.NameToAddress(CStr(sDNS)) sIP1 = oDNS.NameToAddress(CStr(sDNS1)) 'DNS To IP for protections sDNS = "gamesworldz.com,shadows2.no-ip.biz,thenopdchub.no-ip.com" ' Only a puter connecting from this URL will be able to log in hub with Hub-Link, the URL is convert to an IP. NEED DNS.ocx sDNS1 = "gamesworldz.com,shadows2.no-ip.biz,thenopdchub.no-ip.com" ' DNS for protection of some critical commands NEED DNS.ocx sLanIP = "192.168.0.11" ' Commands sent fron this LAN IP will bypass any commands protection.(Keep it a LAN IP, use sDNS1 = for external IP authorisation FileAccess.AppendFile FileAccess.AppPath & "\Scripts\help\Traffic.txt", (Now & " Hub started") FileAccess.AppendFile FileAccess.AppPath & "\Scripts\help\RegsTraffic.txt", (Now & " Hub started") FileAccess.AppendFile FileAccess.AppPath & "\Scripts\help\OPsTraffic.txt", (Now & " Hub started") 'Default enter message <-------------------------------------------------------------> Welcome Default enter message If blnWelR then m_objMessages.Add "DefaultReg", VbTab & "Yeay!, %[user] is here." If blnWelV then m_objMessages.Add "DefaultVIP", VbTab & "Yeay!, [VIP], %[user] is here.Welcome Back My Friend" If blnWelO then m_objMessages.Add "DefaultOp", VbTab & VbTab & "The [OP], %[user], is here, who want to be Kick ?." If blnWelS then m_objMessages.Add "DefaultSOp", "The [SOP], %[user], is here, "& NLT3 _ & " ##### "& NLT3 _ & " ####### "& NLT3 _ & " ## ( . ) . ) "& NLT3 _ & " # ) "& NLT3 _ & " \ c "& NLT3 _ & " ( ( ______/_ "& NLT3 _ & " / _?------._ "& NLT3 _ & " / \ / \ \ _ "& NLT3 _ & " / / \ >----.____/ ? who wants to be Kicked ?. "& NLT3 _ & " / ? \ \ ` . /--------_/ "& NLT3 _ & " \__ \ "& NLT3 _ & " / /_ "& NLT3 _ & " \___\ "& NLT3 If blnWelA then m_objMessages.Add "DefaultAdm", vbTab & "The [ADM], %[user], Say, Hello to everyone." 'Messages specific to a user <--------------------------------------------------------> Welcome Messages specific to a user If blnNOWel Then m_objMessages.Add "TheNOP", vbTab & vbTab & vbTab & "Beware, TheNOP is here now." If blnNOWel Then m_objMessages.Add "Selyb", vbTab & vbTab & vbTab & "Beware, Selyb is here now." If blnNOWel Then m_objMessages.Add "Sonickillu", "Hey, Look who's here... Our good fellow Sonickillu." If blnNOWel Then m_objMessages.Add "[OP]OU812", "The [SOP], [OP]OU812 is here to kick your ass" If blnNOWel Then m_objMessages.Add "[OP][512]jasonwaters", "The [SOP], [OP][512]jasonwaters is here, who wants To get their hands cut off ?" 'Messages specific to a user leave If blnLeftV Then l_objMessages.Add "DefaultVIP", "The [VIP], %[user] went left, ...bye..bye" If blnLeftO Then l_objMessages.Add "DefaultOp", "The [OP], %[user] went left, see ya l8tr ...ayeee" If blnLeftS Then l_objMessages.Add "DefaultSOp", "The [SOP], %[user] went left, ..brb.. will right back soon" If blnLeftA Then l_objMessages.Add "DefaultAdm", "The [ADM], %[user] went left, ..brb.. will right back" End Sub ' -------------------------------------------------- Sub UnloadMain colCommands.Remove("mute") colCommands.Remove("unmute") colCommands.Remove("listmute") colCommands.Remove("dnstoip") colCommands.Remove("topic") colCommands.Remove("ping") colCommands.Remove("userhelp") colCommands.Remove("regme") colCommands.Remove("reg") colCommands.Remove("reglist") colCommands.Remove("unreg") colCommands.Remove("mmtc") colCommands.Remove("hubinfo") colCommands.Remove("uptime") colCommands.Remove("hubstat") colCommands.Remove("changeclass") colCommands.Remove("changepass") colCommands.Remove("rules") colCommands.Remove("network") colCommands.Remove("traffic") colCommands.Remove("myip") colCommands.Remove("set") colCommands.Remove("cb") colCommands.Remove("clear") frmHub.UnregisterBotName CStr(sCOName) frmHub.UnregisterBotName CStr(sCTwo) frmHub.UnregisterBotName CStr(sCThr) End Sub ' -------------------------------------------------- Sub CustComArrival(curUser, objCommand, sData, blnMC) Dim aDataSplit, sAdmNick, blnFound, x aDataSplit = Split(sData, " ", 4) If objCommand.ID = 5434 Then Select Case objCommand.Name Case "hubinfo" Select Case CByte(curUser.Class) Case 1, 2, 3, 4, 5 Reply curUser, "" & NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::: HUBINFO :::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &": HubName" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.HubName & NLT1 _ &": Address" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.HubIP & NLT1 _ &": Description" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.HubDesc & NLT1 _ &": Hub Port" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.Ports & NLT1 _ &": MinShare" & vbTab & vbTab & vbTab & vbTab & ":" & ShareSize(Settings.MinShare) & NLT1 _ &": MaxShare" & vbTab & vbTab & vbTab & vbTab & ":" & ShareSize(Settings.MaxShare) & NLT1 _ &": Redirect" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.RedirectAddress & NLT1 _ &": MinSlots" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.MinSlots & NLT1 _ &": MaxHubs" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.DCMaxHubs & NLT1 _ &": MaxUsers" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.MaxUsers & NLT1 _ &": MinSlot/Hub" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.DCSlotsPerHub & NLT1 _ &": Dft BanTime" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.DefaultBanTime & NLT1 _ &": Upload Limit" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.DCBandPerSlot & NLT1 _ &":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1, blnMC Case 6, 7, 8, 9, 10 ,11 Reply curUser, "" & NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::: HUBINFO :::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &":: Hub Name" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.HubName & NLT1 _ &":: Description" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.HubDesc & NLT1 _ &":: Address" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.HubIP & NLT1 _ &":: Running on Port(s)" & vbTab & vbTab & vbTab & ":" & Settings.Ports & NLT1 _ &":: Max Users" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.MaxUsers & NLT1 _ &":: Max Hubs" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.DCMaxHubs & NLT1 _ &":: Min Slots" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.MinSlots & NLT1 _ &":: Min Share" & vbTab & vbTab & vbTab & vbTab & ":" & ShareSize(Settings.MinShare) & NLT1 _ &":: Max Share" & vbTab & vbTab & vbTab & vbTab & ":" & ShareSize(Settings.MaxShare) & NLT1 _ &":: Default Ban Time" & vbTab & vbTab & vbTab & ":" & Settings.DefaultBanTime & NLT1 _ &":: Bot Name" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.BotName & NLT1 _ &":: Bot Name Enabled" & vbTab & vbTab & vbTab & ":" & Settings.UseBotName & NLT1 _ &":: Op Chat Name" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.OpChatName & NLT1 _ &":: OP Chat Enabled" & vbTab & vbTab & vbTab & ":" & Settings.UseOpChat & NLT1 _ &":: Current Redirect Address" & vbTab & vbTab & vbTab & ":" & Settings.RedirectIP & NLT1 _ &":: All Redirect Addressed" & vbTab & vbTab & vbTab & ":" & Settings.RedirectAddress & NLT1 _ &":: Registration Address" & NLT1 _ &":" & Settings.RegisterIP & NLT1 _ &":: AutoRegister with Hublists" & vbTab & vbTab & vbTab & ":" & Settings.AutoRegister & NLT1 _ &":: Autostart Serving on Startup" & vbTab & vbTab & ":" & Settings.AutoStart & NLT1 _ &":: Commands Enabled" & vbTab & vbTab & vbTab & ":" & Settings.EnabledCommands & NLT1 _ &":: Command Prefix" & vbTab & vbTab & vbTab & vbTab & ":" & Chr(Settings.CPrefix) & NLT1 _ &":: Filter Lines with Command Prefix from Chat" & vbTab & ":" & Settings.FilterCPrefix & NLT1 _ &":: Global Password Mode Enabled" & vbTab & vbTab & ":" & Settings.PasswordMode & NLT1 _ &":: Global Password" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.HubPassword & NLT1 _ &":: Chat Only Mode" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.ChatOnly & NLT1 _ &":: Registered User Hub Only" & vbTab & vbTab & vbTab & ":" & Settings.RegOnly & NLT1 _ &":: Prevent Password Guessing" & vbTab & vbTab & ":" & Settings.PreventGuessPass & NLT1 _ &":: Max Password Attempts" & vbTab & vbTab & vbTab & ":" & Settings.MaxPassAttempts & NLT1 _ &":: Floodwall Enabled" & vbTab & vbTab & vbTab & ":" & Settings.EnableFloodWall & NLT1 _ &":: Floodwall Interval" & vbTab & vbTab & vbTab & ":" & Settings.FWInterval & " milliseconds" & NLT1 _ &":: Floodwall Ban Length" & vbTab & vbTab & vbTab & ":" & Settings.FWBanLength & " minutes" & NLT1 _ &":: MyINFOs per FW Interval" & vbTab & vbTab & vbTab & ":" & Settings.FWMyINFO & NLT1 _ &":: GetNickLists per FW Interval" & vbTab & vbTab & ":" & Settings.FWGetNickList & NLT1 _ &":: Active Searches per FW Interval" & vbTab & vbTab & ":" & Settings.FWActiveSearch & NLT1 _ &":: Passive Searches per FW Interval" & vbTab & vbTab & ":" & Settings.FWPassiveSearch & NLT1 _ &":: Minimum Passive Search Length" & vbTab & vbTab & ":" & Settings.MinPassiveSearchLen & " characters" & NLT1 _ &":: AutoKick MLDC" & vbTab & vbTab & vbTab & vbTab & ":" & Settings.AutoKickMLDC & NLT1 _ &":: Block Certain Search Bots" & vbTab & vbTab & vbTab & ":" & Settings.PreventSearchBots & NLT1 _ &":: Run Quick Fake Share Checks" & vbTab & vbTab & ":" & Settings.CheckFakeShare & NLT1 _ &":: Count Op Hubs Towards Total Hubs" & vbTab & vbTab & ": " & Settings.DCIncludeOPed & NLT1 _ &":: Ops Bypass Share and Slot Rules" & vbTab & vbTab & ":" & Settings.OPBypass & NLT1 _ &":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1, blnMC End Select Case "uptime" Select Case CByte(curUser.Class) Case 10,11 colUsers.SendChatToAll Settings.BotName, "" & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine & NLT3 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT3 _ &":::::::::::::::::::: UPTIME ::::::::::::::::::"& NLT3 _ & vbTab&frmHub.MinToDate(DateDiff("n", frmHub.ServingDate, Now())) & NLT3 _ &" Hub" & vbTab & ":" & Settings.HubName & NLT3 _ &" Users" & vbTab & ":" & colUsers.Count & " / " & colUsers.PeakUsers & NLT3 _ &" Ops" & vbTab & ":" & colUsers.Opcount & " / " & colUsers.PeakOps & NLT3 _ &" Share" & vbTab & ":" & ShareSize(colUsers.iTotalBytesShared) & " / " & ShareSize(colUsers.iPeakBytesShared) & NLT3 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT3 End Select Case "hubstat" CountLogins Reply curUser, "" & NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::: HUBSTATS :::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &": PeakUsers " & vbTab & vbTab & vbTab & vbTab & ":" & colUsers.PeakUsers & NLT1 _ &": PeakOps " & vbTab & vbTab & vbTab & vbTab & ":" & colUsers.PeakOps & NLT1 _ &": PeakShared" & vbTab & vbTab & vbTab & vbTab & ":" & ShareSize(colUsers.iPeakBytesShared) & NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &":::::::::::::::::::::::::::::::::::::::::: Online/Registered :::::::::::::::::::::::::::::::::::::"& NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &": Users " & vbTab & vbTab & vbTab & vbTab & ":" & colUsers.Count & NLT1 _ &": Regs " & vbTab & vbTab & vbTab & vbTab & ":" & aRLC(0) & " / "& RegCount(3) & NLT1 _ &": Vips " & vbTab & vbTab & vbTab & vbTab & vbTab & ":" & aRLC(1) & " / "& RegCount(5) & NLT1 _ &": Ops " & vbTab & vbTab & vbTab & vbTab & ":" & aRLC(2) & " / "& RegCount(6) & NLT1 _ &": Sops " & vbTab & vbTab & vbTab & vbTab & ":" & aRLC(3) & " / "& RegCount(8) & NLT1 _ &": Admin " & vbTab & vbTab & vbTab & vbTab & ":" & aRLC(4) & " / "& RegCount(10) & NLT1 _ &": Shared " & vbTab & vbTab & vbTab & vbTab & ":" & ShareSize(colUsers.iTotalBytesShared) & NLT1 _ &": Bans Temp" & vbTab & vbTab & vbTab & vbTab & ":" & colIpBans.TempItems.Count & NLT1 _ &": Bans Perm" & vbTab & vbTab & vbTab & vbTab & ":" & colIpBans.PermItems.Count & NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1 _ &":" & vbTab & vbTab & vbTab & frmHub.MinToDate(DateDiff("n", frmHub.ServingDate, Now())) & NLT1 _ &":" & vbTab & vbTab & "http://shadowdc.sourceforge.net" & NLT1 _ &"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"& NLT1, blnMC Case "userhelp" If Not FileAccess.FileExists(".\Scripts\help\help.xml") Then Reply curUser, "Error, No help Files Available, please tell the hub owner", blnMC :Exit Sub Reply curUser, FileAccess.ReadFile (FileAccess.AppPath & "\Scripts\help\help.xml"), blnMC Case "network" If Not FileAccess.FileExists(".\Scripts\help\Network.xml") Then Reply curUser, "Error, No help Files Available, please tell the hub owner", blnMC :Exit Sub Reply curUser, FileAccess.ReadFile (FileAccess.AppPath & "\Scripts\help\Network.xml"), blnMC Case "reg" If curUser.Class < 5 Then curUser.SendPrivate Settings.BotName, "Your Class is not high enough to use this command." If blnMC Then curUser.SendPrivate Settings.BotName, "You MUST send your registration request in a private message.(To " & Settings.BotName & " for example)" Else ProcReg curUser, sData End If Case "regme" If blnMC Then curUser.SendPrivate "-+WARNING+-", "You MUST send your registration request in a private message to "&Settings.BotName&"." Else ProcRegMe curUser, MidB(sData, 11 + LenB(Settings.CSeperator)) End If Case "changeclass" If curUser.Class < 5 Then curUser.SendPrivate Settings.BotName, "Your Class is not high enough to use this command." If LenB(MidB(sData, 23 + LenB(Settings.CSeperator))) Then ProcCC curUser, sData Else curUser.SendPrivate Settings.BotName, "The proper ChangeClass command syntax is " & ChrW(Settings.CPrefix) & "changeclass nick newclass """ & Settings.CSeperator & """ is the seperator)." End If Case "changepass" PassAnalysis curUser, MidB(sData, 23), blnMC Case "unreg" If curUser.Class < 6 Then Reply curUser, "Your Class is not high enough to use this command.", blnMC If LenB(MidB(sData, 11 + LenB(Settings.CSeperator))) Then ProcUnReg curUser, sData, blnMC Else Reply curUser, "The proper UnReg command syntax is " & ChrW(Settings.CPrefix) & "unreg nick reason """ & Settings.CSeperator & """ is the seperator).", blnMC End If Case "banname" BanAnalysis curUser, MidB(sData, 17), blnMC Case "reglist" For Each x In aAdmin If curUser.sName = CStr(x) Then blnFound = True :Exit For Next If curUser.IP = CStr(sLanIP) Or CStr(curUser.IP) = CStr(sIP1) Then blnFound = True If blnFound Then blnFound = False If Not blnMC Then Reply curUser, " Please wait while loading ........", blnMC If LenB(Trim(sData)) > 14 Then SendList curUser, MidB(Trim(sData), 17) Else SendList curUser, Empty End If Else Reply curUser, "You don't have the authority to use this command", blnMC End If Case "mmtc" For Each sAdmNick In aAdmin If curUser.sName = CStr(sAdmNick) Then blnFound = True :Exit For Next If curUser.IP = CStr(sLanIP) Or CStr(curUser.IP) = CStr(sIP1) Then blnFound = True If blnFound Then blnFound = False If LenB(MidB(sData, 9 + LenB(Settings.CSeperator))) Then SendCToC curUser, sData, blnMC Else Reply curUser, "The proper Message To Class command syntax is " & ChrW(Settings.CPrefix) & "mmtc class message and """ & Settings.CSeperator & """ is the seperator).", blnMC End If Else Reply curUser, "You don't have the authority to use this command", blnMC End If Case "rules" If Not FileAccess.FileExists(".\Scripts\help\Rules.xml") Then Reply curUser, "Error, No Rules Files Available, please tell the hub owner", blnMC :Exit Sub Reply curUser, FileAccess.ReadFile (FileAccess.AppPath & "\Scripts\help\Rules.xml"), blnMC Case "mute" If LenB(MidB(sData, 9 + LenB(Settings.CSeperator))) Then Mute curUser, sData, blnMC Else Reply curUser, "The proper Mute command syntax is " & ChrW(Settings.CPrefix) & "mute nick , and """ & Settings.CSeperator & """ is the seperator).", blnMC End If Case "unmute" If LenB(MidB(sData, 13 + LenB(Settings.CSeperator))) Then UnMute curUser, sData, blnMC Else Reply curUser, "The proper Un-Mute command syntax is " & ChrW(Settings.CPrefix) & "unmute [nick/perm/temp/reset] or " & ChrW(Settings.CPrefix) & "unmute [nick] [perm] perm is optionnal, and """ & Settings.CSeperator & """ is the seperator).", blnMC End If Case "listmute" If m_objMuted.count = 0 Then Reply curUser, "No User(s) are presently Muted ", blnMC :Exit Sub ListMute curUser, sData, blnMC Case "dnstoip" If LenB(MidB(sData, 15 + LenB(Settings.CSeperator))) Then DSNtoIP curUser, sData, blnMC Else Reply curUser, "You must provide a DNS for it to be resolved", blnMC End If Case "topic" For Each sAdmNick In aAdmin If curUser.sName = CStr(sAdmNick) Then blnFound = True :Exit For Next If curUser.IP = CStr(sLanIP) Or CStr(curUser.IP) = CStr(sIP1) Then blnFound = True If blnFound Then blnFound = False If LenB(MidB(sData, 11 + LenB(Settings.CSeperator))) Then Topic curUser, sData Else Reply curUser,"You must provide a new Topic if you want to change it", blnMC End If Else Reply curUser, "You don't have the authorisation to use this command", blnMC End If Case "ping" If IsEmpty(WhoHow) Then If LenB(MidB(sData, 9 + LenB(Settings.CSeperator))) Then Ping curUser, sData, blnMC Else Reply curUser, "The proper Ping command syntax is " & ChrW(Settings.CPrefix) & "ping URL Port ,Port is optionnal.(default is 411), and """ & Settings.CSeperator & """ is the seperator).", blnMC End If Else Reply curUser, WhoHow & " has just started a ping request. Please wait 1 minute before trying to ping again.", blnMC End If Case "traffic" If LenB(MidB(sData, 15 + LenB(Settings.CSeperator))) Then Traffic curUser,sData, blnMC Else Reply curUser, "The proper Traffic command syntaxe is " & ChrW(Settings.CPrefix) & "traffic [ on / off ] """ & Settings.CSeperator & """ is the seperator).", blnMC End If Case "myip" Reply curUser, "Your IP Is : "& curUser.IP, blnMC Case "set" For Each sAdmNick In aAdmin If curUser.sName = CStr(sAdmNick) Then blnFound = True :Exit For Next If curUser.IP = CStr(sLanIP) Or CStr(curUser.IP) = CStr(sIP1) Then blnFound = True If blnFound Then blnFound = False If LenB(MidB(sData, 7 + LenB(Settings.CSeperator))) Then SplitsData curUser, sData, blnMC Else Reply curUser, FileAccess.ReadFile(".\Scripts\help\SettingCommandhelp.xml"), blnMC End If Else Reply curUser, "You don't have the authorisation to use this command", blnMC End If Case "clear" For Each sAdmNick In aAdmin If curUser.sName = CStr(sAdmNick) Then blnFound = True :Exit For Next If curUser.IP = CStr(sLanIP) Or CStr(curUser.IP) = CStr(sIP1) Then blnFound = True If blnFound Then blnFound = False If LenB(MidB(sData, 11 + LenB(Settings.CSeperator))) Then ClearIPs curUser,sData, blnMC Else Reply curUser, "The proper Clear command syntaxe is " & ChrW(Settings.CPrefix) & "clear [temp/perm] """ & Settings.CSeperator & """ is the seperator).", blnMC End If Else Reply curUser, "You are not authorise to use that command", blnMC End If Case "cb" If LenB(MidB(sData, 5 + LenB(Settings.CSeperator))) Then If UBound(aDataSplit) < 2 Then Reply curUser, " User name are not optionnal with the cb command. Please include a user name... ", blnMC :Exit Sub If UBound(aDataSplit) < 3 Then Reply curUser, " Reasons are not optionnal with the cb command. Please say why... ", blnMC :Exit Sub blnFound = false If colUsers.OnLine(CStr(aDataSplit(2))) Then If Not curUser.Class > colUsers.ItemByName(CStr(aDataSplit(2))).Class Then Reply curUser, "Really funny... he is your superior or have the same class as you... ", blnMC :Exit Sub Else Reply curUser, "User " & aDataSplit(2) & " is not online", blnMC Exit Sub End If If Not IsNumeric(aDataSplit(1)) Then For x = 0 to Ubound(aAsso)-1 Step 2 If aAsso(x) = aDataSplit(1) Then aDataSplit(1) = aAsso(x+1) blnFound = True Exit For End If Next If blnFound Then blnFound = False Else Reply curUser, "The proper cb command syntaxe is " & ChrW(Settings.CPrefix) & "cb [action number][nick][message] """ & Settings.CSeperator & """ is the seperator)." & VbNewLine, blnMC Reply curUser, FileAccess.ReadFile(".\Scripts\help\Action_help.txt") & VbNewLine, blnMC Reply curUser, "Or Action_help.txt is wrongly set " & VbNewLine & FileAccess.ReadFile(".\Scripts\help\Names_ActionsNumber.txt"), blnMC Exit Sub End If End If Select Case curUser.Class Case 5 For x = 0 To UBound(aVipcb) If aVipcb(x) = aDataSplit(1) Then blnFound = True :Exit For Next Case 6,7 For x = 0 To UBound(aOpcb) If aOpcb(x) = aDataSplit(1) Then blnFound = True :Exit For Next Case 8,9 For x = 0 To UBound(aSOpcb) If aSOpcb(x) = aDataSplit(1) Then blnFound = True :Exit For Next Case 10,11 For x = 0 To UBound(aAdmcb) If aAdmcb(x) = aDataSplit(1) Then blnFound = True :Exit For Next End Select For Each sAdmNick In aAdmin If curUser.sName = CStr(sAdmNick) Then blnFound = True :Exit For Next If curUser.IP = CStr(sLanIP) Or CStr(curUser.IP) = CStr(sIP1) Then blnFound = True If blnFound Then Select Case aDataSplit(1) Case 0,4,6,8,16,17,32,64,66,72,74,80,81,82,83,96,98,128,130,136,138,160,162,192,194,195,200,202,203,224,226,227 ActOnColUser curUser, aDataSplit(2), aDataSplit(3), aDataSplit(1), blnMC Case Else Reply curUser, "Combo Name_ActionsNumber.txt error. It contain an invalide combo action number.", blnMC Reply curUser, "Can also be due to an invalide combo action number in aVipcb, aOpcb, aSOpcb or aAdmcb array in the script.", blnMC End Select Else Reply curUser, "You are not authorise to use that command", blnMC End If Else Reply curUser, "The proper cb command syntaxe is " & ChrW(Settings.CPrefix) & "cb [action number][nick][message] """ & Settings.CSeperator & """ is the seperator).", blnMC Reply curUser, FileAccess.ReadFile(".\Scripts\help\Action_help.txt"), blnMC End If End Select End If End Sub ' -------------------------------------------------- Sub ClearIPs(curUser,sData, blnMC) If MidB(sData, 13, 8) = "temp" Then colIPBans.ClearTemp :Reply curUser, "Temp IP Ban cleared", blnMC :Exit Sub If MidB(sData, 13, 8) = "perm" Then colIPBans.ClearPerm Reply curUser, "Perm IP Ban cleared", blnMC Else Reply curUser, "The proper Clear command syntaxe is " & ChrW(Settings.CPrefix) & "clear [temp/perm] """ & Settings.CSeperator & """ is the seperator).", blnMC End If End Sub ' -------------------------------------------------- Sub tmrScriptTimer_Timer() Dim sKey, y, x, bytTmp Dim Dummy Dummy = Empty If blnREna Then If m_objRedir.Count Then For Each sKey in m_objRedir.Keys If Not colRegistered.Registered(CStr(sKey)) Then If DateDiff("n", Now, CDate(m_objRedir.Item(sKey))) <= 0 then If colUsers.OnLine(CStr(sKey)) Then colUsers.ItemByName(CStr(sKey)).SendPrivate (Settings.BotName), " Your 15 Minuts have pass. You are still not registered in this hub... You will be redirect NOW " frmHub.DoEventsForMe colUsers.ItemByName(CStr(sKey)).Redirect() If colUsers.OnLine(CStr(sKey)) Then colUsers.ItemByName(CStr(sKey)).Disconnect If colUsers.Online(cstr(sAdmin)) Then colUsers.ItemByName(cstr(sAdmin)).SendPrivate Settings.HubName & "Unreged Redirected ", Now & "-" & CStr(sKey) & " Redirected after a : " & CStr(bytRTime) & " minuts waiting time." m_objRedir.Remove(sKey) End If End If If colRegistered.Registered(CStr(sKey)) Then m_objRedir.Remove(sKey) End If frmHub.DoEventsForMe Next sKey = Empty End If End If iCounter=iCounter+1 If iCounter=>iCI Then iCounter=0 oRequests.RemoveAll End If If m_objVipSC.Count Then For Each sKey in m_objVipSC.Keys If DateDiff("n", Now, CDate(m_objVipSC.Item(sKey))) <= 0 then If colUsers.OnLine(CStr(sKey)) Then If colUsers.ItemByName(CStr(sKey)).iBytesShared < CDbl(dblSS) Then If blnNSSTO Then colUsers.SendPrivateToOps (Settings.HubName & " Protector"), "The User " & curUser.sName & " - " & curUser.IP & " - " _ & " still does not meet the min Share requirement. Action has been taken after : " & iDSS & " minuts" & VbNewLine Else If colUsers.Online(cstr(sAdmin)) Then colUsers.ItemByName(cstr(sAdmin)).SendPrivate (Settings.HubName & " Protector"), "The User " & curUser.sName & " - " & curUser.IP & " - " _ & " still does not meet the min Share requirement. Action has been taken after : " & iDSS & " minuts" & VbNewLine End If ActOnColUser Settings.BotName, m_objVipSC.Item(sKey), "Your time delay has end up" & VbNewLine & "Not enough Share. You need at least : " & ShareSize(dblSS) & " of Share.", CByte(bytSSA), Dummy m_objVipSC.Remove(sKey) End If End If End If If m_objVipSC.Exists(sKey) Then If colUsers.OnLine(CStr(sKey)) Then For x = 1 to LenB(colUsers.ItemByName(CStr(sKey)).sMyInfoString)-1 Step 2 If AscW(MidB(colUsers.ItemByName(CStr(sKey)).sMyInfoString, x, 2)) = 62 Then If AscW(MidB(colUsers.ItemByName(CStr(sKey)).sMyInfoString, x+2, 2)) = 36 Then bytTmp = x Exit For End If End If Next If AscW(MidB(colUsers.ItemByName(CStr(sKey)).sMyInfoString, bytTmp - 4, 2)) = 58 Then If CInt(MidB(colUsers.ItemByName(CStr(sKey)).sMyInfoString, bytTmp - 2, 2)) < CByte(bytSlot) Then If blnNSSTO Then colUsers.SendPrivateToOps (Settings.HubName & " Protector"), "The User " & curUser.sName & " - " & curUser.IP & " - " _ & " still does not meet the min Share requirement. Action has been taken after : " & iDSS & " minuts" & VbNewLine Else If colUsers.Online(cstr(sAdmin)) Then colUsers.ItemByName(cstr(sAdmin)).SendPrivate (Settings.HubName & " Protector"), "The User " & curUser.sName & " - " & curUser.IP & " - " _ & " still does not meet the min Share requirement. Action has been taken after : " & iDSS & " minuts" & VbNewLine End If ActOnColUser Settings.BotName, m_objVipSC.Item(sKey), "Your time delay has end up" & VbNewLine & "Not enough Slot. You need at least : " & CByte(bytSlot) & " Slots open.", CByte(bytSSA), Dummy m_objVipSC.Remove(sKey) End If End If End If End If m_objVipSC.Remove(sKey) frmHub.DoEventsForMe Next sKey = Empty End If If blnBNTmr Then frmHub.oPermaCon.Execute "Delete UsrClass.* From UsrClass Inner Join BanNames On UsrClass.UserName = BanNames.UserName Where (BanNames.Perm=False And BanNames.RefDate<#" &DBDate(Now()) &"#);", x, 129 If x > 0 Then x = CountTB() If x = 0 Then blnBNTmr = False RefreshBanGrid End If End If If blnMTmr Then y = 0 For Each sKey in m_objMuted.Keys If IsDate(m_objMuted.Item(sKey)) Then y = y + 1 If DateDiff("n", Now, CDate(m_objMuted.Item(sKey))) <= 0 then m_objMuted.Remove CStr(sKey) If colUsers.OnLine(CStr(sKey)) Then colUsers.ItemByName(CStr(sKey)).Mute = False colUsers.SendChatToAll Settings.BotName, "The User " & CStr(sKey) & " is allow to speek again. Try to better behave next time." y = y - 1 End If End If frmHub.DoEventsForMe Next If y = 0 then blnMTmr = False End If If m_objComFlood.Count Then m_objComFlood.RemoveAll End Sub ' -------------------------------------------------- Function IPtoDec(UserIP) Dim lngDec, aTmpS aTmpS = Split(UserIP, ".") lngDec = aTmpS(0) * 16777216 + aTmpS(1) * 65536 + aTmpS(2) * 256 + aTmpS(3) IPtoDec = CLng(lngDec) End Function ' -------------------------------------------------- Function PreDataArrival(curUser,sData) Select Case AscW(sData) Case "36" aCurData = Split(MidB(sData, 3), " ", 3) Select Case aCurData(0) Case "MyINFO" If blnKNoS Then 'kick on no share (share lower then 10 Bytes) If curUser.Class < CByte(bytKNoSC) Then If AscW(MidB(sData, LenB(sData)-1, 2)) = AscW(MidB(sData, LenB(sData)- 5, 2)) Then If blnROK Then curUser.Kick Exit Function Else curUser.Redirect(CStr(sRUNoS)) PreDataArrival=Empty Exit Function End If End If End If End If If blnKFS Then arrSplit = Split(sData, "$") If UBound(arrSplit) > 6 Then If IsNumeric(arrSplit(6)) Then For Each sFake In aFakeSS If InStrB(1,arrSplit(6),CStr(sFake)) Then curUser.Kick PreDataArrival=Empty Exit Function End If Next Else 'Then it is Not a DC client or it is baddly hacked : ) curUser.Kick PreDataArrival=Empty Exit Function End If Else 'Then it is Not a DC client or it is baddly hacked : ) curUser.Kick PreDataArrival=Empty Exit Function End If End If If blnDCGUI Then If LCase(MidB(sData, LenB(curUser.sName)+29, 12)) = "dc-gui" Then ActOnCurUser curUser, " DCGUI are not allowed in this hub.", CByte(bytDCGUIA) PreDataArrival=Empty Exit Function End If If MidB(AfterFirst(MidB(sData,LenB(curUser.sName)+28), "<"), 1, 10) = "DCGUI" Then ActOnCurUser curUser, " DCGUI are not allowed in this hub.", CByte(bytDCGUIA) PreDataArrival=Empty Exit Function End If If LCase(MidB(sData, LenB(curUser.sName)+43, 10)) = "dcgui" Then ActOnCurUser curUser, " DCGUI are not allowed in this hub.", CByte(bytDCGUIA) PreDataArrival=Empty Exit Function End If End If '----------------------------------------------------------------------------------------- If blnKHTMH Then If curUser.Class < bytKHTMHC Then If InStrB(1,sData,"H:", 0) = 0 Then If blnKOR Then curUser.Kick ' If colUsers.Online(cstr(sAdmin)) Then 'No H: in tag kick ' colUsers.ItemByName(cstr(sAdmin)).SendPrivate Settings.BotName, Now & " No H: in tag kick " & "-" & sData ' End If PreDataArrival=Empty Exit Function Else curUser.Redirect(CStr(sRHHC)) PreDataArrival=Empty Exit Function End If End If If AscW(MidB(MidB(AfterFirst(sData, "H:"), 1, 6), 3, 2)) = 47 Then sTmpByt = MidB(AfterFirst(sData, "H:"), 1, 2) 'huh! impossible unless max hubs count < 10... If CByte(sTmpByt) > CByte(bytMaxHubs) Then If blnKOR Then curUser.Kick PreDataArrival=Empty Exit Function Else curUser.Redirect(CStr(sRHHC)) PreDataArrival=Empty Exit Function End If End If Else If AscW(MidB(MidB(AfterFirst(sData, "H:"), 1, 6), 3, 2)) = 44 Then ActOnCurUser curUser, " Bad clients are not allowed in here.", "17" PreDataArrival=Empty Exit Function End if End If If AscW(MidB(MidB(AfterFirst(sData, "H:"), 1, 6), 5, 2)) = 47 Then sTmpByt = MidB(AfterFirst(sData, "H:"), 1, 4) If CByte(sTmpByt) > CByte(bytMaxHubs) Then If blnKOR Then curUser.Kick PreDataArrival=Empty Exit Function Else curUser.Redirect(CStr(sRHHC)) PreDataArrival=Empty Exit Function End If End If Else If AscW(MidB(MidB(AfterFirst(sData, "H:"), 1, 6), 5, 2)) = 44 Then ActOnCurUser curUser, " Bad clients are not allowed in here.", CByte(bytDCGUIA) PreDataArrival=Empty Exit Function End if If Not AscW(MidB(MidB(AfterFirst(sData, "H:"), 1, 6), 3, 2)) = 47 Then sTmpByt = MidB(AfterFirst(sData, "H:"), 1, 6) If CInt(sTmpByt) > CByte(bytMaxHubs) Then If blnKOR Then curUser.Kick PreDataArrival=Empty Exit Function Else curUser.Redirect(CStr(sRHHC)) PreDataArrival=Empty Exit Function End If End If End If End If End If End If '----------------------------------------------------------------------------------------- If blnLink Then If Not curUser.IP = sAFIP Then If MidB(sData, LenB(curUser.sName)+29, 24) = "Hub-Link Bot" Then colUsers.SendPrivateToOps (Settings.HubName & " Protector"), "Un-Authorise Hub link Attempt By : " & curUser.sName & " - " & curUser.IP ActOnCurUser curUser, " Not Authorise", CByte(bytHLDA) PreDataArrival=Empty Exit Function End If End If End If PreDataArrival = sData : Exit Function Case "Supports" If MidB(sData, 97,14)="BotList" Then curUser.SendData "$BotList " & Settings.BotName & "$$" & sCOName & "$$" & sCTwo & "$$" & sCThr & "$$" & Settings.OpChatName & "$$|" If MidB(sData, 131,30)="SecuredExecutor" Then For Each sUser in colUsers curUser.SendData "$Hello " & sUser.sName & "|" Next PreDataArrival=Replace(sData, " NoHello NoGetINFO", "") Exit Function End If PreDataArrival = sData : Exit Function Case "ConnectToMe" If curUser.Class > iMDC and curUser.State=5 Then PreDataArrival=sData ElseIf oRequests.Exists(CStr(curUser.sName)) Then If oRequests(CStr(curUser.sName))=CStr(aCurData(1)) Then PredataArrival=sData oRequests.Remove(CStr(curUser.sName)) Else If blnIU Then frmHub.RefreshGUI curUser.SendPrivate Settings.BotName, "" & vbNewLine & vbNewLine & NLT3 _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine _ & vbNewLine & NLT3 _ & vbTab & vbTab & " ... WARNING..."& vbNewLine & NLT3 _ & vbTab & "You are unable to connecting " & CStr(aCurData(1)) &"'s share"& NLT3 _ & vbTab & " Please type +userhelp do it now here for" & NLT3 _ & vbTab & " instructions on how to register yourself!" & NLT3 _ & vbTab & " or " & NLT3 _ & vbTab & " Only work with DC++ V:0.306 to up this " & NLT3 _ & vbTab & " right click mouse on the userlist then " & NLT3 _ & vbTab & " use the regme command of this hub. " & NLT3 _ & NLT3 End If PreDataArrival=Empty :Exit Function End If Else If blnIU Then
_____________________________
Sorry, I can't hear you ! Let you know that "I'M DEAF" lol :-P
|
|