[vhffs-dev] [1577] Updated pacman to first search user by its IRC nick

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1577
Author:   guillaumito
Date:     2010-03-27 00:13:02 +0100 (Sat, 27 Mar 2010)
Log Message:
-----------
Updated pacman to first search user by its IRC nick
and use its name as a failover.
This has not been tested!
Please someone check and test :)

Modified Paths:
--------------
    trunk/vhffs-irc/modobot.pl

Modified: trunk/vhffs-irc/modobot.pl
===================================================================
--- trunk/vhffs-irc/modobot.pl	2010-03-26 23:11:07 UTC (rev 1576)
+++ trunk/vhffs-irc/modobot.pl	2010-03-26 23:13:02 UTC (rev 1577)
@@ -361,7 +361,8 @@
     my ($self, $event)=@_;
     my ($nick, $mynick)=($event->nick, $self->nick);
     my $texte=$event->{args}[0];
-    my $user = Vhffs::User::get_by_username($vhffs, $nick);
+    my $user = Vhffs::User::get_by_ircnick($vhffs, $nick);
+    $user = Vhffs::User::get_by_username($vhffs, $nick) unless(defined $user);
 
     if ($texte =~ m/^${mynick}: accept [0-9]+.*$/)
     {


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/