The StealthBot Plugin System by Swent [ CHANGELOG ] [ ver .98 (BETA - UNRELEASED)] [MODIFICATIONS] *Modified the Plugin System to make it compatiable with StealthBot v2.7 -You can now use the FirstRun, MessageSent, Shutdown, LoggedOff, and the 9 new clan-related events in your plugins (see SSC) -Added the new Event arguements: Banned (UserJoins) and StatUpdate (UserInChannel) - see the SSC ~These will be automatically added to any UserJoins/UserInChannel events found missing them (Thanks Draco) -For compatibility reasons there is now a version check. You must have SB v2.7 or higher to use the Plugin System. *Modified the external .plugins response with an enabled/disabled indicator -Prefixes of disabled plugins are inside parenthesis *The phelp command can now be used externally (it will only display commands): .phelp *Modified /plugins and /updates outputs -- now extremely sexy thanks to the new capabilites of AddChat (Thanks Jack) *Made the prefix validity check more thorough (now checks for repeats, invalid chars, and disallowed prefixes) *Revamped the settings system. Plugin settings are now located in settings.ini -Removed the /lset command as it is no longer neccessary -Changes to settings.ini now take effect after immediately after saving the file (You do not need to type "/lset" or hit Reload Script) *Opened up the updates, getplugin and delplugin commands to external usage by Bot Owner only (Thanks RoNiN) -In the external updates output, only prefixes are displayed. Key: New, [Updated], (Installed) *Increased plugin load efficiency -- load time should be noticeably decreased (Thanks ZergMasterI) *Replaced all Plugin System usaged of vbBlue with vbLightBlue, which is much easier on the eyes *Plugin and Plugin System update checks now only take place once after connection *Improved error handling during plugin load. Loading errors will now be more descriptive (Thanks ZergMaster) -Plugins with errors on load will be disabled automatically (to avoid the constant error messages on every event) *Improved plugin error handling while plugins are being loaded (Thanks ZergMasterI) -Errors recieved during plugin loading now show correct offending lines and line/column numbers, and the erroring plugin will be blocked ~"Blocked" is essentially the same as disabled -- except it's temporary. The blocked status disappears on reload (if error is fixed) -All other errors recieved will show correct line and column numbers as well if debug mode is on [NEW FEATURES] *Added multiple command messages. As in StealthBot, you can now type: ".crs off; ss on; pelt me" etc. -This will work for Plugin System commands as well as all of your plugins' commands (No StealthBot commands) -This option can be disabled by setting the new "multipleCmdMsgs" plugin system setting to False *Added the option to back up plugins during updates by adding the "backup" setting for all plugins -Set to False by default. If changed to True, that plugin will be backed up when you download updates. -Alternatively, you can set the global "backup" PS setting to True, and it will apply to all plugins. -When True, the global "backup" PS setting overrides the individual "backup" plugin settings *Added settings that allow you to set access requirements for external Plugin System commands: -"prefix_cmd_access" (default 100), "plugins_cmd_access" (default 20), and "phelp_cmd_access" (default 20) *Added double-slash Plugin System commands. Inside bot type "//command" to have the response displayed publicly. -This will work for all Plugin System commands except /updates and /psnews *Added Plugin System help in /phelp command -- displays command names and explanations (Thanks raylu) *Added support for colons on the 4th phelp line (important notes) -- use "\c" for colon (Thanks ZergMasterI) *Added some helpful links at the completion of the installation (Thanks Snap) *Added StealthBot menu support for the Plugin System -In the new Plugins menu you'll find menus for each plugin -In these menus you can change enabled, nvn, and backup statuses, as well items for help and opening the plugin file -There is also a main help menu which provides links to revelant forums/threads. -5 subs/functions have been added to help you add and work with menu items for your plugin. See the SSC. -You can disable plugin menu creation by setting the menusDisabled PS setting to True (Thanks ZergMasterI) *Implemented #define's Plugin Creator. Can be executed from the Plugin System menu (Thanks #define) *Implemented plugin statistics system by Snap. See http://snapnjacks.com/stats.php *Added the /exec command to the Plugin System due to its common usage. Only works from inside the bot. [NEW COMMANDS] /delplugin -Deletes the specified plugin from your plugins folder. A backup is created automatically. -To delete a plugin forever (no backup), add a parameter of "1". Example: /delplugin crs 1 /psnews -Displays Plugin System news /pedit -Opens the specified plugin for editing. This command has a few alternate functions: ~You can use a filename (ex: pmPeltMe.plug) in place of , as long as it's in the plugins folder ~You can open your settings.ini file by omitting the parameter ~You can open your plugins folder by using "plugins" for (Thanks Jack) /exec -Executes a line of VBScript code. Can only be used from inside the bot with "/" as the trigger. [BUG FIXES] *Fixed a bug in the debug command...lol (Thanks Jack) *Fixed minor error with the dsp sub -- it no longer attempts to split messages that have no spaces (Thanks Jack) *Fixed a problem with the plugin timer error handler -- sometimes it displayed the wrong file path *Fixed an error with the LoadSettings sub when a setting value contained "=" (Thanks Jack) *Fixed a minor bug with the .prefix on/off command (Thanks ZergMasterI) *Fixed a minor problem with the error handler related to "/prefix on" commands *Fixed a major changing variable issue (due to VBS's suckiness) by adding the Echo function (Thanks ZergMasterI) *Fixed a problem with the plugin converter in the case of a file already being partially converted (some/all events already prefixed) -Existing prepends found on event lines will be replaced with the correct prefix or ignored if it's already correct *Fixed a plugin converter error for users with certain language settings (Thanks fagju) [ ver .97 ] *Fixed the Type Mismatch: 'CDbl' error that some users were experiencing *Moved the plugin script to this include file. -Coding can be done in your now empty (almost) script.txt file -- it will be loaded like a plugin (Thanks Jack) *Fixed problem with the Warn Script plugin not displaying on /updates and failing to auto-update (Thanks Sanity) *Fixed the Type mismatch: '[string: ""]' error some users got when auto-connect was on (Thanks ZergMasterI) *Added the ConvertToPlugin sub -Scripts in regular script.txt form can now be automatically converted to plugin form and loaded -Simply place the regular script files in your plugins folder, and you'll get a pop-up asking if you want to convert *Added the "autoConvertToPlugin" plugin script setting. Set to False if you don't want the Plugin Converter pop-ups *Changed the /plist command to /plugins, since /plist is already a StealthBot command. *The plugins command can now be used externally. It requires 100 access. -When used externally only the prefixes of loaded plugins are displayed *Incorporated the SplitQ sub into the dsp sub. It can now display (chat/whisper/emote/addchat) messages of any length. -The incorporated SplitQ code was also improved: Messages display much more quickly, still w/o flooding out the bot ( update .973 ) *Fixed error with /getplugin -- plugins with additional files couldn't be downloaded ( update .972 ) *Fixed a potential problem by slightly modifying the LoadPlugins sub *Fixed an error with the .prefix on command when a non-existant prefix was entered (Thanks Three_Stooges) *Fixed issues with enabling and using plugins that were disabled when they were loaded ( update .971 ) *Added some explanatory AddChats for when users can't connect to the Plugins Server (see the CannotConnect sub) *Fixed a problem with the Plugin Converter sub (it wasn't converting calls to Event subs) *Fixed problem with timer and setting case sensitivity (Thanks Jack, Draco) -You can now use any case for settings and timer prefixes/names anywhere in your code and they'll still work *Improved the Plugin System installation process *Fixed an error after a /prefix on command when that plugin had no load event (Thanks hoppinator) *Prefixes no longer underlined in /plugins output -- the text modifers caused problems for some users (Thanks Hdx) [ ver .96 ] *Added the Plugin Help System (added the SetPluginHelp sub and an in bot command: /phelp) -To have help provided for your plugin, add these four lines directly underneath your version line: '&Plugin Name:Author '&command1:command2:command3:etc... '&topicNumber '&important note 1:important note 2:etc... NOTE: The third and fourth lines (topic number and important notes) are optional - they can be left blank -Having these help lines is optional! If your plugin doesn't have them, it won't cause problems. *Increased the speed of the /plist and /updates command outputs *Added function prefixExists and OnOff, added sub PluginScriptCmds (just moved code from PressedEnter) *Removed double of the loadExtensions plugin script setting from pluginsettings.ini *Added the "enabled" plugin script setting. Set it to False and all plugins are disabled. *Removed the AddChats during update checks (I guess they were bugging people >_>) *Added the "updateCheck" plugin script setting. Set it to False to disable automatic update checks. *Added new option for the /prefix command: /ps -"/ps off" will disable all plugins. -"/ps on" will not enable ALL plugins. It merely restores each plugin to it's status prior to executing the "/ps off" command. *Added new option for the /nvn command: /nvn ps -Same idea as the /ps on/off option above. ( update .961 ) *Added "www" after "http://" in PS_UPDATE_PATH (plugins weren't downloading properly for some users) [ ver .95 ] *Created vbBrown, vbGrey, and vbPink in the SetFontCodes sub. (Thanks Draco for helping me pick a good pink) *Events in plugins that are commented out will no longer be executed *Script.txt backups are now stored in the ScriptBackups folder located in the StealthBot folder. *Greatly reduced plugin load time (increased efficiency of the LoadPlugins sub). *Removed the AddScript, DownloadFile, byteArr2Str, Include, and internalgettimerenabled subs/functions (all unnecessary) *Improved efficiency by adding the SetPluginEvents sub and removing the EventExists function. *Changed the /getscript command to /getplugin *Added command to add/remove extensions from the loadedExtensions plugin script setting. -Command Syntax: /ext ( update .951 ) *Fixed serious problem with in-bot command interference (/greet on/off, /koy on/off, etc., weren't working) *Fixed error when users types a space (or spaces) inside the bot. *Fixed problem with New Version Notification still popping up when disabled (Thanks ZergMasterI) [ ver .94 ] *Added italics and created vbOrange in SetFontCodes *Added the option to disable new version notification for specified plugins *Added updates check every half hour while bot is online *Changed back to the original server: http://plugins.stealthbot.net *Plugins will now be loaded from both .plug and .txt files in the plugins folder. -Additional file types to be loaded can be specified in pluginsettings.ini [ ver .93 ] (the big re-write) *Reduced redundant code by adding the ExecuteEvent sub *Replaced the setsub, setsubstat, and getsubstat functions with the new eventExists function. *Modified the changeEnabled sub and renamed it pluginStatusCmd *Removed the callsub, isNewVersion, reloadscript subs/functions (all unnecessary) *Cleaned up the code overall (added appropriate capitalization, renamed variables, added comments, removed unnecessary code) ( update .935 by Jack ) *Fixed typo "Pluginsetings" *New plugin server: http://berzerkerweb.com/ ( update .931 ) *Fixed problem with bold/underlined command output by adding the SetFontCodes sub. [ ver .92 ] *Fixed type mismatch error in the scriptTimer sub [ ver .91 ] *Fixed error with .getscript command (problem in AddScript sub) *Fixed the .lset command (it works now) [ ver .90 ] *Added code from update plugin *Added automatic plugin updates (see autoUpdatePlugins sub) [ ver .89 ] *script now reads from http://users.domaindlx.com/plugs/