'ver L8.421.241.4+++ Late@421 Edited this script 'GeneralBot script v0.241 by Gadget http://gadget.no-ip.info 'WATCH OUT WHEN EDITING THIS SCRIPT! IT'S SO LONG THAT SCRIPT HOST CAN LOSE LAST LINES! 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 Dim iOrgSliderMax,iMinSharedat,iMinShareMul,iAnswerNot,sinfolame,tMSG,iGetUserIp,oChatState,User,sCommand,iChatState,scd Sub Main() '---EDITABLE SETTINGS--- sBotName ="GeneralBot" '<- Name of the bot sOpChatName ="OP-Chat" '<- Name of Ops-Only chat. aPowerOps =Array("HubOwner","Admin1","Admin2") iMinShare =5*1024^3 '<- (5 gigabytes) ^0=bytes, ^1=kilobytes, ^2=megabytes, ^3=gigabytes, ^4=terabytes. iVIPMinShare=1*1024^3 '<- (1 gigabytes) iOPMinShare =0*1024^3 '<- (0 gigabytes) iMaxShare =1*1024^4 '<- (1 terabytes) iMaxHubs =100 '<- Maximum number of connected hubs. iMinSlots =1 '<- Minimum number of slots. aMaxSlots =Array(20,21,21,21,31,31,51,51) '<- Maximum number of slots for each connection type (n/a,modem,isdn,sat,cable,dsl,T1,T3). iMinSlotsPerHub=0.1 '<- 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=500 '<- Sets hub slider maximum iMaxUsers =200 '<- Maximum user count 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=1 '<- 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 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,7,7,7,7,7,7,7) '<- Minimum upload limit setting for each connection type (kB/s n/a,modem,isdn,sat,cable,dsl,T1,T3). iMaxDescLength=130 '<- 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","asdf","gggg","donkey","ghjk","gfd","dfg","llaball") iCheckFakeShare=True '<- True=Check for known fake share amounts, False=No checking. aFakeShareAmount=Array("13630010000","7970010000","65719010000","140301549174","183287729356","18552221398","214266156265","11534336","93400000000","99999999999","107400000000","129900000000","132800000000","146510000000","182536110080","199715979264","199715979254") '<- 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","donkey") '<- 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 , etc. aRedirHub =Array("SharePlace.no-ip.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?.tmp","T?F?10485760?1?.wav","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","T?F?0?1?preteen","T?F?0?1?ddogg","T?F?0?1?lolita","T?F?0?1?incest") '<- Bad file search strings (use "T?F?0?1?"). Result handling below. iMaxFileSize=2*1024^3 '<- (2 gigabytes) iActiveOnly =False '<- True=deny passive mode users, False=allow passive mode. sCmdPrefix ="-" '<- Prefix for all commands iVipCommands=True iOpCommands =True '--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)=3 '--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. 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." 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)=3 '--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." iPolicy(17)=3 '--CLIENTOMPARISION MISMATCH sReason(18)="Your client is unrecognized or modified. Go to http://dcplusplus.sourceforge.net/ and download DC++." iPolicy(18)=1 '--MAX SLS sReason(19)="You have too many slots open." iPolicy(19)=1 '--KICK OP sReason(20)="You kicked an operator." iPolicy(20)=2 '--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." sPolicy(2) = "You have been disconnected." sPolicy(3) = "You have been kicked." sPolicy(4) = "You have been banned." frmHub.sldrMaxUsers=5000 '---LATE'S SETTINGS iOrgSliderMax = cstr(frmHub.sldrMaxUsers) Set oChatState = CreateObject("Scripting.Dictionary") scd=sCmdPrefix '---END OF SETTINGS--- Set oIPs = CreateObject("Scripting.Dictionary") Set oUsers = CreateObject("Scripting.Dictionary") frmHub.RegisterBotName(sBotName) frmHub.RegisterBotName(sOpChatName) frmHub.sldrMaxUsers=iMaxHubUsers sVersion="L8.421.241.4+++" sStarted=sFdate(Now()) For each userOP in colUsers If UserOP.bOperator Then If Not oChatState.Exists(UserOP.sName) Then oChatState.Add UserOP.sName, "on" UserOP.PrivateMessage CStr(sOpChatName), "Script has been Reset. By default you are logged into the OP-Chat ("+sOpChatName+"). "+sCd+"logoff will turn it off for ONLY you." End If End If Next colUsers.sendChatToAll CStr(sBotName),"Gadget's "+CStr(sBotName)+" version "+CStr(sVersion)+" started on "+CStr(sStarted) 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 = 60000 tmrScriptTimer.Enabled = True sLastUser="None" sLastPunished="None" sLetUser="None " sFollow="None" sBotInfo="None" For i=0 to 5 Punish(i)=0 Next sBotInfo="None" 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 Sub NewUserConnected(curUser) If colUsers.count()>iUserPeak Then iUserPeak=colUsers.count() If LCase(curUser.sName)="[sunet]pinger" Then sBotInfo=CStr(Now())+": Sunet pinger" If colUsers.Count > CDbl(iMaxUsers) And Not curUser.bOperator Then iPunish(iPolicy(7))=1+iPunish(iPolicy(7)) curUser.PrivateMessage CStr(sBotName),CStr(sReason(7))+" "+CStr(sPolicy(iPolicy(7))) frmHub.DoEventsForMe Select Case iPolicy(7) Case 1 CurUser.ForceMove frmHub.txtRedirect If UBound(aRedirHub)>0 Then frmHub.txtRedirect=CStr(Trim(aRedirHub(Int(Rnd*(UBound(aRedirHub)+1))))) frmHub.DoEventsForMe CurUser.Disconnect() Case 2 CurUser.Disconnect() Case 3 CurUser.Kick() Case 4 x=Ban(curUser.sName,CStr(sPolicy(7)),CStr(sBotName)) CurUser.Kick() End Select If sFollow<>"None" Then sFollowMessage=CStr(curUser.sName)+": "+CStr(sReason(7))+" "+CStr(sPolicy(iPolicy(7))) If sFollow=sOpChatName Then For each userOP in colUsers If userOP.bOperator Then colUsers.ItemByName(CStr(userOP.sName)).SendData CStr("$To: "+userOP.sName+" From: "+sOpChatName+" <"+sBotName+"> "+CStr(sFollowMessage)+"|") Next Else colUsers.ItemByName(CStr(sFollow)).PrivateMessage CStr(sBotName),CStr(sFollowMessage) End If End If Exit Sub End If If iSearchBadFiles Then For i=0 To UBound(aSearchString) curUser.SendData "$Search Hub:"+CStr(sBotName)+CStr(i)+" "+aSearchString(i)+"|" Next End If curUser.SendData "$Search Hub:"+CStr(sBotName)+" F?F?0?0?.|" If oIPs.Exists(CStr(curUser.IP())) Then oIPs(CStr(curUser.IP()))=CStr(curUser.sName)+VbTab+sFdate(Now())+vbCRLF+oIPs(CStr(curUser.IP())) Else oIPs(CStr(curUser.IP()))=CStr(curUser.sName)+VbTab+sFdate(Now()) End If curUser.SendData "<"+CStr(sBotName)+"> "+CStr(sReason(0)) End Sub Sub OPConnected(curUser) '--OpChat-- If curUser.bOperator Then If oChatState.Exists(curUser.sName) Then Select Case oChatState.Item(curUser.sName) Case "off" curUser.PrivateMessage CStr(sOpChatName), "Your OP-Chat is set to OFF - you will not recieve the messages. "+sCd+"login will turn it on for you." End Select Else oChatState.Add curUser.sName, "on" curUser.PrivateMessage CStr(sOpChatName), "Welcome! by default you are logged into the OP-Chat ("+sOpChatName+"). "+sCd+"logoff will turn it off for ONLY you." End If End If Call NewUserConnected(curUser) End Sub Sub DataArival (curUser, sCurData) If Left(sCurData, 12) = "$GetNickList" Then curUser.SendData "$Hello "+CStr(sBotName)+"|$MyINFO $ALL "+Cstr(sBotName)+" "+frmHub.txtName+" Security$ $BOT"+chr(8)+"$"+frmHub.txtIP+"$"+"0"+"$|" If Left(sCurData, 12) = "$GetNickList" Then curUser.SendData "$Hello "+CStr(sOpChatName)+"|$MyINFO $ALL "+Cstr(sOpChatName)+" Operators Lounge$ $CHAT"+chr(8)+"$GeneralBot Ver "+cstr(sVersion)+"$"+"0"+"$|" If Left(sCurData,9)="$GetINFO " Then Exit Sub If sCurData="" Then Exit Sub On Error Resume Next iReason=0 If Left(sCurData,13)="$MyINFO $ALL " Then aUD=Split(sGetInfo(curUser.sName),"|") If aUD(28)<>"" Then curUser.PrivateMessage CStr(sBotName),CStr(aUD(28)) aUD(28)="" End If If aUD(27)<>"" Then If colUsers.Online(CStr(aUD(27))) Then colUsers.ItemByName(CStr(aUD(27))).PrivateMessage CStr(sBotName),"The user '"+CStr(curUser.sName)+"' is now online." aUD(27)="" End If End If aUD(13)=sFdate(Now()) If aUD(2)="" Then aUD(2)=curUser.IP If aUD(2)<>curUser.IP Then aUD(2)=curUser.IP:aUD(3)="Dynamic" If aUD(14)="Never" Then aUD(14)=sFdate(Now()) '-----Check nickname If iCheckNick And Not curUser.bOperator Then For i=0 to UBound(aBadNicks) If InStr(LCase(curUser.sName),LCase(aBadNicks(i))) Then iReason=15 Next If bIsIP(curUser.sName) Then iReason=15 If curUser.sName="." Then iReason=15 End If '-----Parse and check common info sD=Split(Mid(sCurData,15+Len(CurUser.sName)),"$") aUD(0)=sD(0):aUD(1)=sD(3) aUD(4)=sSuffix(sD(4))+" ("+sD(4)+" bytes)" aUD(5)=Left(sD(2),Len(sD(2))-1) aUD(7)=sStatus(Right(sD(2),1)) If Len(sD(0))>iMaxDescLength Then iReason=14 '<- Check description length If InStr(LCase(sD(0)),"progger") Then iReason=12 If InStr(LCase(sD(0)),"donkey") And Not iAllowSearchBots Then iReason=12 If iCheckFakeShare Then If InStr(sD(4),"000000")>0 Or InStr(sD(4),"999999")>0 Then iReason=3 If CDbl(sD(4))/1024^3=Int(CDbl(sD(4))/1024^3) And sD(4)<>"0" Then iReason=3 For i=0 To UBound(aFakeShareAmount) If sD(4)=aFakeShareAmount(i) Then iReason=3 Next End If If iDynMinShare Then For i = 0 To UBound(aDynMinShare) Step 2 If colUsers.Count > aDynMinShare(i) Then iMinShare=aDynMinShare(i+1)*iDynMinShareScale Next End If If bIsVip(CurUser.sName) Then If CDbl(sD(4))iMaxShare Then iReason=3 If iConnType(sD(2))0 Then If Not iAllowDCPP Then iReason=10 If InStr(sD(0),"[KDC ")>0 Then aUD(8)="Koala DC" aUD(9)="3 (usually 1-3)" iHubs=3 sDcpp=Split(Mid(sD(0),InStrRev(sD(0),"[KDC ")+5,Len(sD(0))-InStrRev(sD(0),"[KDC ")-5),",") Else aUD(8)="DC++" If Left(sD(0),2)="0 Then sDcpp(i)=Left(sDcpp(i),InStr(sDcpp(i),"/")-1) ElseIf iPPV>0.233 And Not iAllowUploadLimit Then iReason=12 End If aUD(9)=Mid(sDcpp(i),3)+" (at least)" iHubs=CDbl(Mid(sDcpp(i),3)) Case "S:" aUD(10)=Mid(sDcpp(i),3) iSlots=CDbl(Mid(sDcpp(i),3)) Case "B:","L:" aUD(11)=Mid(sDcpp(i),3)+" kB/s" If Mid(sDcpp(i),3,1)<>"*" Then If CDbl(Mid(sDcpp(i),3))0 Then If iSlots/iHubsCDbl(aMaxSlots(iConnType(sD(2)))) Then iReason=19 If iHubs>CDbl(iMaxHubs) Then iReason=4 Else If aUD(8)<>"NMDC" Then If cDbl(aUD(15))>1 Then aUD(8)="Fake, Modified DC++ or Linux version" aUD(9)="1 (at least, probably more)" Else aUD(8)="NMDC, Fake, Modified DC++ or Linux version" aUD(9)="1 (at least)" End If If InStr(LCase(sD(0)),"[replika]") Then aUD(8)="REPLiKA, faked description" If InStr(LCase(sD(0)),"[ws]") Then aUD(8)="WS Client, faked description" If InStr(LCase(sD(0)),"dc-gui") or InStr(LCase(sD(0)),"dcgui") Then aUD(8)="DC-Gui, faked description" If InStr(LCase(sD(0)),"echoes") Then aUD(8)="Echoes, faked description" If InStr(LCase(sD(0)),"(unofficial)") Then aUD(8)="NoRemDupes, faked description" End If If Not iAllowNMDC Then iReason=9 End If If CurUser.bOperator And CDbl(sD(4))1 Then iReason=17 If sFiletype=".wav" And iFilesize>10*1024^2 Then iReason=17 If Right(aFileinfo(0),17)="express\msimn.exe" Then iReason=17 If InStr(aFileinfo(0),"\__incomplete__") Then iReason=17 If InStr(aFileinfo(0),"share faker") Then iReason=17 If iFilesize>iMaxFileSize Then iReason=17 End If If sLastUser<>CStr(curUser.sName) Then aUD=Split(sGetInfo(curUser.sName),"|") aFileinfo=Split(Mid(LCase(sCurData),Len(curUser.sName)+6),Chr(5)) If InStr(aUD(12)," ") Then aUD(6)="Active (was passive earlier)" aUD(12)="1" Else aUD(6)="Active" aUD(12)=CStr(CDbl(aUD(12))+1) End If s=Mid(aFileinfo(1),InStr(aFileinfo(1)," ")+1) If Asc(s)>47 and Asc(s)<58 Then If CDbl(Mid(s,InStr(s,"/")+1))CStr(curUser.sName) Then aUD=Split(sGetInfo(curUser.sName),"|") aUD(6)="Passive" aUD(15)=CStr(CDbl(aUD(15))+1) If iActiveOnly Then iReason=16 oUsers(LCase(CStr(curUser.sName)))=Join(aUD,"|") sLastUser=CStr(curUser.sName) End If End If If curUser.bOperator And (Left(sCurData,1)="<" Or Left(sCurData,8)="$UserIP " Or Left(sCurData,5)="$Ban " Or Left(sCurData,7)="$BanIP " Or Left(sCurData,6)="$Kill " Or Left(sCurData,10)="$UserInfo " Or Left(sCurData,Len(sBotName)+6)="$To: "+sBotName+" " Or Left(sCurData,Len(sOpChatName)+6)="$To: "+sOpChatName+" ") Then sA="" iAnswerNot="NOT!! Only admins can do that" '--LATE DID THIS iSecurity=0 If Left(sCurData,5)="$Ban " Or Left(sCurData,8)="$UserIP " Or Left(sCurData,7)="$BanIP " Or Left(sCurData,6)="$Kill " Or Left(sCurData,10)="$UserInfo " Then iSecurity=2 s=sCd+LCase(Mid(CStr(sCurData),2)) Else s=LCase(Mid(CStr(sCurData),InStr(CStr(sCurData),">")+2)) End If If InStr(s," ") Then sCmd=Left(s,InStr(s," ")-1) sUser=Mid(s,InStr(s," ")+1) If InStr(sUser," ") Then sInfo=Mid(sUser,InStr(sUser," ")+1) sUser=Left(sUser,InStr(sUser," ")-1) End If Else sCmd=s End If Select Case sCmd '---LATE'S COMMANDS--- Case sCd+"mass" If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf sUser="" Then iSecurity=1 sA="Add a message too." Else tMSG="MESSAGE TO ALL USERS" iSecurity=1 i=0 s=Mid(CStr(sCurData),inStr(CStr(sCurData),">")+8) For each sUser in colUsers sUser.PrivateMessage cStr(sBotName), tMSG+vbCrlf+cStr(s) i=i+1 Next sA="Message was sent to "+cStr(i)+" users." End If Case sCd+"mmop" iSecurity=1 If sUser="" Then sA="Add a message too." Else Dim opPM tMSG = "MESSAGE TO ALL OPS FROM " i=0 s=Mid(CStr(sCurData),inStr(CStr(sCurData),">")+8) For Each opPM in colUsers If opPM.bOperator Then i=i+1 opPM.PrivateMessage CStr(sBotName), tMSG+CStr(curUser.sName)+vbCrlf+CStr(s) sA="Message sent to "+cstr(i)+" online OP's" End If Next End If Case sCd+"hubmax" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf sUser="" Then sA="Max Users: "+cstr(ImaxUsers)+"(script)/"+cstr(frmHub.sldrMaxUsers)+"(Hub)/"+cstr(iorgSliderMax)+"(Max)" Else If sUser <= iorgSliderMax then If sUser < cstr(ImaxUsers) Then sA="You Must First Change the Script max Users Lower (Currently: "+cstr(ImaxUsers)+")" Else frmHub.sldrMaxUsers.Value=cstr(sUser) sA="Done. Hub Max Users: "+cstr(sUser) End If Else sA="Cannot Exceed Original Max Hub of: "+cstr(iOrgSliderMax)+" (or Try using 0"+cstr(sUser)+" Instead)" End If End If Case sCd+"maxhubs" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf sUser="" Then sA="Max hubs is: "+CStr(iMaxHubs) Else iMaxHubs=cstr(sUser) sA="Done. Max Hubs is Now: "+CStr(iMaxHubs) End If Case sCd+"minslots" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf sUser="" Then sA="Minimum slots required: "+cstr(iMinSlots)+" (and "+cstr(iMinSlotsPerHub)+"/hub)" Else iMinSlots=Int(sUser) If sInfo="" Then sA="Done. Min slots is Now: "+CStr(iMinSlots)+" (and "+CStr(iMinSlotsPerHub)+"/hub)" Else iMinSlotsPerHub=sInfo sA="Done. Min slots is Now: "+CStr(iMinSlots)+" (and "+CStr(iMinSlotsPerHub)+"/hub)" End If End If Case sCd+"minshare" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf sUser="" Then sA="Share limit is "+CStr(sSuffix(iMinShare))+" for Users." Else iMinShareDat=Int(sUser) If sInfo="" Then iMinShare=(iMinShareDat)*1024^3 sA="Done. Minimum share is Now: "+CStr(sSuffix(iMinShare))+" For Users" Else iMinShareMul=(sInfo) iMinShare=(iMinShareDat)*1024^(iMinShareMul) sA="Done. Minimum share is Now: "+CStr(sSuffix(iMinShare))+" For Users" End If End If Case sCd+"vipshare" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf sUser="" Then sA="Share limit is "+CStr(sSuffix(iVIPMinShare))+" for VIP Users." Else iMinShareDat=cstr(sUser) If sInfo="" Then iVIPMinShare=(iMinShareDat)*1024^3 sA="Done. Minimum share is Now: "+CStr(sSuffix(iVIPMinShare))+" For VIP Users" Else iMinShareMul=sInfo iVIPMinShare=(iMinShareDat)*1024^(iMinShareMul) sA="Done. Minimum share is Now: "+CStr(sSuffix(iVIPMinShare))+" For VIP Users" End If End If Case sCd+"userip",sCd+"getip" iSecurity=1 aUD=Split(sGetInfo(sUser),"|") iGetUserIP = "*** User "+lCase(sUser)+" has IP: "+aUD(2)+" ("+aUD(3)+")" CurUser.SendData CStr(iGetUserIP) Case sCd+"on",sCd+"logon",sCd+"login" iSecurity=1 oChatState.Item(curUser.sName) = "on" sA="You are now logged in, and your OP Chat is set to ON." Case sCd+"off",sCd+"logoff",sCd+"logout" iSecurity=1 oChatState.Item(curUser.sName) = "off" sA="You are now logged off, and your Op Chat is set to OFF." For Each UserOP In colUsers If userOP.bOperator Then If oChatState.Item(UserOP.sName)="on" then userOP.PrivateMessage CStr(sOpChatName),Cstr(curUser.sName)+" has logged off." End If Next Case sCd+"status" iSecurity=1 if oChatState.Item(curUser.sName)="off" then sA="Your are currently Logged off. Type "+sCd+"logon when you return." if oChatState.Item(curUser.sName)="on" then sA="Your are currently Logged in. Type "+sCd+"logoff if you want to leave." sA=sA+"\n Ops Currently Online: " For each userOP in colUsers If userOP.bOperator and oChatState.Item(UserOP.sName)="on" then sA=sA+"\nLogged On\t" Else If userOP.bOperator then sA=sA+"\nLogged\t Off\t" End If If userOP.bOperator then sA=sA+userOP.sName Next '---END OF LATE'S SETTINGS--- Case sCd+"userinfo",sCd+"kickinfo" If iSecurity=0 Then iSecurity=1 If Len(sUser)<1 Then sA=sUserinfo(LCase(curUser.sName)) Else sA=sUserinfo(sUser) End If Case sCd+"disconnect",sCd+"drop" If sUser="" Then sA="Please give a username" ElseIf bIsIP(sUser) Then sA="Can't disconnect an IP number" ElseIf Not colUsers.Online(CStr(sUser)) Then sA="Can't disconnect because user '"+CStr(sUser)+"' is not online" ElseIf bIsOP(sUser) And bIsPowerOP(curUser.sName)=False Then sA="Can't disconnect an operator" Else sA="The user '"+CStr(sUser)+"' was disconnected by "+CStr(curUser.sName)+" because: "+sInfo+". His IP was: "+CStr(colUsers.ItemByName(CStr(sUser)).IP) colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"You are being disconnected because: "+sInfo frmHub.DoEventsForMe colUsers.ItemByName(CStr(sUser)).Disconnect() End If Case sCd+"redirect",sCd+"red" If sInfo="" Then sInfo=frmHub.txtRedirect If sUser="" Then sA="Please give a username" ElseIf bIsIP(sUser) Then sA="Can't redirect an IP number" ElseIf Not colUsers.Online(CStr(sUser)) Then sA="Can't redirect because user '"+CStr(sUser)+"' is not online" ElseIf bIsOP(sUser) And bIsPowerOP(curUser.sName)=False Then sA="Can't redirect an operator" Else sA="The user '"+CStr(sUser)+"' was redirected by "+CStr(curUser.sName)+" to "+sInfo colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"You are being redirected to "+sInfo frmHub.DoEventsForMe colUsers.ItemByName(CStr(sUser)).ForceMove CStr(sInfo) End If Case sCd+"kick" If sUser="" Then sA="Please give a username" ElseIf bIsIP(sUser) Then sA="Can't kick an IP number" ElseIf Not colUsers.Online(CStr(sUser)) Then sA="Can't kick because user '"+CStr(sUser)+"' is not here right now" ElseIf bIsOP(sUser) And bIsPowerOP(curUser.sName)=False Then sA="Can't kick an operator" Else sA="The user '"+CStr(sUser)+"' was kicked by "+CStr(curUser.sName)+" because: "+sInfo+". His IP was: "+CStr(colUsers.ItemByName(CStr(sUser)).IP) colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"You are being kicked because: "+sInfo frmHub.DoEventsForMe colUsers.ItemByName(CStr(sUser)).Kick aUD=Split(sGetInfo(sUser),"|") aUD(18)=CStr(CDbl(aUD(18))+1) aUD(19)=sFdate(Now())+" by "+curUser.sName+" because: "+CStr(sInfo) oUsers(LCase(CStr(sUser)))=Join(aUD,"|") aUD=Split(sGetInfo(curUser.sName),"|") aUD(23)=CStr(CDbl(aUD(23))+1) oUsers(LCase(CStr(curUser.sName)))=Join(aUD,"|") iPunish(3)=1+iPunish(3) End If Case sCd+"flood",sCd+"fuckup",scd+"attack" If sInfo="" Then sInfo="You've overstayed your welcome. You need to reboot before it's too late." If sUser="" Then sA="Please give a username" ElseIf bIsIP(sUser) Then sA="Can't flood an IP number" ElseIf bIsVIP(sUser) Then sA="Can't flood a VIP user" ElseIf Not colUsers.Online(CStr(sUser)) Then sA="Can't flood because user '"+CStr(sUser)+"' is not here right now" ElseIf bIsOP(sUser) And bIsPowerOP(curUser.sName)=False Then sA="Can't flood an operator" Else sA="Flooding user '"+CStr(sUser)+"' because: "+sInfo For i=1 to 1000 x=CStr(aFakeNamePrefix(Int(Rnd*UBound(aFakeNamePrefix))))+Chr(Int(Rnd*26+65))+Chr(Int(Rnd*26+65))+Chr(Int(Rnd*26+65))+Chr(Int(Rnd*26+65))+Chr(Int(Rnd*26+65))+Chr(Int(Rnd*26+65)) colUsers.ItemByName(CStr(sUser)).SendData "$Hello "+CStr(x)+"|" colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(x),CStr(sInfo) Next End If Case sCd+"ban",sCd+"ipban",sCd+"banip" If sCmd<>sCd+"ban" And (Not bIsIP(sUser)) And colUsers.Online(CStr(sUser)) Then sUser=colUsers.ItemByName(CStr(sUser)).IP End If If bIsIP(sUser) Then sOp="" For each userOP in colUsers If userOP.IP=sUser Then If bIsVip(userOP.sName) Or userOP.bOperator Then sOp=userOP.sName End If Next If sOp="" Then If bIsIPBanned(sUser) Then sA="IP-number '"+CStr(sUser)+"' is already banned." Else Call frmHub.lstPermBan.AddItem(sUser) sA="IP-number '"+CStr(sUser)+"' is now permanently banned." aUD=Split(sGetInfo(CStr(curUser.sName)),"|") aUD(24)=CStr(CDbl(aUD(24))+1) oUsers(LCase(CStr(curUser.sName)))=Join(aUD,"|") iPunish(4)=1+iPunish(4) End If Else sA="Can't ban IP number '"+CStr(sUser)+"' because it belongs to an operator/VIP '"+CStr(sOp)+"'" End If Else If sUser="" Then sA="Please give a username (or check that there wasn't two spaces)" Else If CStr(sInfo)="" Then sInfo="(No reason given)" sBan=Ban(sUser,sInfo,CStr(curUser.sName)) Select Case sBan Case "VIP" sA="Can't ban a VIP user" Case "OP" sA="Can't ban an operator" Case "BA" sA="User '"+CStr(sUser)+"' is already banned" Case "OK" sA="User '"+CStr(sUser)+"' is now banned because: "+CStr(sInfo)+". He wasn't connected right now" Case Else sA="User '"+CStr(sUser)+"' is now banned because: "+CStr(sInfo)+". He's still connected with IP: "+CStr(sBan) End Select End If End If Case sCd+"kickban",sCd+"kill",sCd+"smack" If CStr(sInfo)="" Then sInfo="(No reason given)" sBan=Ban(sUser,sInfo,CStr(curUser.sName)) Select Case sBan Case "IP" sA="Can't kickban with an IP number" Case "VIP" sA="Can't kickban a VIP user" Case "OP" sA="Can't kickban an operator" Case "BA" If colUsers.Online(CStr(sUser)) Then frmHub.DoEventsForMe colUsers.ItemByName(CStr(sUser)).Kick() sA="User '"+CStr(sUser)+"' is already banned, so all i needed was to kick him." Else sA="User '"+CStr(sUser)+"' is not here and he is already banned." End If Case "OK" If iSecurity=2 Then iSecurity=0 sA="Smack down Failed because '"+CStr(sUser)+"' is not here, But I banned them because: "+CStr(sInfo) Case Else frmHub.DoEventsForMe If iSecurity=2 Then iSecurity=0 colUsers.ItemByName(CStr(sUser)).Kick() sA="Oh Yeah! '"+CStr(sUser)+"' got the smackdown put on them because: "+CStr(sInfo)+". The Lamer's IP was: "+CStr(sBan)+_ vbcRLF+"Can You Smell What This Bot is Cookin'....!" aUD=Split(sGetInfo(sUser),"|") aUD(18)=CStr(CDbl(aUD(18))+1) aUD(19)=sFdate(Now())+" by "+curUser.sName+" because: "+CStr(sInfo) oUsers(LCase(CStr(sUser)))=Join(aUD,"|") aUD=Split(sGetInfo(curUser.sName),"|") aUD(23)=CStr(CDbl(aUD(23))+1) oUsers(LCase(CStr(curUser.sName)))=Join(aUD,"|") iPunish(3)=1+iPunish(3) End Select Case sCd+"unban",sCd+"unsmack" If bIsIP(sUser) Then i=0 j=0 For lPos = 0 To frmHub.lstPermBan.ListCount-1 If frmHub.lstPermBan.List(lPos)=sUser Then Call frmHub.lstPermBan.RemoveItem(lPos) i=i+1 lPos=lPos-1 End If Next For lPos = 0 To frmHub.lstTempBan.ListCount-1 If frmHub.lstTempBan.List(lPos)=sUser Then Call frmHub.lstTempBan.RemoveItem(lPos) j=j+1 lPos=lPos-1 End If Next If i=0 And j=0 Then sA="IP-number '"+CStr(sUser)+"' is not banned" Else sA="Bans of IP-number '"+CStr(sUser)+"' ("+CStr(i)+" perm bans and "+CStr(j)+" temp bans) are now removed" End If Else i=Unban(sUser,curUser.sName) If i=0 Then sA="User '"+CStr(sUser)+"' is not banned" Else sA="Name bans of user '"+CStr(sUser)+"' ("+CStr(i)+") are now removed" End If End If Case sCd+"find" iSecurity=1 sText="Following users found with search string '"+sUser+"':" i=0 For Each oUser in colUsers If InStr(CStr(oUser.IP()),sUser)>0 Or InStr(LCase(CStr(oUser.sName)),sUser)>0 Then sText=sText+"\n"+CStr(oUser.IP())+"\t"+CStr(oUser.sName) i=i+1 End If Next sText=sText+"\nTotal count: "+CStr(i) sA=CStr(sText) Case sCd+"findfake" iSecurity=1 sText="Suspicious users:\n" For Each oUser in colUsers For i=0 To UBound(aFakeNamePrefix) If Len(oUser.sName)=Len(aFakeNamePrefix(i))+UBound(aFakeNameSuffix)+1 Then If Left(CStr(oUser.sName),Len(aFakeNamePrefix(i)))=aFakeNamePrefix(i) Then z=1 For j=0 to UBound(aFakeNameSuffix) If InStr(aFakeNameSuffix(j),Mid(CStr(oUser.sName),Len(CStr(oUser.sName))-UBound(aFakeNameSuffix)+j,1))=0 Then z=0 Next If z=1 Then sText=sText+CStr(oUser.IP())+"\t"+CStr(oUser.sName)+"\t(suspicious name, probably using DC++ Blue)\n" End If End If Next If oUsers.Exists(LCase(CStr(oUser.sName))) Then aTemp=Split(oUsers(LCase(CStr(oUser.sName))),"|") If InStr(LCase(aTemp(8)),"fake") Then sText=sText+CStr(oUser.IP())+"\t"+CStr(oUser.sName)+"\t(suspicious client: "+CStr(aTemp(8))+")\n" End If If aTemp(10)<>"N/A" And InStr(aTemp(10),"/")>0 And InStr(aTemp(0),"<++")>0 Then sTemp=Mid(aTemp(0),InStrRev(aTemp(0),"S:")+2,(InStrRev(aTemp(0),">")-InStrRev(aTemp(0),"S:")-2)) If InStr(sTemp,",")>0 Then sTemp=Left(sTemp,InStr(sTemp,",")-1) If Mid(aTemp(10),InStr(aTemp(10),"/")+1)<>sTemp Then sText=sText+CStr(oUser.IP())+"\t"+CStr(oUser.sName)+"\t(slot count mismatch, description says "+Mid(aTemp(0),InStrRev(aTemp(0),"S:")+2,(InStrRev(aTemp(0),">")-InStrRev(aTemp(0),"S:")-2))+" and search results "+aTemp(10)+" slots)\n" End If End If End If Next sA=CStr(sText)+"Please check those manually before kicking" Case sCd+"findslots" sText="Users with free slots:" iSecurity=1 For Each oUser in colUsers If oUsers.Exists(LCase(CStr(oUser.sName))) Then aTemp=Split(oUsers(LCase(CStr(oUser.sName))),"|") If aTemp(10)<>"N/A" And InStr(aTemp(10),"/")>0 Then If CDbl(Left(aTemp(10),1))>0 Then sText=sText+"\n"+CStr(oUser.IP())+"\t"+aTemp(10)+"\t"+CStr(oUser.sName) End If End If End If Next sA=CStr(sText) Case sCd+"cleartemp" Call frmHub.lstTempBan.Clear sA="Temporary ban list is now cleared" Case sCd+"reset" If sUser="" Then sA="Please specify a username" Else aUD=Split(sGetInfo(sUser),"|") aUD(18)="0" aUD(19)="Reset by "+CStr(curUser.sName)+" at "+sFdate(Now())+" "+sInfo oUsers(sUser)=Join(aUD,"|") sA="Kick counter of user '"+sUser+"' is now 0" End If Case sCd+"hubinfo" iSecurity=1 sA="Hub information and statistics since "+sStarted+_ "\nHub name:\t"+frmHub.txtName+_ "\nAddress:\t\t"+frmHub.txtIP+_ "\nDescription:\t"+frmHub.txtDescription+_ "\nUsers:\t\t"+CStr(colUsers.count())+" (peak "+CStr(iUserPeak)+")"+_ "\nMax users:\t"+CStr(iMaxUsers)+"/"+CStr(frmHub.sldrMaxUsers)+_ "\nPerm bans:\t"+CStr(frmHub.lstPermBan.ListCount)+_ "\nRegistered users:\t"+CStr(frmHub.lstOps.ListItems.Count)+_ "\nTemp bans:\t"+CStr(frmHub.lstTempBan.ListCount)+_ "\nRedirect address:\tCurrently "+frmHub.txtRedirect+" of "+CStr(Int(UBound(aRedirHub)+1))+" options: "+Join(aRedirHub,", ")+_ "\nMin client version:\t"+CStr(frmHub.txtMinClientVersion)+" for NMDC, "+sMinDCPPVersion+" for DC++"+_ "\nMin share:\t"+sSuffix(iMinShare)+" for users, "+sSuffix(iVIPMinShare)+" for VIPs, "+sSuffix(iOPMinShare)+" for operators."+_ "\nMax share:\t"+sSuffix(iMaxShare)+_ "\nMin slots:\t\t"+CStr(iMinSlots)+" (and "+CStr(iMinSlotsPerHub)+"/hub)"+_ "\nMax slots:\t\tN/A: "+CStr(aMaxSlots(0))+", modem: "+CStr(aMaxSlots(1))+", ISDN: "+CStr(aMaxSlots(2))+", satellite: "+CStr(aMaxSlots(3))+", cable: "+CStr(aMaxSlots(4))+", DSL: "+CStr(aMaxSlots(5))+", T1: "+CStr(aMaxSlots(6))+", T3: "+CStr(aMaxSlots(7))+_ "\nMax hubs:\t"+CStr(iMaxHubs)+_ "\nSuccessful logons:\t"+CStr(iPunish(5))+_ "\nUsername count:\t"+CStr(oUsers.Count)+_ "\nIP number count:\t"+CStr(oUsers.Count)+_ "\nWarned:\t\t"+CStr(iPunish(0))+_ "\nRedirected:\t"+CStr(iPunish(1))+_ "\nDisconnected:\t"+CStr(iPunish(2))+_ "\nKicked:\t\t"+CStr(iPunish(3))+_ "\nBanned:\t\t"+CStr(iPunish(4))+_ "\n"+Replace(frmHub.stsHub.Panels(2).Text,": ",":\t\t")+_ "\nLet user:\t\t"+sLetUser+_ "\nFollower:\t\t"+sFollow+_ "\nLast failed logon:\t"+sLastPunished+_ "\nLast seen bot:\t"+sBotInfo+_ "\nGeneralBot version:\t"+sVersion Case sCd+"ipinfo" iSecurity=1 If oIPs.Exists(sUser) Then sA="Logon information from ip "+sUser+" since "+sStarted+"\n"+oIPs(sUser) Else sA="No logons from ip "+sUser+" since "+sStarted End If Case sCd+"oplist" iSecurity=1 sTxt="Following operators are registered: " For lPos= 1 To frmHub.lstOps.ListItems.Count If frmHub.lstOps.ListItems.Item(lPos).SubItems(2)="True" Then sTxt=sTxt+CStr(frmHub.lstOps.ListItems.Item(lPos).Text)+", " i=i+1 End If Next sTxt=sTxt+"total count "+CStr(i)+"." sA=CStr(sTxt) Case sCd+"poweroplist" iSecurity=1 sA="Following operators are powerops: "+Join(aPowerOps,", ") Case sCd+"viplist" iSecurity=1 i=0 sTxt="Following usernames are registered: " For lPos= 1 To frmHub.lstOps.ListItems.Count If Left(frmHub.lstOps.ListItems.Item(lPos).SubItems(1),6)<>"Banned" And frmHub.lstOps.ListItems.Item(lPos).SubItems(2)="False" Then sTxt=sTxt+Chr(34)+CStr(frmHub.lstOps.ListItems.Item(lPos).Text)+Chr(34)+", " i=i+1 End If Next sA=sTxt+"total count "+CStr(i)+"." Case sCd+"banlist" iSecurity=1 lCount = frmHub.lstPermBan.ListCount sTxt="Following IP numbers are permanently banned: " For lPos = 0 To lCount - 1 sTxt=sTxt+Chr(34)+CStr(frmHub.lstPermBan.List(lPos))+Chr(34)+", " Next sTxt=sTxt+"total count "+CStr(lCount)+"." sA=CStr(sTxt) lCount = frmHub.lstTempBan.ListCount sTxt="Following IP numbers are temporarily banned: " For lPos = 0 To lCount - 1 sTxt=sTxt+Chr(34)+CStr(frmHub.lstTempBan.List(lPos))+Chr(34)+", " Next sTxt=sTxt+"total count "+CStr(lCount)+"." sA=sA+"\n"+CStr(sTxt) i=0 sTxt="Following names are permanently banned: " For lPos= 1 To frmHub.lstOps.ListItems.Count If Left(frmHub.lstOps.ListItems.Item(lPos).SubItems(1),6)="Banned" Then sTxt=sTxt+Chr(34)+CStr(frmHub.lstOps.ListItems.Item(lPos).Text)+Chr(34)+", " i=i+1 End If Next sTxt=sTxt+"total count "+CStr(i)+"." sA=sA+"\n"+CStr(sTxt) Case sCd+"help" iSecurity=1 sA="Following commands are available:\n"+_ sCd+"ban [reason]\tbans permanently a user\n"+_ sCd+"ipban \t\tbans permanently users ip\n"+_ sCd+"unban \tremoves bans from user or ip\n"+_ sCd+"disconnect [reason]\tdisconnects a user\n"+_ sCd+"redirect [address]\tredirects a user\n"+_ sCd+"kick [reason]\tkicks a user\n"+_ sCd+"kickban [reason]\tkicks and bans permanently a user\n"+_ sCd+"flood [flood text]\tfloods a user\n"+_ sCd+"cleartemp \t\tclears the temporary ban list\n"+_ sCd+"userinfo [name]\t\tdisplays user info\n"+_ sCd+"reset \t\tresets users kick counter\n"+_ sCd+"ipinfo \t\tdisplays logon info of specific ip\n"+_ sCd+"find \tfinds a user or ip\n"+_ sCd+"follow\t\t\tfollow hub logon actions\n"+_ sCd+"stop\t\t\tstop following\n"+_ sCd+"watch [watcher]\twatches a specific user and messages watcher when he/she logs on\n"+_ sCd+"message [message]\tleaves a message to a specific user when he/she logs on\n"+_ sCd+"let \t\tlets one user to come freely to hub without restrictions\n"+_ sCd+"findfake\t\t\ttries to find suspicious users\n"+_ sCd+"findslots\t\t\ttries to find users with free slots\n"+_ sCd+"oplist\t\t\tdisplays operator list\n"+_ sCd+"poweroplist\t\tdisplays powerop list\n"+_ sCd+"viplist\t\t\tdisplays VIP userlist\n"+_ sCd+"banlist\t\t\tdisplays list of banned users\n"+_ sCd+"hubinfo\t\t\tdisplays hub settings\n"+_ sCd+"share\t\t\tshows share limits" If iVipCommands Then sA=sA+"\n"+sCd+"vip [password]\tgrants VIP privileges to user\n"+_ sCd+"devip [password]\tremoves VIP privileges from user" End If If bIsPowerOp(CStr(curUser.sName)) Then sA=sA+"\n"+sCd+"setredirect
\tsets hub redirect addresses (separate with comma)\n"+_ sCd+"setmaxusers \tsets maximum user limit" If iOpCommands Then sA=sA+"\n"+sCd+"op [password]\tgrants operator privileges to user\n"+_ sCd+"deop [password]\tremoves operator privileges from user" End If sA=sA+"\n"+sCd+"hubmax ##\t\tChanges Hub Max Users Slider.\n"+_ sCd+"maxhubs ##\t\tChanges Max Hubs Allowed.\n"+_ sCd+"minshare ## ##\t\tChanges Min Share (ex. "+sCd+"minshare 5 3 would be 5 GB)\n"+_ sCd+"vipshare ## ##\t\tChanges VIP Share\n"+_ "\t\t\t(array for 2nd number 0=B, 1=KB, 2=MB, 3=GBs, 4=TB)\n"+_ sCd+"minslots ## ##\t\tChanges minimum slots. (aray = minslots per/hub)\n"+_ sCd+"mmop\t\t\tsends mass message to all connected Ops" End If sA=sA+"\n"+sCd+"help\t\t\tshows this help\n"+_ sCd+"mass\t\t\tsends mass message to all Users\n"+_ sCd+"logon or "+sCd+"logoff\t\tLogin/off from Op-Chat Activity\n"+_ sCd+"status\t\t\tShows Ops Logged Into OP-Chat" Case sCd+"follow" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot Else If sUser="" Then sFollow=CStr(curUser.sName) Else sFollow=CStr(sUser) End If sA="Follow mode is set to "+sFollow+". Type '"+sCd+"stop' in main chat or here if you want to stop following."+_ vbCRLF+"Wow! You must be bored if you are following.....Keep up the good work!!" End If Case sCd+"stop" iSecurity=1 sFollow="None" sA="Follow mode off" Case sCd+"watch" If sUser="" Then sA="Please specify a username" Else If colUsers.Online(CStr(sUser)) Then sA="The user '"+CStr(sUser)+"' is now online" Else If sInfo="" Then sInfo=CStr(curUser.sName) aUD=Split(sGetInfo(LCase(sUser)),"|") aUD(27)=sInfo sA="When user '"+CStr(sUser)+"' logs on, message will be sent to '"+aUD(27)+"'" oUsers(LCase(sUser))=Join(aUD,"|") End If End If Case sCd+"message" If sUser="" Then sA="Please specify a username" Else If sInfo="" Then sInfo="The user '"+CStr(curUser.sName)+"' wants to talk with you. This message was left "+sFdate(Now()) If colUsers.Online(CStr(sUser)) Then colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),CStr(Right(sCurData,Len(sInfo))) sA="The user '"+CStr(sUser)+"' is online, your message was sent immediately" Else aUD=Split(sGetInfo(LCase(sUser)),"|") aUD(28)=CStr(Right(sCurData,Len(sInfo))) sA="When user '"+CStr(sUser)+"' logs on, he will recieve a message: "+aUD(28) oUsers(LCase(sUser))=Join(aUD,"|") End If End If Case sCd+"let" If sUser="" Then sUser="None " sLetUser=sUser sA="The user '"+CStr(sUser)+"' can get in this hub temporarily without share or other limits." Case sCd+"vip" iSecurity=1 If Not iVipCommands Then sA="VIP commands are not available." ' ElseIf Not bIsPowerOp(curUser.sName) Then ' sA="You dont have enough privileges to VIP." ElseIf sUser="" Then sA="Please give a username" ElseIf Left(sCurData,1)="<" And sInfo<>"" Then sA="Can't VIP because everybody saw the password." ElseIf bIsIP(sUser) Then sA="Can't VIP an IP number." ElseIf bIsOP(sUser) Then sA="Can't VIP an operator." ElseIf bIsVIP(sUser) Then sA="The user '"+sUser+"' is already VIP." ElseIf bIsNameBanned(sUser) Then sA="Cant VIP because user '"+sUser+"' is banned." Else If sInfo="" Then sInfo=sPassword() If colUsers.Online(CStr(sUser)) Then colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"Your current nickname is registered as a VIP user and your password is '"+sInfo+"' (without quotes). Log out and back in with that password." sA="The user '"+sUser+"' is now registered as a VIP user and his/her password is been sent to him/her. If he/she cant get back in soon, use "+sCd+"deVIP and try again." Else sA="The user '"+sUser+"' is not online, but he/she is now registered as a VIP user. You should now give a password '"+sInfo+"' (without quotes) to him/her. If he/she cant get back in soon, use "+sCd+"deVIP and try again." End If colUsers.SendChatToAll CStr(sbotname), CStr(curUser.sName)+" just registered "+sUser+" with VIP status!" Set newVip=frmHub.lstOps.listItems.add(,,CStr(sUser)) newVip.SubItems(1)=CStr(sInfo) newVip.SubItems(2)="False" End If Case sCd+"devip" iSecurity=1 If Not iVipCommands Then sA="VIP commands are not available." ' ElseIf Not bIsPowerOp(curUser.sName) Then ' sA="You dont have enough privileges to deVIP." ElseIf sUser="" Then sA="Please give a username" ElseIf bIsOP(sUser) Then sA="Can't deVIP an operator." ElseIf Not bIsVIP(sUser) Then sA="The user '"+sUser+"' is not a VIP user." Else j=-1 For Each Oper In frmHub.lstOps.ListItems If LCase(CStr(Oper.text))=LCase(CStr(sUser)) And Left(Oper.SubItems(1),6)<>"Banned" And Oper.SubItems(2)="False" Then j=Int(Oper.Index) Next If j>-1 Then frmHub.lstOps.ListItems.Remove j If colUsers.Online(CStr(sUser)) Then colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"The operator "+CStr(curUser.sName)+" removed your VIP privileges." End If sA="The user '"+sUser+"' just lost his/her VIP privileges." End If Case sCd+"op" iSecurity=1 If Not iOpCommands Then sA="OP commands are not available." ElseIf Not bIsPowerOp(curUser.sName) Then sA="You dont have enough privileges to OP." ElseIf sUser="" Then sA="Please give a username" ElseIf Left(sCurData,1)="<" And sInfo<>"" Then sA="Can't OP because everybody saw the password." ElseIf bIsIP(sUser) Then sA="Can't OP an IP number." ElseIf bIsOP(sUser) Then sA="The user '"+sUser+"' is already OP." ElseIf bIsVIP(sUser) Then sA="Can't OP a VIP user, deVIP him/her first." ElseIf bIsNameBanned(sUser) Then sA="Cant OP because user '"+sUser+"' is banned." Else If sInfo="" Then sInfo=sPassword() If colUsers.Online(CStr(sUser)) Then colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"Your current nickname is registered as an operator and your password is '"+sInfo+"' (without quotes). Log out and back in with that password." sA="The user '"+sUser+"' is now registered as a operator and his/her password is been sent to him/her. If he/she cant get back in soon, use "+sCd+"deOP and try again." Else sA="The user '"+sUser+"' is not online, but he/she is now registered as an operator. You should now give a password '"+sInfo+"' (without quotes) to him/her. If he/she cant get back in soon, use "+sCd+"deOP and try again." End If colUsers.SendChatToAll CStr(sbotname), CStr(curUser.sName)+" just added another OP! Now "+sUser+" can kick your ass for fakin in my hub too!" Set newOP=frmHub.lstOps.listItems.add(,,CStr(sUser)) newOP.SubItems(1)=CStr(sInfo) newOP.SubItems(2)="True" End If Case sCd+"deop" iSecurity=1 If Not iOpCommands Then sA="OP commands are not available." ElseIf Not bIsPowerOp(curUser.sName) Then sA="You dont have enough privileges to deOP." ElseIf sUser="" Then sA="Please give a username" ElseIf bIsPowerOP(sUser) Then sA="Can't deOP an administrator." ElseIf Not bIsOP(sUser) Then sA="The user '"+sUser+"' is not an operator." Else j=-1 For Each Oper In frmHub.lstOps.ListItems If LCase(CStr(Oper.text))=LCase(CStr(sUser)) And Oper.SubItems(2)="True" Then j=Int(Oper.Index) Next If j>-1 Then frmHub.lstOps.ListItems.Remove j If colUsers.Online(CStr(sUser)) Then colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"The operator "+CStr(curUser.sName)+" removed your operator privileges." End If sA="The operator '"+sUser+"' just lost his/her operator privileges." End If Case sCd+"setredirect",sCd+"changeredirect" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf sUser="" Then sA="Currently Redirecting to: "+frmHub.txtRedirect Else aRedirHub=Split(sUser,",") sA="Redirect hub is now set to "+Join(aRedirHub,", ") frmHub.txtRedirect=CStr(Trim(aRedirHub(0))) End If Case sCd+"setmaxusers",sCd+"maxusers" iSecurity=1 If Not bIsPowerOp(curUser.sName) Then sA=iAnswerNot ElseIf CDbl(sUser)<1 Then sA="Current Max Users: "+CStr(iMaxUsers)+"(Script)/"+cstr(frmHub.sldrMaxUsers)+"(Hub Slider)" Else iMaxUsers=CDbl(sUser) sA="Max users is now set to "+CStr(iMaxUsers)+"(Script)/"+cstr(frmHub.sldrMaxUsers)+"(Hub Slider)" End If End Select If Left(sCurData,Len(sOpChatName)+6)="$To: "+sOpChatName+" " Then sCurData=Mid(sCurData, 2) sCurData=Mid(sCurData, InStr(1, sCurData, "$<") + 1) sCommand=Mid(sCurData, InStr(1, sCurData, "> ") + 2) sCurData = " From: "+sOpChatName+" $" & CStr(sCurData) & "|" For Each User In colUsers If User.bOperator Then If oChatState.Item(User.sName) = "on" And Not User.sName = curUser.sName and oChatState.Item(curUser.sName)="on" Then User.SendData "$To: " & User.sName & CStr(sCurData) ichatstate=1 End If Next End If If sA<>"" Then If InStr(sA,"\n")>1 Then sA=Replace(sA,"\n",vbCrLf) If InStr(sA,"\t")>1 Then sA=Replace(sA,"\t",vbTab) If Left(sCurData,1)="<" Or iSecurity=2 Then If iSecurity=0 Then colUsers.SendChatToAll CStr(sBotName),CStr(sA) Else curUser.SendData CStr("<"+sBotName+" (private)> "+sA) End If Else If ichatstate=1 then iChatState=0 If oChatState.Item(curUser.sName) = "off" then curUser.PrivateMessage CStr(sOpChatName),"You are logged out, Please type "+sCd+"logon to turn opchat on."+vbCrLf+Cstr(sA) end if For each userOP in colUsers If userOP.bOperator Then If oChatState.Item(UserOP.sName)="on" and oChatState.Item(curUser.sName)="on" then userOP.SendData "$To: "+userOP.sName+" From: "+sOpChatName+" $<"+sBotName+"> "+CStr(sA)+"|" End If Next Else curUser.PrivateMessage CStr(sBotName),CStr(sA) End If End If End If End If iChatState=0 If Left(sCurData,1)="<" Then sA="" iSecurity=0 aUD=Split(sGetInfo(curUser.sName),"|") aUD(22)=sFdate(Now())+" (main chat message: '"+CStr(Mid(sCurData,InStr(sCurData,">")+2))+"')" oUsers(LCase(CStr(curUser.sName)))=Join(aUD,"|") s=LCase(Mid(CStr(sCurData),InStr(CStr(sCurData),">")+2)) Select Case s Case sCd+"share" If iDynMinShare Then For i = 0 To UBound(aDynMinShare) Step 2 If colUsers.Count > aDynMinShare(i) Then iMinShare=aDynMinShare(i+1)*iDynMinShareScale Next sTxt="Share limit is now "+CStr(sSuffix(iMinShare))+" (dynamic, "+CStr(colUsers.Count)+" users connected)"+_ "\nDynamic share limits:" For i = 0 To UBound(aDynMinShare) Step 2 sTxt=sTxt+"\n"+CStr(aDynMinShare(i))+" users\t"+CStr(sSuffix(aDynMinShare(i+1)*iDynMinShareScale)) Next Else sTxt="Share limit is now "+CStr(sSuffix(iMinShare))+" (static)" End If sA=CStr(sTxt) Case sCd+"myip" iSecurity=1 sA="Your IP number is "+curUser.IP Case sCd+"myinfo" iSecurity=1 sA="Information about "+CStr(curUser.sName)+_ "\nDescription:\t"+aUD(0)+_ "\nE-mail:\t\t"+aUD(1)+_ "\nIP:\t\t"+aUD(2)+_ "\nConnection:\t"+aUD(5)+_ "\nMode:\t\t"+aUD(6)+_ "\nLast logon:\t"+aUD(13)+_ "\nFailed logons:\t"+aUD(16)+_ "\nLast fail reason:\t"+aUD(17)+_ "\nKicked:\t\t"+aUD(18)+" times"+_ "\nLast kicked:\t"+aUD(19) Case sCd+"help" If Not curUser.bOperator Then iSecurity=1 sA="Following commands are available:\n"+_ sCd+"hubinfo\t\t\tdisplays hub settings\n"+_ sCd+"share\t\t\tshows share limits\n"+_ sCd+"myip\t\t\tshows your ip number\n"+_ sCd+"myinfo\t\t\tshows your own information\n"+_ sCd+"rules\t\t\tshows the hub rules\n"+_ sCd+"slots\t\t\tshows users with open slots\n"+_ sCd+"help\t\t\tthis help" End If Case sCd+"hubinfo" If Not curUser.bOperator Then sA="Hub information:"+_ "\nHub name:\t"+frmHub.txtName+_ "\nAddress:\t\t"+frmHub.txtIP+_ "\nDescription:\t"+frmHub.txtDescription+_ "\nMax users:\t"+CStr(frmHub.sldrMaxUsers)+_ "\nMin share:\t"+sSuffix(iMinShare)+_ "\nMin slots:\t\t"+CStr(iMinSlots)+" (and "+CStr(iMinSlotsPerHub)+"/hub)"+_ "\nMax hubs:\t"+CStr(iMaxHubs) End If Case sCd+"rules" iSecurity=1 sA=frmHub.txtOnjoin Case sCd+"slots" sText="Users with free slots:" iSecurity=8 For Each oUser in colUsers If oUsers.Exists(LCase(CStr(oUser.sName))) Then aTemp=Split(oUsers(LCase(CStr(oUser.sName))),"|") If aTemp(10)<>"N/A" And InStr(aTemp(10),"/")>0 Then If CDbl(Left(aTemp(10),1))>0 Then sText=sText+"\n"+aTemp(10)+"\t"+CStr(oUser.sName) End If End If End If Next sA=CStr(sText) End Select If sA<>"" Then If InStr(sA,"\n")>1 Then sA=Replace(sA,"\n",vbCrLf) If InStr(sA,"\t")>1 Then sA=Replace(sA,"\t",vbTab) If iSecurity=0 Then colUsers.SendChatToAll CStr(sBotName),CStr(sA) Elseif isecurity=8 then curUser.PrivateMessage CStr(sBotName), CStr(sA) Else curUser.SendData CStr("<"+sBotName+" (private)> "+sA) End If End If End If If Left(sCurData,13)="$OpForceMove " Then i=InStr(sCurData,"$Where") j=InStr(sCurData,"$Msg:") ColUsers.SendChatToAll "Hub-Security","The user "+CStr(Mid(sCurData,19,i-19))+" was redirected to "+CStr(Mid(sCurData,i+7,j-i-7))+" by "+CStr(curUser.sName)+": "+CStr(Mid(sCurData,InStr(sCurData,"$Msg:")+5)) End If If Left(sCurData,5)="$To: " Then aUD=Split(sGetInfo(curUser.sName),"|") aUD(22)=sFdate(Now())+" (private message to "+CStr(Mid(sCurData,6,InStr(6,CStr(sCurData)," ")-6))+")" oUsers(LCase(CStr(curUser.sName)))=Join(aUD,"|") If curUser.bOperator And InStr(sCurData,"You are being kicked because: ")>1 Then sUser=CStr(Mid(sCurData,6,InStr(6,CStr(sCurData)," ")-6)) aUD=Split(sGetInfo(sUser),"|") aUD(18)=CStr(CDbl(aUD(18))+1) aUD(19)=sFdate(Now())+" by "+curUser.sName+" because: "+CStr(Mid(sCurData,InStr(sCurData,"because: ")+9)) If iKickCounter>0 And CDbl(aUD(18))+1>iKickCounter Then colUsers.SendChatToAll CStr(sBotName),"The user "+CStr(sUser)+" has been kicked "+aUD(18)+" times" End If If bIsOP(sUser) Then iReason=20 oUsers(LCase(CStr(sUser)))=Join(aUD,"|") aUD=Split(sGetInfo(curUser.sName),"|") aUD(23)=CStr(CDbl(aUD(23))+1) oUsers(LCase(CStr(curUser.sName)))=Join(aUD,"|") iPunish(3)=1+iPunish(3) End If End If If iReason>0 And iReason<20 And iReason<>2 Then If bIsVip(curUser.sName) Or Lcase(curUser.sName)=sLetUser Then iReason=0 End If If iReason>0 Then If curUser.bOperator=False Or iReason=2 Or iReason=20 Then If sLastPunished<>CStr(curUser.sName) And bIsPowerOP(CStr(curUser.sName))=False Then iPunish(iPolicy(iReason))=1+iPunish(iPolicy(iReason)) Select Case iReason Case 17 sPunishMessage=CStr(sReason(iReason))+" ("+CStr(aFileinfo(0))+"). "+CStr(sPolicy(iPolicy(iReason)))+" Attempts Failed:"+aUD(16)+" Successful:"+aUD(15)+" Searches:"+aUD(12) sFollowMessage=CStr(curUser.sName)+": (IP: "+CStr(curUser.IP)+") "+sPunishMessage Case 12,16,20 sPunishMessage=CStr(sReason(iReason))+" "+CStr(sPolicy(iPolicy(iReason)))+" Attempts Failed:"+aUD(16)+" Successful:"+aUD(15)+" Searches:"+aUD(12) sFollowMessage=CStr(curUser.sName)+": (IP: "+CStr(curUser.IP)+") "+sPunishMessage Case Else sPunishMessage=CStr(sReason(iReason))+" "+CStr(sPolicy(iPolicy(iReason)))+" Attempts Failed:"+aUD(16)+" Successful:"+aUD(15)+" Searches:"+aUD(12) sFollowMessage=CStr(curUser.sName)+": (IP: "+CStr(curUser.IP)+", S: "+CStr(aUD(4))+", D: "+CStr(sD(0))+") "+sPunishMessage End Select curUser.PrivateMessage CStr(sBotName),CStr(sPunishMessage) frmHub.DoEventsForMe Select Case iPolicy(iReason) Case 1 CurUser.ForceMove frmHub.txtRedirect If UBound(aRedirHub)>0 Then frmHub.txtRedirect=CStr(Trim(aRedirHub(Int(Rnd*(UBound(aRedirHub)+1))))) frmHub.DoEventsForMe CurUser.Disconnect() Case 2 CurUser.Disconnect() Case 3 CurUser.Kick() Case 4 x=Ban(curUser.sName,CStr(sPolicy(iPolicy(iReason))),CStr(sBotName)) CurUser.Kick() End Select sLastPunished=CStr(curUser.sName) If sFollow<>"None" Then If LCase(sFollow)=LCase(sOpChatName) Then For each userOP in colUsers If userOP.bOperator Then colUsers.ItemByName(CStr(userOP.sName)).SendData CStr("$To: "+userOP.sName+" From: "+sOpChatName+" $<"+sBotName+"> "+CStr(sFollowMessage)+"|") End If Next Else colUsers.ItemByName(CStr(sFollow)).PrivateMessage CStr(sBotName),CStr(sFollowMessage) End If End If ElseIf sLastPunished=CStr(curUser.sName) Then curUser.Disconnect End If End If End If End Sub Function iConnType(sConn) 'Detect Connection Type Select Case LCase(Left(sConn,Len(sConn)-1)) Case "28.8kbps","33.6kbps","56kbps" iConnType=1 Case "isdn" iConnType=2 Case "satellite" iConnType=3 Case "cable" iConnType=4 Case "dsl" iConnType=5 Case "lan(t1)" iConnType=6 Case "lan(t3)" iConnType=7 Case Else iConnType=0 End Select End Function Function sSuffix(iShare) If iShare<1024^2 Then sSuffix=CStr(iShare/1024)+" kB" ElseIf iShare<1024^3 Then sSuffix=CStr(iShare/1024^2)+" MB" Else sSuffix=CStr(iShare/1024^3)+" GB" End If End Function Function bIsIP(sIP) bIsIP=False i=0 For j = 1 To Len(CStr(sIP)) If (Asc(Mid(CStr(sIP),j,1))<48 Or Asc(Mid(CStr(sIP),j,1))>57) And Asc(Mid(CStr(sIP),j,1))<>46 Then i = 9 If Asc(Mid(CStr(sIP), j, 1)) = 46 Then i = i + 1 Next If i=3 Then bIsIP=True End Function Function bIsVIP(sUser) bIsVIP=False For lPos= 1 To frmHub.lstOps.ListItems.Count If Left(frmHub.lstOps.ListItems.Item(lPos).SubItems(1),6)<>"Banned" And LCase(CStr(frmHub.lstOps.ListItems.Item(lPos)))=LCase(CStr(sUser)) Then If frmHub.lstOps.ListItems.Item(lPos).SubItems(2)="False" Then bIsVIP=True End If Next End Function Function bIsOP(sUser) bIsOP=False For lPos= 1 To frmHub.lstOps.ListItems.Count If LCase(CStr(frmHub.lstOps.ListItems.Item(lPos)))=LCase(CStr(sUser)) Then If frmHub.lstOps.ListItems.Item(lPos).SubItems(2)="True" Then bIsOP=True End If Next End Function Function bIsPowerOP(sUser) bIsPowerOP=False For i=0 to UBound(aPowerOps) If LCase(CStr(sUser))=LCase(CStr(aPowerOps(i))) Then bIsPowerOP=True Next End Function Function bIsNameBanned(sUser) bIsNameBanned=False For lPos= 1 To frmHub.lstOps.ListItems.Count If LCase(CStr(frmHub.lstOps.ListItems.Item(lPos)))=LCase(CStr(sUser)) Then If Left(frmHub.lstOps.ListItems.Item(lPos).SubItems(1),6)="Banned" Then bIsNameBanned=True End If Next End Function Function bIsIPBanned(sIP) bIsIPBanned=False For lPos = 0 To frmHub.lstPermBan.ListCount - 1 If frmHub.lstPermBan.List(lPos) = sIP Then bIsIPBanned=True Next End Function Function Ban(sUser,sReason,sBanner) Dim j Dim oper Dim newBan If bIsIP(sUser) Then Ban="IP":Exit Function If bIsVIP(sUser) Then Ban="VIP":Exit Function If bIsOP(sUser) And bIsPowerOP(sBanner)=False Then Ban="OP":Exit Function If bIsNameBanned(sUser) Then Ban="BA":Exit Function Set newBan=frmHub.lstOps.listItems.add(,,CStr(sUser)) newBan.SubItems(1)="Banned "+sFdate(Now())+" by "+CStr(sBanner)+" because: "+CStr(sReason)+" "+CStr(int(rnd*1000000)) newBan.SubItems(2)="False" aUD=Split(sGetInfo(sUser),"|") aUD(21)=sFdate(Now())+" by "+CStr(sBanner)+" because: "+CStr(sReason) oUsers(LCase(sUser))=Join(aUD,"|") aUD=Split(sGetInfo(sBanner),"|") aUD(24)=CStr(CDbl(aUD(24))+1) oUsers(LCase(CStr(sBanner)))=Join(aUD,"|") iPunish(4)=1+iPunish(4) If colUsers.Online(CStr(sUser)) Then Ban=CStr(colUsers.ItemByName(CStr(sUser)).IP()) If sReason="(No reason given)" Then colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"You have been banned form this hub. Have a nice day." Else colUsers.ItemByName(CStr(sUser)).PrivateMessage CStr(sBotName),"You have been banned form this hub because: "+CStr(sReason)+". Have a nice day." End If Else Ban="OK" End If End Function Function Unban(sUser,sUnBanner) Dim oper Unban=0 Do j=-1 For Each Oper In frmHub.lstOps.ListItems If LCase(CStr(Oper.text))=LCase(CStr(sUser)) And Left(Oper.SubItems(1),6)="Banned" And Oper.SubItems(2)="False" Then j=Int(Oper.Index) Next If j>-1 Then Unban=Unban+1 frmHub.lstOps.ListItems.Remove j End If Loop Until j=-1 aUD=Split(sGetInfo(sUser),"|") aUD(21)="Unbanned "+sFdate(Now())+" by "+CStr(sUnBanner) oUsers(LCase(sUser))=Join(aUD,"|") End Function Function sGetInfo(sUser) If oUsers.Exists(LCase(CStr(sUser))) Then sGetInfo=oUsers(LCase(CStr(sUser))) Else sGetInfo=Join(Array("","","","Static","N/A","N/A","N/A","N/A","N/A","1","N/A","No limit","0","Never","Never","0","0","No failed logons","0","Not kicked","No","N/A","Never","0","0","0","0","",""),"|") oUsers(LCase(CStr(sUser)))=sGetInfo End If End Function Function sUserinfo(sUser) aUD=Split(sGetInfo(sUser),"|") sUserinfo="Userinfo of "+sUser+" since "+sStarted+"\n" If colUsers.Online(CStr(sUser)) Then If aUD(2)="" Then sUserinfo=sUserinfo+"\nThere were no information of this user. Type '"+sCd+"userinfo "+sUser+"' again for updated information.\n\n" call DataArival (colUsers.ItemByName(CStr(sUser)),colUsers.ItemByName(CStr(sUser)).sMyInfoString) aUD(2)=colUsers.ItemByName(CStr(sUser)).IP End If sUserinfo=sUserinfo+"Connected:\tYes\n" Else If aUD(2)="" Then sUserinfo=sUserinfo+"Connected:\tNot connected since "+sStarted+"\n" Else sUserinfo=sUserinfo+"Connected:\tNo\n" End If End If i=0:b1=0:b2=0:b3=0:sOp="No" For each oper in frmHub.lstOps.listItems If lcase(oper.text)=sUser Then i=int(oper.index) If frmHub.lstOps.ListItems.Item(i).SubItems(2)="True" Then sOp="Yes, kicked "+aUD(23)+" users, banned "+aUD(24)+" users." Else If Left(frmHub.lstOps.ListItems.Item(i).SubItems(1),6)="Banned" Then b1=b1+1 If aUD(21)="N/A" Then aUD(21)=CStr(Mid(frmHub.lstOps.ListItems.Item(i).SubItems(1),8,InStrRev(frmHub.lstOps.ListItems.Item(i).SubItems(1)," ")-8)) End If End If End If Next For i = 0 to frmHub.lstPermBan.listcount-1 If frmHub.lstPermBan.list(i)=aUD(2) Then b2=b2+1 Next For i=0 to frmHub.lstTempBan.listcount-1 If frmHub.lstTempBan.list(i)=aUD(2) Then b3=b3+1 Next sVip="No" If bIsVip(sUser) Then sVip="Yes" If b1=0 And b2=0 And b3=0 Then aUD(20)="No" Else aUD(20)=CStr(b1)+" name bans, "+CStr(b2)+" ip bans, "+CStr(b3)+" temp ip bans" End If sUserinfo=sUserinfo+"Operator: \t\t"+sOp+_ "\nVIP user: \t\t"+sVip+_ "\nDescription: \t"+aUD(0)+_ "\nE-mail:\t\t"+aUD(1)+_ "\nIP:\t\t"+aUD(2)+_ "\nIP space:\t\t"+aUD(3)+_ "\nShared:\t\t"+aUD(4)+_ "\nConnection:\t"+aUD(5)+_ "\nMode:\t\t"+aUD(6)+_ "\nStatus:\t\t"+aUD(7)+_ "\nClient version:\t"+aUD(8)+_ "\nOpen hubs:\t"+aUD(9)+_ "\nOpen slots:\t"+aUD(10)+_ "\nUpload limit:\t"+aUD(11)+_ "\nSearch results:\t"+aUD(12)+_ "\nLast logon:\t"+aUD(13)+_ "\nFirst logon:\t"+aUD(14)+_ "\nLast activity:\t"+aUD(22)+_ "\nSuccessful logons:\t"+aUD(15)+_ "\nFailed logons:\t"+aUD(16)+_ "\nLast fail reason:\t"+aUD(17)+_ "\nKicked:\t\t"+aUD(18)+" times"+_ "\nLast kicked:\t"+aUD(19)+_ "\nBanned:\t\t"+aUD(20)+_ "\nLast banned:\t"+aUD(21)+_ "\nOn logon watcher:\t"+aUD(27)+_ "\nOn logon message:\t"+aUD(28) If sUser=sLetUser Then sUserinfo=sUserinfo+"\nLetUser:\tYes" End Function Function sFDate(sDate) sFDate=WeekDayName(Weekday(sDate), True)+" "+CStr(Day(sDate))+"."+CStr(Month(sDate))+"."+CStr(Year(sDate))+" "+FormatDateTime(sDate,4)+":" If Second(sDate)<10 Then sFDate=sFDate+"0"+CStr(Second(sDate)) Else sFDate=sFDate+CStr(Second(sDate)) End Function Function sPassword() Randomize sPassword="" For i=0 To 11 If Rnd(1)*24<1 Then sPassword=sPassword+Chr(Int(Rnd*10)+48) Else sPassword=sPassword+Mid(aFakeNameSuffix(i Mod 6),Int(Rnd*Len(aFakeNameSuffix(i Mod 6))+1),1) End If Next End Function Function sStatus(s) Select Case Asc(s) Case 1 sStatus="Normal" Case 2,3 sStatus="Normal away" Case 4,5 sStatus="Fileserver" Case 6,7 sStatus="Fileserver away" Case 8,9 sStatus="Speeduser" Case 10,11 sStatus="Speeduser away" End Select End Function '-----THIS SHOULD BE THE LAST LINE OF THIS SCRIPT