11.02.2004, 15:26 Uhr
Hi.. da könnt ihr mal sehen was der AB aus mir gemacht hat. Klasse bot.. und ich avanciere zum Spammer
Frage: ich würde gerne dieses Script so umfunktionieren das es den channel nicht nur jede Minute abfragt sondern das ganze in sekunden... nur.. ich steig da nicht durch. hatte mir jetzt auch schon n paar scripts angeschaut aber ... ich binn sooo ein noob
Frage: ich würde gerne dieses Script so umfunktionieren das es den channel nicht nur jede Minute abfragt sondern das ganze in sekunden... nur.. ich steig da nicht durch. hatte mir jetzt auch schon n paar scripts angeschaut aber ... ich binn sooo ein noob
Code:
'--------------------------------------------------------------------------- -- -- -
' LIMIT.ASC V1.0 (inspired by chanlimit.tcl by slennox) (C) by Hippo
'--------------------------------------------------------------------------- -- -- -
' This script enhances your bot in the following ways:
'
' - The bot will periodically set a limit in the channels you specify to make large
' flood attacks pointless
' - The DCC command '.limit' will be added for global masters to temporarily enable
' or disable the script and to manually force a limit check
'--------------------------------------------------------------------------- -- -- -
' IMPORTANT: Please make sure that none of the bots in your channels is enforcing
' the "-l" mode because this will cause an endless limit <-> delimit bot war.
'--------------------------------------------------------------------------- -- -- -
' Please configure this script by setting the following variables:
'--------------------------------------------------------- -- -- -
' ACTIVECHANNELS:
' Channels in which to activate the limit script. You can add as many channels as
' you want here, all separated by spaces. Example: "#smof #animexx #chatzone"
' If you leave this setting at "", the limit script will be activated in ALL
' channels your bot is on.
ActiveChannels = ""
' LIMITPLUS:
' Value which will be added to the current number of users on a channel when
' calculating the new limit. If there are 12 users on #lame and LimitPlus is set
' to 10, the bot will set the limit to 22 at the next check.
LimitPlus = 2
' MINCHANGE:
' When the the limit doesn't need to be changed by more than this value, no new
' limit will be set. This reduces the number of +l mode changes.
MinChange = 2
' CHECKTIMER:
' Number of minutes between checks whether a new limit needs to be set. A higher
' value stands for a better protection against mass joins, but don't set this
' value too high if the bot is on big channels. It'll probably block normal
' chatters from joining.
CheckTimer = 4
'=====================================================================------ -- -- -
' If you've changed all variables to fit your needs, you can save and upload the
' script to your bot now. Please don't change anything below this line unless you
' know what you're doing.
'=====================================================================------ -- -- -
Sub Init
Script "Limit V1.0 by Hippo"
Randomize Timer
If ActiveChannels = "" Then
SpreadFlagMessage 0, "+m", "14*** Limit V1.0 by Hippo loaded (active on all channels)"
Else
SpreadFlagMessage 0, "+m", "14*** Limit V1.0 by Hippo loaded (active on: " + Replace(ActiveChannels, " ", ", ") + ")"
End If
CheckLimits
TimedCommand "CheckInstantLimits", 30
End Sub
Sub CheckLimits
For u = 1 to ChanCount
If IsOp(MyNick, ChanName(u)) Then
If (Instr(" " + LCase(ActiveChannels) + " ", " " + LCase(ChanName(u)) + " ") > 0) _
or (ActiveChannels = "") Then
OldLimit = ChanLimit(u)
NewLimit = ChanUserCount(u) + LimitPlus
If (OldLimit = 0) or (Abs(NewLimit - OldLimit) > MinChange) Then
SendLine "mode " & ChanName(u) & " +l " & NewLimit, 3
End If
End If
End If
Next
TimedCommand "CheckLimits", CheckTimer * 60
End Sub
Sub CheckInstantLimits
For u = 1 to ChanCount
If IsOp(MyNick, ChanName(u)) Then
If (Instr(" " + ActiveChannels + " ", " " + ChanName(u) + " ") > 0) _
or (ActiveChannels = "") Then
OldLimit = ChanLimit(u)
NewLimit = ChanUserCount(u) + LimitPlus
If (OldLimit = 0) or (OldLimit < ChanUserCount(u)) Then
SendLine "mode " & ChanName(u) & " +l " & NewLimit, 3
End If
End If
End If
Next
TimedCommand "CheckInstantLimits", 30
End Sub