Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Vector
« on: December 30, 2008, 10:25:28 PM »

Re-worked the smart kick feature using GetGTC. If the value of the first join and the second join is less than the amount of seconds required to evade a smart kick (Default: 3 * 1000 milliseconds = 3 seconds), the user is banned.

Removed the timer, because it was causing things to fail.

We should experiment with GetGTC in the other functions as well.

Make sure you change the setting in ModerationSettings.ini from 2 (I think it is) to 3000
Posted by: Vector
« on: December 04, 2008, 01:12:19 PM »

Quote from: Vector
Please let me know if this fixes anything. I did not update this plugin on the server.

=/
Posted by: ArticWolve
« on: December 04, 2008, 11:50:35 AM »

If this is on the Rev77 plugin server, I updated to it.
Posted by: Vector
« on: December 04, 2008, 11:37:29 AM »

Re-did spam detection. Please test.

I added the following timer:

Code: [Select]
Sub AM_AMCheckJoins_Timer
  If AMJoins > AMJoinSpamCount Then
    For each check in AMAddJoins.Keys

      found = False
      GetUsername = check

      For i=0 to GetInternalUserCount() - 1
        If Lcase(check) = Lcase(GetNameByPosition(i)) Then
          found = True
          Exit For
        End If
      Next

      If found Then
        If Not dicSmartBans.Exists(GetUsername) Then
          AddQ "/ban " & GetUsername & " Anti-Join spam"
        End If
      End If

      found = False
    Next
    AMJoins = 0
  Else
    AMJoins = 0
    TimerEnabled "AM", "AMCheckJoins", False
  End If
End Sub

This should only attempt to ban users who are still in the channel.

Please let me know if this fixes anything. I did not update this plugin on the server.
Posted by: ArticWolve
« on: November 23, 2008, 04:55:15 PM »

I don't >< but you are right, they should. However, I already know what it's going to do.
Posted by: Hero
« on: November 23, 2008, 04:27:24 PM »

I liked that 'bullshit text' at the start... the user should know what the script is doing.
Posted by: ArticWolve
« on: November 23, 2008, 03:55:04 PM »

A few notes: Removed all the bullshit text at start up. Added an additional timer to prevent C Priv from being given more then once. Otherwise, its not noted in changelog.

Thanks for your idea, but I had to use a boolean, and updated some more stuff. ~Vector
Posted by: Vector
« on: November 22, 2008, 02:40:02 PM »

Finished smart banning. Added smart kick.

I have finalized that this plugin can be considerd "complete".
Posted by: ArticWolve
« on: November 14, 2008, 04:39:18 PM »

Please use THIS code instead:

Updated. ~Vector
Posted by: ArticWolve
« on: November 13, 2008, 04:18:48 PM »

Added Safelist checking/bypass. script no longer bans/kicks/punishes Safelisted Users. *May have missed a sub or function*

Updated first post with new code. Removed duplicate UserTalk. ~Vector
Posted by: Vector
« on: November 04, 2008, 12:02:30 PM »

Freaking Zone...

Added Smart Banning. I did not add enabling, since it was necessary to include this by default, so you don't ban unnecessarily.

Please test.
Posted by: ArticWolve
« on: October 21, 2008, 01:29:02 PM »

Tested and looks like it works, Forgot to post it. Also, you *CAN* use it with stealthbot beta, but you need to edit Commands.xml to have add, remove, set and their aliases set to 10000 (or so).
Posted by: Vector
« on: October 19, 2008, 03:04:29 PM »

Added "admin" and "noadmin" commands (gives someone the A flag - 999 access)
Posted by: Vector
« on: October 19, 2008, 02:36:09 PM »

Fixed major issues with the "limit" command. The bot was trying to issue the add/set command using Command() With the user's access, but I had already restricted both add and set in access.ini (so it didn't work).

To overcome this limitation, I had to instead call Command() Using BotVars.Username, and the /add command (which overrides all access.ini limitations), then check the user's access against the AMAddSettAcc variable (70, which is the default access level for add and set)

It now has a custom message, similar to the bot's default "Set user to blah access". I also added various other checks and bounds to it. I also added a "nolimit" command too.

@Shadow: Anyone with the A flag has no restrictions whatsoever. I just simply exit the sub if they have the A flag, to prevent duplicate addition entries.

Quote
[2:46:42 PM] <Bot-Vector> .whoami
 [2:46:42 PM] <Bot-Vector@Northrend> You have 999 access and flags A.
 [2:46:18 PM] <Bot-Vector> .add testing 600
 [2:46:19 PM] <Bot-Vector@Northrend> Set testing's access to 600.
 [2:46:20 PM] <Bot-Vector@Northrend> Set testing's access to 600.

Quote
[1:54:42 PM] <Bot-Vector> .add hero.a 120
 [1:54:42 PM] <Bot-Vector@Northrend> Set hero.a's access to 120.
 [1:55:05 PM] <Bot-Vector> .add aunoVector@europe 150
 [1:55:06 PM] <Bot-Vector@Northrend> Set aunoVector@europe's access to 150.
 [1:55:15 PM] <Bot-Vector> ~say .limit aunoVector@europe 20
 [1:55:16 PM] <Hero.A@Northrend> .limit aunoVector@europe 20
 [1:55:16 PM] <Bot-Vector@Northrend> aunoVector@europe (150 access) has higher access than you (120 access). Unable to limit.
 [1:55:41 PM] <Bot-Vector> .limit hero.a 121
 [1:55:41 PM] <Bot-Vector@Northrend> Unable to limit hero.a's access. Limit (121) too high for his access (120).
 [1:55:52 PM] <Bot-Vector> .limit hero.a 120
 [1:55:52 PM] <Bot-Vector@Northrend> Limit is ambiguous to user's access.
 [1:56:08 PM] <Bot-Vector> .limit hero.a
 [1:56:09 PM] <Bot-Vector@Northrend> hero.a has no limitation.
 [1:56:14 PM] <Bot-Vector> .limit hero.a 50
 [1:56:15 PM] <Bot-Vector@Northrend> Limited hero.a to giving out 50 access.
 [1:56:19 PM] <Bot-Vector> ~say .add bob 51
 [1:56:19 PM] <Hero.A@Northrend> .add bob 51
 [1:56:20 PM] <Bot-Vector@Northrend> You are limited to giving out 50 access only.
 [1:56:22 PM] <Bot-Vector> ~say .add bob 50
 [1:56:23 PM] <Hero.A@Northrend> .add bob 50
 [1:56:23 PM] <Bot-Vector@Northrend> Set bob's access to 50.
 [2:02:44 PM] <Bot-Vector> .limit hero.a
 [2:02:45 PM] <Bot-Vector@Northrend> hero.a has an access limit of 50.
 [1:56:36 PM] <Bot-Vector> .limit test ee
 [1:56:36 PM] <Bot-Vector@Northrend> The limitation argument must be a numeric value.
 [1:56:45 PM] <Bot-Vector> .limit testing
 [1:56:45 PM] <Bot-Vector@Northrend> User not found.
 [1:56:52 PM] <Bot-Vector> .limit testing 30
 [1:56:53 PM] <Bot-Vector@Northrend> That user doesn't exist. Cannot limit.
 [1:58:01 PM] <Bot-Vector@Northrend> Removed hero.a's add restrictions.

[div class='codetop']CODE[/div][div class='codemain' style='height:200px;white-space:pre;overflow:auto']  Case "limit"
   If uNum < AMLimitUsersAcc Then Exit Sub

   GetDBEntry Arg(1), a, f

   getLim = GetConfigEntry("limit", Arg(1), AMSettingsPath)

   '// Query limits
   If Ubound(Arg) = 1 Then
     If getLim = "" And a <> -1 Then
      Send Source, Arg(1) & " has no limitation.", User
     ElseIf getLim <> "" And a <> - 1 Then
      Send Source, Arg(1) & " has an access limit of " & getLim & ".", User
     Else
      Send Source, "User not found.", User
     End If
     Exit Sub
   End If

     If Not IsNumeric(Arg(2)) Then
      Send Source, "The limitation argument must be a numeric value.", User
      Exit Sub
     End If

     '// User exists?
     If a = -1 Then
      Send Source, "That user doesn't exist. Cannot limit.", User
      Exit Sub
     End If

     '// Trying to limit a user who has higher access than you?
     If cInt(uNum) < cInt(a) Then
      Send Source, Arg(1) & " (" & a & " access) has higher access than you (" & uNum & " access). Unable to limit.", User
      Exit Sub
     End If

     '// Limiting user to their access level?
     If cInt(Arg(2)) = cInt(a) Then
      Send Source, "Limit is ambiguous to user's access.", User
      Exit Sub
     End If

     '// Limiting someone to higher access than they currently have?
     If cInt(Arg(2)) > cInt(a) Then
      Send Source, "Unable to limit " & Arg(1) & "'s access. Limit (" & Arg(2) & ") too high for his access (" & a & ").", User
      Exit Sub
     End If

     WriteConfigEntry "limit", Arg(1), Arg(2), AMSettingsPath

     Send Source, "Limited " & Arg(1) & " to giving out " & Arg(2) & " access.", User[/div] Codebox ftw ~Hero
Posted by: Vector
« on: October 16, 2008, 01:53:12 PM »

I don't want users to be able to change the default access for "add" and "set" exclusively, because they can change it in the plugin. It's not like the other variables, where default doesn't matter. But lets see what Hero says about it.

And the reason I disable them is so the users won't get by the default "add" and "set" access requirements, because if I didn't disable it, they could still add users.

No, it won't work with the beta somewhere around DR 5 or so. it doesn't use access.ini anymore. That has to be set in Commands.xml