StealthBot.net: SetAccess 1.2.1 - StealthBot.net

Jump to content

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

SetAccess 1.2.1 updated May 4, 2010

#1 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted September 16, 2009 - 08:48 PM

SetAccess

Author: AwaKening
Version: 1.2.1

Purpose:
Allows you to change, remove, and check access levels for internal and scripted bot comamnds via chat commands.

Commands:
setaccess <command> <access/flag>
Sets the access level or flag requirements for a command
Aliases: setrank, setflag

delaccess <command>
This completely disables the command
Aliases: remaccess, disablecmd

access <command>
Check the current access/flag requirement for a command

addalias <command> <alias>
Add an alias to an existing command

remalias <command> <alias>
Remove an alias to an existing command

Example Usages:
/setaccess say 90
/setaccess say F
/delaccess mail
/access kick
/addalias shout caps


Settings:

(These shouldn't need to be changed)

Highest
The highest access level you can set a command to
Default = 200

Lowest
The lowest access level you can set commands to
Default = -1

Changelogs:
' 1.2.1 | May 4, 2010
'    - Cleaned up some code in the Command Event
'    - Cleaned up some code in the ParseAccess Sub
'    - Fixed flag and rank settings
'    - Aliases will now work with scripted commands
' 1.2.0
'    - New command .addalias
'    - New command .remalias
'    - Removed some redundant code in the Command Event
'    - Changed Script("Notes") to Script("Description")

Attached File(s)



#2 User is offline   Hdx Icon

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

Posted September 16, 2009 - 09:29 PM

You should not allow users to modify commands they themselves do not have access to.
Also, use SSC.StirngFormat() makes things look better in code, and faster then String concats IIRC.
Erin Go Bragh!
Posted Image

#3 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted September 16, 2009 - 10:03 PM

View PostHdx, on 16 September 2009 - 03:29 PM, said:

You should not allow users to modify commands they themselves do not have access to.


Hence the reason that the default access level is 100. Maybe 200 even would be a better default. It's not really intended as a command to share with a lot of people. Obviously only yourself and a few others that you really trust with it. I personally like it because my bots are on a server, so it saves me a lot of time.

Quote

Also, use SSC.StirngFormat() makes things look better in code, and faster then String concats IIRC.

It's not in the ScriptSupportClass so I didn't even know about it.



#4 User is offline   Hdx Icon

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

Posted September 16, 2009 - 11:10 PM

StringFormat should off been in the SSC in the zip for like the last 40 builds.
And if you have enough access to use this command then you have enough access to use all the other commands, which makes this command moot. So my suggestion still stands.
Erin Go Bragh!
Posted Image

#5 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted September 16, 2009 - 11:47 PM

I think you're missing the whole purpose of the system. It's not so that I can give myself access to a command that I already have access to. I'm sure plenty of others will find this useful.



#6 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted May 04, 2010 - 06:22 AM

Updated to 1.2.1

Added new commands for aliases and gave ability to change scripted commands as well.

#7 User is offline   shrek15001 Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: October-23 09

Posted June 17, 2010 - 12:39 AM

i seem to be getting an error for sb 2.7 and it spams its self 3 times
[08:22:40 PM] Scripting runtime error '429' in SetAccess: (line 35; column 3)
[08:22:40 PM] ActiveX component can't create object
[08:22:40 PM] Offending line: >>
[08:22:40 PM] Scripting runtime error '429' in SetAccess: (line 35; column 3)
[08:22:40 PM] ActiveX component can't create object
[08:22:40 PM] Offending line: >>
[08:22:41 PM] Scripting runtime error '429' in SetAccess: (line 35; column 3)
[08:22:41 PM] ActiveX component can't create object
[08:22:41 PM] Offending line: >>

and this is line number 35
usage = StringFormat("Proper usage: {0}{1}", BotVars.Trigger, .Name)

i use programmers notepad 2 to see where the line numbers are at but it does not have column numbers for itperhaps you can tell me what i need to change to get it to stop

#8 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted June 17, 2010 - 03:53 AM

Is this error on a command or on script reload? I don't get this error.

#9 User is offline   Gratis Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: August-15 10

Posted August 15, 2010 - 12:17 PM

[02:16:30 PM] Successfully created command (addalias)
[02:16:30 PM] Error: Error (#-1072897500) on Line 0: The node is neither valid nor invalid because no DTD/Schema declaration was found.
in clsCommandDocObjStatic.ValidateXMLFromStrings().
[02:16:30 PM] Successfully created command (remalias)
[02:16:30 PM] Error: Error (#-1072897500) on Line 0: The node is neither valid nor invalid because no DTD/Schema declaration was found.
in clsCommandDocObjStatic.ValidateXMLFromStrings().
[02:16:30 PM] Successfully created command (setaccess)
[02:16:30 PM] Error: Error (#-1072897500) on Line 0: The node is neither valid nor invalid because no DTD/Schema declaration was found.
in clsCommandDocObjStatic.ValidateXMLFromStrings().
[02:16:30 PM] Successfully created command (delaccess)
[02:16:30 PM] Error: Error (#-1072897500) on Line 0: The node is neither valid nor invalid because no DTD/Schema declaration was found.
in clsCommandDocObjStatic.ValidateXMLFromStrings().
[02:16:30 PM] Successfully created command (access)
[02:16:30 PM] Error: Error (#-1072897500) on Line 0: The node is neither valid nor invalid because no DTD/Schema declaration was found.
in clsCommandDocObjStatic.ValidateXMLFromStrings().


What's going on?

#10 User is offline   AwaKening Icon

  • how do ya like me now
  • Icon
  • Group: Scripting Moderators
  • Posts: 977
  • Joined: August-20 09

Posted August 15, 2010 - 04:40 PM

I tried loading it up on a new bot profile with 0 errors.

Quote

[10:32:15 AM] Scripts loaded.
[10:32:16 AM] Successfully created command (addalias)
[10:32:16 AM] Successfully created command (remalias)
[10:32:16 AM] Successfully created command (setaccess)
[10:32:16 AM] Successfully created command (delaccess)
[10:32:16 AM] Successfully created command (access)
/setaccess say 90
[10:32:40 AM] Set Access: SAY <90>
/access say
[10:32:47 AM] SAY: Access <90> or Flags <T>
/delaccess say
[10:32:57 AM] SAY has been disabled.
/access say
[10:33:04 AM] SAY is Disabled
/addalias shout caps
[10:33:18 AM] New shout Alias: caps


Make sure you're using the current version of Stealth. I'm also wondering if you might have somehow corrupted your commands.xml file. I believe I've had this happen to me before after deleting script commands and then reloading it. I had to open commands.xml and manually remove the entries as well. Either way, it's not anything wrong with this script.

#11 User is offline   Novynn Icon

  • Silver Member
  • PipPipPipPipPip
  • Group: Senior Members
  • Posts: 873
  • Joined: October-07 09

Posted August 16, 2010 - 03:41 AM

It's a common error to do with the XML.

http://www.stealthbot.net/wiki/Errors

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