Go with what greeny gave you.

Anyway, wanted to let you know where you got mixed up.


($left($1-,1) == $char33) and && ($right($left($1-,1) ison #)))

  • $char33 should be $chr(33), but in this case you can even specify the exclamation mark directly.

    if $left($1,1) == !
  • $right($left($1-,1) ison #

    Here's where you got mixed up.

    You were looking for: $right($1,-1) or $mid($1,2)

    * $right(string,N) normally returns the N characters of string, starting from the right. Though if we use a negative value, $right will work in a different way.

    * $right(string,-N) returns the string, with N characters cut off from the beginning.

    $right(!filedumphere,-1) = filedumphere
    $right(!filedumphere,-2) = iledumphere
    $right(!filedumphere,-3) = ledumphere
    ...

    * $mid(string,S,N) returns the string, starting at point S, N characters long.

    $mid(!filedumphere,1,5) = !file
    $mid(!filedumphere,6,4) = dump
    $mid(!filedumphere,2) = filedumphere (no N parameter was given, so $mid will take any text following the S starting point)

  • We end with: if ($left($1,1) == !) && ($right($1,-1) ison #) { do things }

  • Note that I specify $1 and not $1-, because a nickname cannot consist of spaces, we only need to reference the first space delimited token, which will be the nickname preceeded by an exclamation mark.

Greets