slight code edit
on *:TEXT:*:#: {
if (! isin $1) {
%active.chan = $replace($chan,$chr(291),h) $+ cmd
%active2.chan = %active.chan $+ .hsh
}
if ($1 == !listcmds) {
if ($hget(%active.chan,0).item == 0) { msg $chan Sorry $nick $+ , no commands stored in list }
if ($hget(%active.chan,0).item >= 1) {
var %listcmds.inc = 1
msg $nick Listing Commands...
while (%listcmds.inc <= $hget(%active.chan,0).item) {
msg $nick $hget(%active.chan,%listcmds.inc).item
inc %listcmds.inc
}
}
}
if ($nick isop $chan) {
if ($1 == !Addcmd) && (! == $left($2,+1)) {
if ($2 == $hfind(%active.chan,$2)) { msg $chan $nick you cannot add that command to file it already exist | halt }
else { hadd %active.chan $2 $3-
hsave %active.chan %active.chan $+ .hsh
msg $chan $nick $+ , I added Command ( $+ $2 $+ ) to file.
}
}
if ($1 == !Delcmd) && (! == $left($2,+1)) {
hdel %active.chan $2
hsave %active.chan %active.chan $+ .hsh
}
}
elseif ($nick !isop) { msg $chan You cannot use !addcmd or !Delcmd }
if ($1 == $hget(%active.chan,$1)) {
var %hreplace = $hget(%active.chan,$1)
if (hnick isin %hreplace) && (hchan isin %hreplace) {
msg $chan $replace(%hreplace,hnick,$2,hchan,$chan)
}
elseif (hnick isin %hreplace) {
msg $chan $replace(%hreplace,hnick,$2)
}
elseif (hchan isin %hreplace) {
msg $chan $replace(%hreplace,hchan,$chan)
}
else { msg $chan %hreplace }
}
}
alias cmdlist {
var %hchan = $replace($active,$chr(291),h) $+ cmd
hmake %hchan $?="How many items? 30 is average"
hsave %hchan %hchan $+ .hsh
}