IPB

Welcome Guest ( Log In | Register )

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 
Reply to this topicStart new topic
> Command OO Project, Explination, benifits.
Snap
post May 14 2009, 06:23 PM
Post #1


The following post is supplementry information
*****

Group: Global Moderators
Posts: 2,922
Joined: 29-January 06
From: Eugene Oregon
Member No.: 31



The Commands OO Project For StealthBot 2.7
(OO = Object Oriented)


First, benefits:

For the General StealthBot User
  • Simplifies making custom names for commands.
  • Simplifies custom access for plugin-commands.
  • Allows you to modify required access/flags, command name, enabled/disabled on the fly.
  • Unifys all commands within StealthBot. - WhisperCmds for example, would apply to all plugin' commands.
  • Command lists could be easily generated.
  • Handles duplicate commands from multiple plugins.
  • Implements itself into SB 2.7's !help <command> feature.
For the StealthBot Coder
  • Script/Script Plugin/Plugin communication. Simplifies the ability for one plugin to execute a command in another.
  • Creates a single ProcessCommand sub - which:
    • Runs for all events, UserTalk, Whisper, Enter, "UEnter" aka Double Slash // commands.
    • Checks the access for you - before it runs the callback.
    • Separates the Command and Args for you.
  • Easy on-the-fly command manipulation - change the access/flags - rename them. etc.
  • Handles putting commands in 2.7's Menu for you.

Example usage:
(This is very much subject to change)

CODE
Private COO

Sub Event_Load()
   Set COO = Scripts("CommandOO").Manager
   COO.RegisterCommand "say"
   COO.say.Access = 80
End Sub

Sub Command(Cmd, Args, Username, Ping)
   Select Case Cmd
   Case "say"
      Addq Args
   End Select
End Sub


I have not actually started this project - it's purely in concept.
- I would really like to see this in 2.7 though.

Questions, Suggestions, Ideas, Opinions, Volunteers. Post away.

- If you are wanting to volunteer I'll be using 52's SVN for this project.
~ I want to have a clear example script - of how a script would look using the COO("COO" name pending tongue.gif) script before putting down much code.


--------------------
~Life is all busy and stuff right now. - Car accident, lots of dr. appointments... Other stuff too. I still <3 StealthBot.net - - I'll be around.
Thinking about PMing me? Post it instead! CCX Forums | SnapNJacks Trivia Forums
IPB Image
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post May 14 2009, 06:45 PM
Post #2


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



Please please please if you release this to put in everyones scripts, let someone (me, 52, Pyro) fix up the casing and other things.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Snap
post May 14 2009, 07:21 PM
Post #3


The following post is supplementry information
*****

Group: Global Moderators
Posts: 2,922
Joined: 29-January 06
From: Eugene Oregon
Member No.: 31



Wish confusedly granted!


--------------------
~Life is all busy and stuff right now. - Car accident, lots of dr. appointments... Other stuff too. I still <3 StealthBot.net - - I'll be around.
Thinking about PMing me? Post it instead! CCX Forums | SnapNJacks Trivia Forums
IPB Image
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Jack
post May 14 2009, 07:40 PM
Post #4


Ultimate spammer.
********

Group: Sr. Members
Posts: 5,593
Joined: 28-January 06
Member No.: 28



QUOTE(Snap @ May 14 2009, 08:21 PM) *

Wish confusedly granted!

You just have a weird... and slightly annoying way to name things. It doesn't affect the code at all but it still bugs me when I see a lot of it in a row.


--------------------
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
PhiX
post May 15 2009, 07:12 AM
Post #5


Notice the ownage.
********

Group: Global Moderators
Posts: 10,862
Joined: 15-January 07
From: GeRmAnY (GMT +1:00)
Member No.: 16,204



Are the commands saved in commands.xml? Wasn't CreateCommand() supposed to do this or something similar?


--------------------
PhiX
--------------------
I do not provide support via PM or IM, please use the forums.
SBs Help Tool - Please only double click my name if I told you to do so.
--------------------

Whore of Clan BoT

JBLS: phix.no-ip.org (click for stats) IPB Image
--------------------
QUOTE(Clan BoT)
[20:33:50.063] <[email protected]> I'm not showing any respect to a bunch of script kiddie faggots.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Ribose
post May 15 2009, 12:27 PM
Post #6


So, it's all about fame, huh?
*****

Group: Global Moderators
Posts: 2,950
Joined: 13-February 06
From: Connecticut, USA. (GMT -5:00)
Member No.: 74



Yes, IsCommand() was supposed to accomplish something like this. But Eric never finished it. sad.gif

Also, I agree with this idea. Good luck.


--------------------
~Ribose
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Snap
post May 15 2009, 03:39 PM
Post #7


The following post is supplementry information
*****

Group: Global Moderators
Posts: 2,922
Joined: 29-January 06
From: Eugene Oregon
Member No.: 31



Yea, It will use Commands.XML, hopefully with IsCommand I can avoid direct-XML communication - and just continue where Eric left off.
All of this really should be internal. - But, maybe once I/we get a clean tested script, it could be slipped in internally. & Reap the benefits of optional arguments and minor process improvement. (As previously discussed).


--------------------
~Life is all busy and stuff right now. - Car accident, lots of dr. appointments... Other stuff too. I still <3 StealthBot.net - - I'll be around.
Thinking about PMing me? Post it instead! CCX Forums | SnapNJacks Trivia Forums
IPB Image
IPB Image
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
AbsoluteMSTR
post May 20 2009, 03:23 PM
Post #8


Full Member
***

Group: Beta Testers
Posts: 125
Joined: 5-August 07
Member No.: 27,229



I have something going like this on my system. Works fine and done a little bit differently. I would have to rewrite my code to be used by StealthBot since i use a MYSQL backend


--------------------
I offer hosting for ghost hosting on a dedicated server. PM for info
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd July 2019 - 11:33 AM
Skin by Andrea
Website Legal Information | Hosted by LunarPages