summaryrefslogtreecommitdiff
path: root/Blatech.php
diff options
context:
space:
mode:
Diffstat (limited to 'Blatech.php')
-rw-r--r--Blatech.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/Blatech.php b/Blatech.php
index c1b477e..701f2c2 100644
--- a/Blatech.php
+++ b/Blatech.php
@@ -32,6 +32,9 @@ class Blatech
*/
public function runCommand($message, $args)
{
+ // Sanitise arguments
+ $args = static::sanitiseArgs($args);
+ var_dump($args);
$nick = ltrim(explode('!', $message[0])[0],":");
$channel = $message[2];
@@ -59,4 +62,9 @@ class Blatech
}
}
}
+
+ private static function sanitiseArgs($string)
+ {
+ return preg_replace('/[^a-z\d_+:@#~!?\\/"\'£$%^*(){}\-\][=,.< >]/iu', '', $string);
+ }
}