Friday, August 23, 2013

PHP shoutbox command with more than 1 parameter

PHP shoutbox command with more than 1 parameter

I am working on a shoutbox in PHP and Javascript. And I'm currently
working on commands.
I've made a ban system where it just works like this;
/ban *username*
But I'd like to make it more unique, and add duration of ban + reason. So
a command like this;
/tempban *username* *time* *reason*
But my problem is, I don't know how to get those 3 parameters, which I was
hoping you could help me.
Here is my preg_match for ban, maybe that will help.
if (preg_match("#^(/ban\s+?)#i", $message, $matches) &&
$this->can_do_admin())

No comments:

Post a Comment