From 351f6df09fb7a96776e61c3bc94309051a58eedb Mon Sep 17 00:00:00 2001
From: Alexandre Morignot <erdnaxeli@gmail.com>
Date: Sun, 10 Nov 2013 23:21:28 +0100
Subject: [PATCH] Debug

---
 lib/commands/parser.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/commands/parser.pm b/lib/commands/parser.pm
index 2bb513d..082d795 100644
--- a/lib/commands/parser.pm
+++ b/lib/commands/parser.pm
@@ -31,7 +31,7 @@ sub setConf {
 
     $commands::list::irc = $ircNew;
     $commands::addUser::irc = $ircNew;
-    $commands::edit::irc = $irc;
+    $commands::edit::irc = $ircNew;
 
     $nick = $nickNew;
     $irc = $ircNew;
@@ -58,7 +58,7 @@ sub exec {
             $irc->yield(privmsg => $chan => "C'est enregistré. N'oubliez pas, conduire ou choisir, il faut boire !");
         }
 	}
-    elsif ($msg =~ /^Sam(?:,|:) +ajoute(?: +à +la +(\d+)) +: +([a-z]*) += +(.*)/) {
+    elsif ($msg =~ /^Sam(?:,|:) +ajoute(?: +à +la +(\d+))? +: +([a-z]*) += +(.*)/) {
         my $id = $1 or $lastID->{$chan->[0]};
         my $command = $2;
         my $arg = $3;
-- 
GitLab