Originally Posted By: Devin
So if anyone could also help out with here, I would like a ~editcom command but I tried and it hasn't worked for me, I figured it would work, but I'm really tired. Also, the easiest way, as someone mentioned, would be to just do a ~addcommod or have it check to see if the word mod is there possibly?

Code:
on $*:text:/^~addcom ~?(\S+)/iS:#:{
  writeini commands.ini commands $regml(1) $$3-
  { msg $chan $nick -> Command $2 has been created. }
}
on $*:text:/^~delcom ~?(\S+)/iS:#:{
  remini commands.ini commands $regml(1)
  { msg $chan $nick -> $2 has been removed from the command database. }
}

on $*:text:/^~(\S+)/:#:{
  if (!%comwait) {
    set -u6 %comwait 1
    if ($readini(commands.ini,n,commands,$regml(1))) msg # $v1
  }
  else { msg $chan $nick -> Command is on cool-down }
}
on $*:text:/^~editcom ~?(\S+)/iS:#:{
  writeini commands.ini commands $regml(1) $$3-
  { msg $chan $nick -> Command $2 has been updated. }
}

You already that in the !* script
Code:
if ($readini(commands.ini,n,commands,$regml(1)))
so
Code:
on $*:text:/^~editcom ~?(\S+)/iS:#:{
if ($readini(commands.ini,n,commands,$regml(1)))  {
  writeini commands.ini commands $regml(1) $$3-
  msg $chan $nick -> Command $2 has been updated.
}
Else msg # sorry! that command is not already there. Consider adding it!
}
}
also you might want to add in some operator checks so randoms don't change all your commands.

Same can be done for !delcom