Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow pattern based searches for built in help

  • Loading branch information...
commit 3008e7beeb963b2561acabeb1830237fc5dbe89b 1 parent 3e9229f
@Ratler authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 ripecheck.tcl
View
9 ripecheck.tcl
@@ -1759,6 +1759,7 @@ namespace eval ::stderreu {
proc help { hand idx arg } {
set myarg [join $arg]
+ set found 0
# First we test if arg is all to print eggdrop builtin commands,
# then we call the help proc for each script loaded
if {$myarg == "all"} {
@@ -1770,15 +1771,17 @@ namespace eval ::stderreu {
} else {
foreach key [dict keys $::stderreu::helpfuncs] {
foreach helpf [dict get $::stderreu::helpfuncs $key] {
- if { $helpf == $myarg } {
+ if {[string match -nocase $myarg $helpf]} {
::stderreu::$helpf $idx
- return 1
+ set found 1
}
}
}
}
- *dcc:help $hand $idx $myarg
+ if {$found == 0 || [regexp {\*} $myarg]} {
+ *dcc:help $hand $idx $myarg
+ }
if {[llength [split $arg]] == 0} {
foreach key [dict keys $::stderreu::helpfuncs] {
Please sign in to comment.
Something went wrong with that request. Please try again.