source: trunk/plugins/admin_help.tcl @ 1143

Revision 907, 6.4 KB checked in by james, 4 years ago (diff)

new plugin enable/disable bits

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# bMotion admin help
2#
3#
4# $Id$
5#
6
7###############################################################################
8# This is a bMotion plugin
9# Copyright (C) James Michael Seward 2000-2002
10#
11# This program is covered by the GPL, please refer the to LICENCE file in the
12# distribution; further information can be found in the headers of the scripts
13# in the modules directory.
14###############################################################################
15
16#                                                                                                name           regexp                                                   flags   callback
17bMotion_plugin_add_management "help" "^help"             t                       "bMotion_plugin_management_help" "any"
18
19#################################################################################################################################
20# Declare plugin functions
21
22proc bMotion_plugin_management_help { handle { args "" } } {
23        global bMotion_plugins_management
24
25        if {$args == ""} {
26                bMotion_putadmin "You can run bMotion commands from DCC with .bmotion COMMAND,"
27                bMotion_putadmin "      from a channel with .bmotion BOTNICK COMMAND, and from a"
28                bMotion_putadmin "      query with the bot with bmotion COMMAND."
29                bMotion_putadmin "Loaded bMotion Admin Commands:"
30                set line ""
31                set s [array startsearch bMotion_plugins_management]
32                while {[set key [array nextelement bMotion_plugins_management $s]] != ""} {
33                        if {$key == "dummy"} {
34                                continue
35                        }
36                        append line "$key "
37                        if {[string length $line] > 50} {
38                                bMotion_putadmin "      $line"
39                                set line ""
40                        }
41                }
42                if {$line != ""} {
43                        bMotion_putadmin "      $line"
44                }
45                array donesearch bMotion_plugins_management $s
46
47                bMotion_putadmin "Help is available for some plugins; run .bmotion help COMMAND"
48                bMotion_putadmin "      for more information."
49                return 0
50        } else {
51                switch $args {
52                        "flood" {
53                                bMotion_putadmin "Manage the flood protection system:"
54                                bMotion_putadmin "      .bmotion flood status"
55                                bMotion_putadmin "              show all tracked flood scores"
56                                bMotion_putadmin "      .bmotion flood show <nick>"
57                                bMotion_putadmin "              show score for <nick> (case sensitive)"
58                                bMotion_putadmin "      .bmotion flood set <nick> <value>"
59                                bMotion_putadmin "              set score for <nick> to <value>"
60                        }
61                        "status" {
62                                bMotion_putadmin "Show a summary of bMotion's status."
63                                bMotion_putadmin "      .bmotion status channels"
64                                bMotion_putadmin "              include the active channels in the status output"
65                        }
66                        "global" {
67                                bMotion_putadmin "Switch bMotion on and off everywhere:"
68                                bMotion_putadmin "      .bmotion global off"
69                                bMotion_putadmin "              disable bMotion"
70                                bMotion_putadmin "      .bmotion global on"
71                                bMotion_putadmin "              enable bMotion"
72                        }
73                        "lang" {
74                                bMotion_putadmin "Switch languages:"
75                                bMotion_putadmin "      .bmotion lang"
76                                bMotion_putadmin "              show available and current language"
77                                bMotion_putadmin "      .bmotion lang add <lang>"
78                                bMotion_putadmin "              add a language"
79                                bMotion_putadmin "      .bmotion lang remove <lang>"
80                                bMotion_putadmin "              unload a language"
81                                bMotion_putadmin "      .bmotion lang use <lang>"
82                                bMotion_putadmin "              switch active language"
83                        }
84                        "plugin" {
85                                bMotion_putadmin "Manage plugins:"
86                                bMotion_putadmin "      .bmotion plugin list \[<search terms>\]"
87                                bMotion_putadmin "              List all plugins. If optional search terms are given,"
88                                bMotion_putadmin "              list is filtered. Can potentially generate lots of output"
89                                bMotion_putadmin "      .bmotion plugin remove <type> <name>"
90                                bMotion_putadmin "              Unload a plugin. (To reload, rehash)."
91                                bMotion_putadmin "      .bmotion plugin enable <type> <name> \[<channel>\]"
92                                bMotion_putadmin "              Enable a plugin. Currently only output type supports this."
93                                bMotion_putadmin "      Optionally only enable on a particular channel."
94                                bMotion_putadmin "      .bmotion plugin disable <type> <name> \[<channel>\]"
95                                bMotion_putadmin "              Disable a plugin. Currently only output type supports this."
96                                bMotion_putadmin "      Optionally only disable on a particular channel. Use 'all' to"
97                                bMotion_putadmin "      remove all channels from the list."
98                                bMotion_putadmin "      .bmotion plugin info <type> <name>"
99                                bMotion_putadmin "              Display internal information for plugin. This won't mean much"
100                                bMotion_putadmin "              unless you know how bMotion plugins are defined."
101                        }
102                        "reload" {
103                                bMotion_putadmin "Reload bMotion without rehashing bot. Will be quicker than rehashing"
104                                bMotion_putadmin "but will generate ALERTs which you should ignore."
105                        }
106                        "rehash" {
107                                bMotion_putadmin "Safely rehash the bot. bMotion will check to make sure there are no"
108                                bMotion_putadmin "problems with loading the script and then rehash."
109                        }
110                        "friends" {
111                                bMotion_putadmin "Lists bMotion's friendships"
112                                bMotion_putadmin "      .bmotion friends show <nick>"
113                                bMotion_putadmin "              Shows the rating for the user"
114                                bMotion_putadmin "      .bmotion friends show -all"
115                                bMotion_putadmin "              Shows A LOT OF OUTPUT!!1"
116                                bMotion_putadmin "      .bmotion friends set <nick> <value>"
117                                bMotion_putadmin "              Sets user's friendship rating"
118                                bMotion_putadmin "Friendships are rated 0-100% with 50% being neutral. All users start on 50%."
119                                bMotion_putadmin "Actions against the bot affect friendships; friendships drift back to 40 or 60% (depending"
120                                bMotion_putadmin "on if they are lower or higher than those limits)."
121                        }
122                        "settings" {
123                                bMotion_putadmin "Handles internal bMotion settings (not configuration)"
124                                bMotion_putadmin "      .bmotion settings list"
125                                bMotion_putadmin "              List all settings stored by bMotion. This can be a lot of output."
126                                bMotion_putadmin "      .bmotion settings clear"
127                                bMotion_putadmin "              Clears the settings array."
128                        }
129                        "queue" {
130                                bMotion_putadmin "Interact with the bMotion queue"
131                                bMotion_putadmin "      .bmotion queue"
132                                bMotion_putadmin "              List the contents of bMotion's output queue"
133                                bMotion_putadmin "      .bmotion queue flush"
134                                bMotion_putadmin "              Clear the bMotion output queue"
135                        }
136                        "parse" {
137                                bMotion_putadmin "Make bMotion parse some text as a test"
138                                bMotion_putadmin "      .bmotion parse \[<channel>\] <text>"
139                                bMotion_putadmin "              If this command is issued from a query or the partyline,"
140                                bMotion_putadmin "              you must give the channel to send output to. Requests from"
141                                bMotion_putadmin "              a query or the partyline have '\[parse\]' prefixed."
142                        }
143                        default {
144                        #no pre-defined help, see if there's a callback for it
145                                set callback [bMotion_plugin_find_management_help $args]
146                                if {$callback != ""} {
147                                        set result [$callback]
148                                } else {
149                                        bMotion_putadmin "I seem to have misplaced my help for that command."
150                                }
151                        }
152                }
153                return 0
154        }
155}
Note: See TracBrowser for help on using the repository browser.