diff --git a/lib/commands/parser.pm b/lib/commands/parser.pm index 2bb513d5c7ecdfe2932a78d21584b81c8e37b384..082d795f3a3990de01fe00f357aea8deb5f8f77b 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;