Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Laptop (http://www.linux-archive.org/debian-laptop/)
-   -   Opendchub perl bot (http://www.linux-archive.org/debian-laptop/505483-opendchub-perl-bot.html)

pahnin sd 03-25-2011 12:10 PM

Opendchub perl bot
 
Hi I am running a dc hub server on my debian with opendchub
i want to write a bot which logs ip of users connected
so here is te code I am trying to execute but it couldn't log anything

************


$botname = "Admin";

*sub main()

{*** odch::register_script_name($botname);

}


*sub new_user_connected()

{*** my($user) = @_;

*** my($host) = odch::get_hostname($user);*** my($ip) = odch::get_ip($user);

*** $iplog = ">>/var/log/hubiplog";*** open(PLIK, $iplog);

*** print PLIK $ip;*** print PLIK "
";

*** close PLIK;}


the file /var/log/hubiplog is under group 'odchub' user 'odchub'


All times are GMT. The time now is 02:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.