general bot strange behavour

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

Moderator: Moderators

Locked
InnerCity
Posts: 105
Joined: 2003-05-17 00:35

general bot strange behavour

Post by InnerCity » 2003-06-29 18:25

i want general bot to tell my users about uncompressed aplications. this will be a future expulsion reason, but not yet, so i only want it to tell about dll files. ok, i just added
Dim sReason(21),iPolicy(21) <-------one more value
------------------------------
"T?F?0?1?.vob","T?F?0?1?.dll" <--------of course
--------------------------------
'-----cab,dll-----
sReason(21) = "blablabla, you are a bad boy"
iPolicy(21) = 0

'-----Policies: 0=no action, 1=redirect, 2=disconnect, 3=kick, 4=kick&permban
sPolicy(0) = " you are a bad bad bad boy bla bla bla"
sPolicy(1) = " Lo sentimos, has sido redireccionado."
sPolicy(2) = " Lo sentimos, has sido desconectado.......
------------------------------------
If sFiletype=".vob" Then iReason=17
If sFiletype=".dll" Then iReason=21 <-------of course
--------------------------------------
BUT THE BOT DISCONNECT MY USERS, so i take a look here........
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,21
sPunishMessage=CStr(sReason(iReason))+" ("+CStr(aFileinfo(0))+"). "+CStr(sPolicy(iPolicy(iReason))) <-----------VERY IMPORTANT, TELL WHERE IS THE BAD FILE
sFollowMessage=CStr(curUser.sName)+": (IP: "+CStr(curUser.IP)+") "+sPunishMessage
Case 12,16,20
sPunishMessage=CStr(sReason(iReason))+" "+CStr(sPolicy(iPolicy(iReason)))
sFollowMessage=CStr(curUser.sName)+": (IP: "+CStr(curUser.IP)+") "+sPunishMessage
Case Else
sPunishMessage=CStr(sReason(iReason))+" "+CStr(sPolicy(iPolicy(iReason)))
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......................
IF THERE IS NO "Case 0" why it disconnect the users?
what do i have to add there?
Hi hi hoo

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-06-30 06:16

lol
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 <--------SHOULD I DELETE THIS¿?¿?¿?¿?¿?¿?¿?¿?
End If
End If
End If
End Sub
Hi hi hoo

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-06-30 09:49

No, you shouldn't. What the script does/doesnt?

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-06-30 10:31

the script send the sreason(21) text, the spolicy(0) text and tells the path and name of the bad file, that is OK, but also disconnect the user, this is the problem, it is supossed that ipolicy(0) make no action but... :( :( :( :( :( :( first disconnect the users who are inside the hub with this bad files (dll) and after that don't let them connect to the hub, i start the follow mode in general bot and see them trying and trying to connect and general bot send them the message descripted above
Hi hi hoo

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-07-02 04:19

Ohh, try this:

Code: Select all

   ElseIf sLastPunished=CStr(curUser.sName) And iPolicy(iReason)>0 Then
    curUser.Disconnect
   End If
Disconnect only is to avoid millions of same tempbanned ip's.

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-07-02 07:26

yeah, now it works fine, the bot sends the message but doesn't disconnect anybody .THANKS
now i have a question, i have this value
iSearchInterval = 0 '<- Bad file search interval in minutes.
if you writte 30, for example, the bot will search bad files every 30 minutos, ok, but if you writte 0, as i do, what does it do? i thought it would search the bad files ONLY when a user make the connection to the hub, only one time, but it is not true, at this time the bot is sending the message repeatedly at random time, what are the working rules of the bot in this question?
Hi hi hoo

Gadget
Posts: 62
Joined: 2003-01-11 06:24
Location: Finland
Contact:

Post by Gadget » 2003-07-02 11:20

Well value 0 works just like value 1... Try this if you want to change it:

Code: Select all

Sub tmrScriptTimer_Timer()
 If UBound(aRedirHub)>0 Then frmHub.txtRedirect=CStr(Trim(aRedirHub(Int(Rnd*(UBound(aRedirHub)+1)))))
 iMinute=iMinute+1
 If iMinute=>iSearchInterval And iSearchInterval>0 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

InnerCity
Posts: 105
Joined: 2003-05-17 00:35

Post by InnerCity » 2003-07-02 11:59

perfect, it works fine, sends the message only one time when you connect to the hub
thanks a lot, all of your scripts are very usefull
Hi hi hoo

Locked