Game Configuration & Plugins

Posted by Eejit on Sun 11 Aug 2002 08:47 AM — 2 posts, 15,077 views.

#0
There should be a listing in game configuration for plugins that shows:
number of plugins
plugins that are loaded
plugin version

or something to that effect.
Australia Forum Administrator #1
I have written a small plugin to do that. However you can get most of it from the "Plugins" dialog box (all except the version).

This plugin is available from:


http://www.mushclient.com/plugins/plugin_summary.xml


Example output:


plugins
Random_Socials v1.1 - Displays a random social from time to time
Reverse_Speedwalk v2 - Takes a speedwalk string and sends it, reversed
Plugin_list v1 - Lists installed plugins
Plugin_Summary v1 - Summarizes installed plugins
4 plugin(s)






<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<muclient>
<plugin name="Plugin_Summary"
  author="Nick Gammon"
  language="vbscript"
  id = "402d5b187f593a46bc68beb9"
  purpose = "Summarizes installed plugins"
  date_written = "2002-08-12 07:48"
  version = "1.0"
  >
<description trim="y">
<![CDATA[
Type "plugins" to summarize installed plugins.
]]>
</description>

</plugin>

<!--  =============================================

Alias:   plugins
Script:  OnPluginSummary
Purpose: Lists plugins

 =============================================  -->
      
<aliases>
   <alias
    script="OnPluginSummary"
    match="plugins"
    enabled="y"
   >
   </alias>
 </aliases>

<script>
<![CDATA[
sub OnPluginSummary (sName, sLine, wildcards)
dim count, version

  count = 0
  
  for each x in world.GetPluginList
  
   count = count + 1
   
   world.tell world.getplugininfo (x, 1)  ' name
   version = world.getplugininfo (x, 19)
   if version <> 0 then
      world.tell " v" & version
   end if
   world.note " - " & world.getplugininfo (x, 8) ' purpose
  next

 world.note count & " plugin(s)"
  
 end sub
            
]]>            
 </script>

<!--  =============================================

Alias:   plugins:help
Script:  OnHelp
Purpose: Shows plugin help

 =============================================  -->
 
<aliases>
   <alias
    script="OnHelp"
    match="plugins:help"
    enabled="y"
   >
   </alias>
 </aliases>

<script>
<![CDATA[
 sub OnHelp (sName, sLine, wildcards)
   world.note world.getplugininfo (world.getpluginid, 3)
 end sub
]]>            
 </script> 


</muclient>