# Change this binding if you want.
bind pub - !help pub_help
# }------------------------------------------------------------------{
# You shouldnt need to change anything from hereon.
global helpcount
set helpcount 0
proc decr {var} {
return [expr $var -1]
}
proc addhelp {modes usage info} {
global helpmodes helpusage helpinfo helpcount
set helpmodes($helpcount) $modes
set helpusage($helpcount) $usage
set helpinfo($helpcount) $info
set helpcount [incr helpcount]
return 1
}
proc pub_help {nick uhost hand chan args} {
global helpmodes helpusage helpinfo helpcount
set helptotal [decr $helpcount]
if { $helptotal == "-1" } {
putserv "NOTICE $nick :No commands for $chan documented...sorry =("
return 0
}
putserv "NOTICE $nick :\002Commands available to you on $chan\002"
set i 0
while { 1 } {
if { [matchattr $hand $helpmodes($i)] || $helpmodes($i) == "" } {
# Ok, the user has access to this one..display it
putserv "NOTICE $nick :Usage: \002$helpusage($i)\002"
putserv "NOTICE $nick : $helpinfo($i)"
}
# If not, oh well...they wont care.
# Increment the count
set i [incr i]
if { [decr $i] == $helptotal } {
# Yep...we're past due..
break
}
# Otherwise, just let the loop flow.
}
# End the help.
putserv "NOTICE $nick :\002 --- Thats all --- \002"
return 0
}
addhelp "" "!help" "--- My Useful Commands ---"
addhelp "" "\002!google\002 <define:|spell:> <search terms> \002!images\002 <search terms> \002!groups\002 <search terms> \002!local\002 <what> near <where> \002 !QL \002 <General Quotes> \002 !mash \002 <Quotes of mash>"
addhelp "" "\002!print\002 <search term> \002!video\002 <search terms> \002!fight\002 <word(s) one> vs <word(s) two> \002!stat\002 <This is to know about ur stats on Channel>"
addhelp "" "\002!top10\002 <For General Stats of the Channel> \002!ip\002 <Nick/host/IP ---- an easy way to know about the address \002!ip\002 <Nick/host/IP - an easy way to know about the address"
addhelp "" "\002!ip\002 <Nick/host/IP ---- an easy way to know about the address \002 !QL \002 <General Quotes> \002 !mash \002 <Quotes of mash>"
putlog "Global-Hel. v1.00 by BLuEPhYsH Successfully loaded!"