Active Mode Port Script
Moderator: Moderators
Active Mode Port Script
Looking for a script that will display the port number a person is using in active mode Any help would be appreciated, thanks.
i have a DataPolice,
it is probably not what you want,
but is has helped some users with difficulties to connect:
http://wza.digitalbrains.com/users/walt ... ice.script
it checks if the ConnectToMe IP is the same as the user's ip,
and disconnects the user with a (Dutch, I'm sorry) pm.
it is probably not what you want,
but is has helped some users with difficulties to connect:
http://wza.digitalbrains.com/users/walt ... ice.script
it checks if the ConnectToMe IP is the same as the user's ip,
and disconnects the user with a (Dutch, I'm sorry) pm.
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
ah, you mean in response to this:
http://dcplusplus.sourceforge.net/forum ... .php?t=163
you'd need a script that enumerates all users and sends them a RevConnectToMe
this is not hard... but I'm seriously doubting the usefulness
http://dcplusplus.sourceforge.net/forum ... .php?t=163
you'd need a script that enumerates all users and sends them a RevConnectToMe
this is not hard... but I'm seriously doubting the usefulness
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
you could have a script checking the searches and connection attempts as they come, and pop up a warning to the user when you encounter a bad port..
this should work, and a similar check could be done with the "$Search" if there is a IP in it..
havent tested this, though, wrote it on the fly, correct if needed
and remember this might be really annoying! haha
Code: Select all
Sub DataArival (curUser, sCurData)
If instr(1,sCurData, "$ConnectToMe ") then
sPort = afterlast(sCurData, ":")
if sPort = "1412" then
curUser.Privatemessage "Portcheck", "Message here"
end if
if sPort = "412" then
curUser.Privatemessage "Portcheck", "Message here"
end if
end if
End Sub
Function AfterLast(sFrom, sAfterLast)
If InStr(1, sFrom, sAfterLast) Then
AfterLast = Right(sFrom, Len(sFrom) - InStrRev(sFrom, sAfterLast) - (Len(sAfterLast) - 1))
Else
AfterLast = ""
End If
End Function
havent tested this, though, wrote it on the fly, correct if needed
and remember this might be really annoying! haha
Thanks aDe, I'm thinking of just making one that will kick them, not ban, but kick stating the reason why and how to go about changing their port so they can connect again.
I can either force it that way, or set a timer to go off every hour, reminding them that in so many days, we we are going to not allow connections on those ports at all. Maybe have both sets of code in there, hard code a date in, and it will just auto start not letting them connect on the appropriate day
Code: Select all
Sub NewUserConnected(curUser)
curUser.SendData "$RevConnectToMe " & CStr(sBotName) & " " & CStr(curUser.sName)
End Sub
Sub DataArival (curUser, sCurData)
If instr(1,sCurData, "$ConnectToMe ") then
sPort = afterlast(sCurData, ":")
if sPort = "1412" then
curUser.SendChatMessage cstr(ThisBotsName), "YOUR MESSAGE HERE"
frmHub.DoEventsForMe
curUser.Disconnect
end if
if sPort = "412" then
curUser.SendChatMessage cstr(ThisBotsName), "YOUR MESSAGE HERE"
frmHub.DoEventsForMe
curUser.Disconnect
end if
end if
End Sub
Function AfterLast(sFrom, sAfterLast)
If InStr(1, sFrom, sAfterLast) Then
AfterLast = Right(sFrom, Len(sFrom) - InStrRev(sFrom, sAfterLast) - (Len(sAfterLast) - 1))
Else
AfterLast = ""
End If
End Function
Final version, you can edit this however you like...
Hope it helps some of you. I tested this out and it was working before posting
Code: Select all
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Global Variables '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim sBotName
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Main Sub '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Main()
sBotName = "AntiPort" ' <- name of the bot
frmHub.RegisterBotName(CStr(sBotName))
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Data Arival '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub DataArival (curUser, sCurData)
dim sPort
If instr(1,sCurData, "$ConnectToMe ") Then
sPort = AfterLast(scurdata, ":")
If sPort = "1412" Then
curUser.SendChatMessage cstr(sBotName), "You attempted to connect under a banned port: 1412 You must change your active port to something other than 412 or 1412""
MessageOps curUser.sName, 2
frmHub.DoEventsForMe
curUser.Disconnect
End If
If sPort = "412" Then
curUser.SendChatMessage cstr(sBotName), "You attempted to connect under a banned port: 412 You must change your active port to something other than 412 or 1412"
MessageOps curUser.sName, 1
frmHub.DoEventsForMe
curUser.Disconnect
End If
End If
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'New User Connected '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub NewUserConnected(curUser)
Dim sCommand
sCommand = "$RevConnectToMe " & curUser.sName & " " & sBotName
curUser.SendData Cstr(sCommand)
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Op Connected '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub OpConnected(curUser)
Call NewUserConnected(curUser)
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Message Op's '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function MessageOps(sUserName, iMessage)
Dim sOpText
Dim sAdminList
Dim aNicks, sNick
sAdminList = "OP1:OP2:OP3" ' <-- Enter who you want to view, replace OP1/OP2/OP3 with the usernames, more a!!
If iMessage = 1 Then
sOpText = Now() & " " & sUserName & " was connected under invalid port number 412"
Elseif iMessage = 2 Then
sOpText = Now() & " " & sUserName & " was connected under invalid port number 1412"
Elseif iMessage = 3 Then
sOpText = Now() & " " & sUserName & " blank :)"
Elseif iMessage = 4 Then
sOpText = Now() & " " & sUserName & " blank :)"
Else
sOpText = Now() & " " & "WOW, Something if fucked up in the script"
End If
aNicks = Split(sAdminList, ":")
For Each sNick In aNicks
If colUsers.Online(CStr(sNick)) Then
Set tmpUser = colUsers.ItemByName(CStr(sNick))
tmpUser.PrivateMessage CStr(sBotName), CStr(sOpText)
frmHub.DoEventsForMe
End If
Next
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'Helper Functions '
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function BeforeFirst(sIn, sFirst)
BeforeFirst = Left(sIn, InStr(1, sIn, sFirst) - 1)
End Function
Function AfterFirst(sIn, sFirst)
AfterFirst = Right(sIn, Len(sIn) - InStr(1, sIn, sFirst) - (Len(sFirst) - 1))
End Function
Function isCommand(sData)
isCommand = (Left(sData,1)="$")
End Function
Public Function AfterLast(sFrom, sAfterLast)
If InStr(1, sFrom, sAfterLast) Then
AfterLast = Right(sFrom, Len(sFrom) - InStrRev(sFrom, sAfterLast) - (Len(sAfterLast) - 1))
Else
AfterLast = ""
End If
End Function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''