StealthBot.net: Resolved: Something annoying... - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Resolved: Something annoying... with .kick *

#1 User is offline   Rich Icon

  • Coke is not a drug, It's a Soda : )
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: September-13 09

Posted January 18, 2010 - 08:28 AM

is there anyway to disable .kick *
thanks
Posted Image
24/7 Stealthbot user since Sept. 2008 in channel Clan Soda @ USWest.

#2 User is offline   Tuck Icon

  • Full Member
  • PipPipPip
  • Group: Banned
  • Posts: 587
  • Joined: August-31 09

Posted January 18, 2010 - 12:02 PM

Have you tried using the Command Manager ?
-Tuck

#3 User is offline   GurkenKinG Icon

  • Emperor of TBR
  • PipPipPip
  • Group: Members
  • Posts: 268
  • Joined: October-13 09

Posted January 18, 2010 - 12:52 PM

Tuck, he doesn't mean to disable the kick command itself, but to disable the wildcard kick with ".kick *". I don't think that the unbuild kick command gives you an option to do that, you would have to use a script for this...
Posted Image


Posted Image

#4 User is offline   Tuck Icon

  • Full Member
  • PipPipPip
  • Group: Banned
  • Posts: 587
  • Joined: August-31 09

Posted January 18, 2010 - 01:24 PM

View PostGurkenKinG, on 18 January 2010 - 12:52 PM, said:

Tuck, he doesn't mean to disable the kick command itself, but to disable the wildcard kick with ".kick *". I don't think that the unbuild kick command gives you an option to do that, you would have to use a script for this...


Oh.. well then it's easy Disable Kick Command in Command Manager

Will only Error if build-in "Kick" has not been disabled
Script("Name") = "kick"
Script("Author") = "Tuck"
Script("Major") = 1
Script("Minor") = 0
Script("Revision") = 0
Script("Description") = "Kick, disabling use of wildcard."

Sub Event_Load()
    Dim Command
    Set Command = OpenCommand("kick")
    If ((Command Is Nothing)) Then
        Set Command = CreateCommand("kick")
        With Command
            Dim Parameter
            .RequiredRank = 60
            .RequiredFlags = "O"
            .Description = "Temporarily removes a user from the channel."
            Set Parameter = .NewParameter("UserName", False, "Word")
            .Parameters.Add Parameter
            Set Parameter = .NewParameter("Message", True, "String")
            .Parameters.Add Parameter
            .Save
            Set Parameter = Nothing
        End With
    End If
    Set Command = Nothing
End Sub

Sub Event_Command(Command)
    If (LCase(Command.Name) = "kick") Then
        If Not (Command.HasAccess Or Command.IsValid) Then Exit Sub
        If Len(Command.Argument("UserName")) > 0 Then
            Dim Username, Message
            Username = Command.Argument("UserName")
            Message = VbNullString
            If Len(Command.Argument("Message")) > 0 Then
                Message = " " & Command.Argument("Message")
            End If
            AddQ "/kick " & Username & Message
        End If
    End If
End Sub


Test:

Quote

[03:02:54 PM] -- Joined channel: op Tuck. --
[03:02:54 PM] -- Tuck. has acquired ops.
[03:03:53 PM] -- [email protected] [141ms] has joined the channel using WarCraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon).
[03:03:59 PM] /kick ghl*
[03:03:59 PM] That user is not logged on.
[03:04:04 PM] /kick ghl-bot
[03:04:04 PM] That user is not logged on.
[03:04:09 PM] /kick *ghl-bot
[03:04:09 PM] That user is not logged on.
[03:04:23 PM] /kick [email protected]
[03:04:23 PM] *[email protected] was kicked out of the channel by *Tuck..
[03:04:24 PM] -- [email protected] has left the channel.
[03:04:25 PM] -- [email protected] [141ms] has joined the channel using WarCraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon).
[03:04:35 PM] /kick [email protected] Testing <3
[03:04:35 PM] *[email protected] was kicked out of the channel by *Tuck. (Testing <3).
[03:04:35 PM] -- [email protected] has left the channel.
[03:04:36 PM] -- [email protected] [141ms] has joined the channel using WarCraft III: Reign of Chaos (Level: 0, icon tier Random, peon icon).
[03:04:57 PM] /kick [email protected]* test!
[03:04:57 PM] That user is not logged on.

-Tuck

#5 User is offline   GurkenKinG Icon

  • Emperor of TBR
  • PipPipPip
  • Group: Members
  • Posts: 268
  • Joined: October-13 09

Posted January 18, 2010 - 02:19 PM

you can't write it as command in the command manager because then the xml file has 2 commands named "kick", which doesn't work... Just write the script as Event_Usertalk, I had this issue with one of my scripts before, there is no solution besides doing it without cmd manager or changing the name of the cmd...

There is just a lil error with this... IT DOESN'T DO ANYTHING IF IT'S DISABLED =/

AddQ "/kick " & Username & Message


Doesn't work if the kick command is disabled, and
Command BotVars.Username, "kick " & Username & Message
does neither, because when it's disabled, it doesn't exist for the bot (that's why your script doesn't error ...)
Posted Image


Posted Image

#6 User is offline   Tuck Icon

  • Full Member
  • PipPipPip
  • Group: Banned
  • Posts: 587
  • Joined: August-31 09

Posted January 18, 2010 - 02:23 PM

View PostGurkenKinG, on 18 January 2010 - 02:19 PM, said:

you can't write it as command in the command manager because then the xml file has 2 commands named "kick", which doesn't work... Just write the script as Event_Usertalk, I had this issue with one of my scripts before, there is no solution besides doing it without cmd manager or changing the name of the cmd...

There is just a lil error with this... IT DOESN'T DO ANYTHING IF IT'S DISABLED =/

AddQ "/kick " & Username & Message


Doesn't work if the kick command is disabled, and
Command BotVars.Username, "kick " & Username & Message
does neither, because when it's disabled, it doesn't exist for the bot (that's why your script doesn't error ...)


/kick is battle.net command

AddQ "/kick " & Username & Message


don't say it dont work when u haven't tested it ;P
-Tuck

#7 User is offline   GurkenKinG Icon

  • Emperor of TBR
  • PipPipPip
  • Group: Members
  • Posts: 268
  • Joined: October-13 09

Posted January 18, 2010 - 02:30 PM

View PostTuck, on 18 January 2010 - 03:23 PM, said:

/kick is battle.net command

AddQ "/kick " & Username & Message


don't say it dont work when u haven't tested it ;P


Uh sry, forgot that... I had the problem with /invite, and there it was not possible =/
Posted Image


Posted Image

#8 User is offline   Tuck Icon

  • Full Member
  • PipPipPip
  • Group: Banned
  • Posts: 587
  • Joined: August-31 09

Posted January 18, 2010 - 02:31 PM

View PostGurkenKinG, on 18 January 2010 - 02:30 PM, said:

Uh sry, forgot that... I had the problem with /invite, and there it was not possible =/


the invite is not a battle channel command u could ask HDX for the packet though then you could get it work :)
-Tuck

#9 User is offline   Hdx Icon

  • Hdx
  • Icon
  • Group: Administrators
  • Posts: 1,359
  • Joined: July-31 09

Posted January 18, 2010 - 10:35 PM

Just a note, you can arrive at the same thing by adding a restriction to the internal kick command. This would be the perfect situation to do it.
So try OpenCommand("kick", SSC.StealthBotInternalScript) *i think thats the long name, the demo script has a referance*
Erin Go Bragh!
Posted Image

#10 User is offline   Tuck Icon

  • Full Member
  • PipPipPip
  • Group: Banned
  • Posts: 587
  • Joined: August-31 09

Posted January 18, 2010 - 11:43 PM

View PostHdx, on 18 January 2010 - 10:35 PM, said:

Just a note, you can arrive at the same thing by adding a restriction to the internal kick command. This would be the perfect situation to do it.
So try OpenCommand("kick", SSC.StealthBotInternalScript) *i think thats the long name, the demo script has a referance*


This is why i would like a overview of wut is possible with the OpenCommand/CreateCommand Module so i don't end up doing stuff the hard way ;(
-Tuck

#11 User is offline   Rich Icon

  • Coke is not a drug, It's a Soda : )
  • PipPip
  • Group: Members
  • Posts: 66
  • Joined: September-13 09

Posted January 20, 2010 - 06:41 AM

Cool thanks Tuck! :)
Posted Image
24/7 Stealthbot user since Sept. 2008 in channel Clan Soda @ USWest.

#12 User is offline   7thAce Icon

  • Find me elsewhere (Inactive)
  • Icon
  • Group: Tech Support Moderators
  • Posts: 1,292
  • Joined: August-18 09

Posted January 20, 2010 - 10:32 PM

I have marked this topic as resolved. If you did not receive a satisfactory response please reply and provide as much relevant information as possible.
Posted Image
7thAce.no-ip.org: Posted Image
Official SB Tech @ Clan SBs USEast
Just a note to all you people who want to give Tech Support: Post with correct info (only - no info is better than wrong info), contribute to the topic, and be clear (the more explanation, the better).

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users