forked from kimonberlin/salebot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
salebot2.pl
executable file
·43 lines (35 loc) · 862 Bytes
/
salebot2.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/perl
#
# salebot2 - anti-vandal bot
#
# Author: Kimon Berlin, http://fr.wikipedia.org/wiki/Utilisateur:Gribeco
#
# Uses the POE::Component::IRC library:
# http://cpan.uwinnipeg.ca/htdocs/POE-Component-IRC/POE/Component/IRC/State.html
use warnings;
use strict;
use utf8; # The source code itself has utf8 chars
use lib "./lib";
use POE;
use Logging;
use ConfigFile;
use RCParser;
use RCHandler;
use User;
use Edit;
use Loc;
use IRC;
use Stat;
print localtime(time) . ": starting, pid=$$\n";
config_init();
loc_init($config->{lexicon_file}, $config->{LANG});
die "USER_NAMESPACE not defined" unless $USER_NAMESPACE;
log_init($config->{log_conf_file}, $config->{log_dir}, $config->{log_file});
editor_init();
#sql_init();
rc_init();
stat_init();
irc_init(); # Starts POE sessions
# Run the bot until it is done.
$poe_kernel->run();
exit 0;