Added check for number of args
Split string by ":".
Added check for number of ip groups in the checked IPv6 address.
Added return in the previous if statement.
Updated LogMsgs for clearer messages.
Added regex check for each group in the IPv6 address.
Removed unused $stat variable.
Added comments for better clarity of the code.