[vhffs-dev] [svn] commit: r202 - /trunk/vhffs-irc/modobot.pl |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Author: florent
Date: Sat May 27 18:14:19 2006
New Revision: 202
Log:
Very important bug fixed : each time an object was accepted/refused, 2 new connexions to the pgsql where made and never closed. This led to a DOS-like after some times.
Modified:
trunk/vhffs-irc/modobot.pl
Modified: trunk/vhffs-irc/modobot.pl
==============================================================================
--- trunk/vhffs-irc/modobot.pl (original)
+++ trunk/vhffs-irc/modobot.pl Sat May 27 18:14:19 2006
@@ -333,11 +333,9 @@
my $status; # 0 = refuse , 1 = accept
my $object;
my $raison;
- my $vhffs;
$oid = shift;
$status = shift;
- $vhffs = init Vhffs::Main;
$object = new Vhffs::Object( $vhffs , $oid , '51' );
@@ -446,10 +444,7 @@
{
my $user = new Vhffs::User( $vhffs, shift, 401 );
my $ret;
- eval {
- $ret = $user->fetch;
- };
- return -1 if ($@);
+ $ret = $user->fetch;
if ( $ret >= 0 )
{
if( ($user->is_moderator == 1 ) || ( $user->is_admin ) == 1 )