|
|
| version 1.1.1.1, 2025/02/03 04:22:49 | version 1.3, 2025/02/03 15:38:12 |
|---|---|
| Line 9 | Line 9 |
| # Licensed AGPL-3.0 | # Licensed AGPL-3.0 |
| # | # |
| # $Log$ | # $Log$ |
| # Revision 1.3 2025/02/03 15:38:12 snw | |
| # Begin SQL work | |
| # | |
| # Revision 1.2 2025/02/03 04:28:34 snw | |
| # Fix syntax message | |
| # | |
| # Revision 1.1.1.1 2025/02/03 04:22:49 snw | # Revision 1.1.1.1 2025/02/03 04:22:49 snw |
| # Initial Commit | # Initial Commit |
| # | # |
| Line 19 use Net::OSCAR; | Line 25 use Net::OSCAR; |
| use Getopt::Long; | use Getopt::Long; |
| use Data::Dumper; | use Data::Dumper; |
| use HTML::Strip; | use HTML::Strip; |
| use DBI; | |
| my $idlemax = 1800; | my $idlemax = 1800; |
| my $botsn = ''; | my $botsn = ''; |
| my $botsrv = ''; | my $botsrv = ''; |
| my $botpw = ''; | my $botpw = ''; |
| my $rasurl = ''; | my $rasurl = ''; |
| my $dbhost = ''; | |
| my $dbname = ''; | |
| my $dbusername = ''; | |
| my $dbpw = ''; | |
| my $dbconn = ''; | |
| my $chatroom = ''; | my $chatroom = ''; |
| my $online = 0; | my $online = 0; |
| my $chat_idle_seconds = 0; | my $chat_idle_seconds = 0; |
| Line 38 GetOptions("aimsn=s" => \$botsn, | Line 52 GetOptions("aimsn=s" => \$botsn, |
| "aimhost=s" => \$botsrv, | "aimhost=s" => \$botsrv, |
| "aimpw=s" => \$botpw, | "aimpw=s" => \$botpw, |
| "idlemax=s" => \$idlemax, | "idlemax=s" => \$idlemax, |
| "chatroom=s" => \$chatroom) | "chatroom=s" => \$chatroom, |
| "dbhost=s" => \$dbhost, | |
| "dbname=s" => \$dbname, | |
| "dbusername=s" => \$dbusername, | |
| "dbpw=s" => \$dbpw); | |
| or die("error in command line arguments"); | or die("error in command line arguments"); |
| %signon = ( | %signon = ( |
| Line 48 GetOptions("aimsn=s" => \$botsn, | Line 66 GetOptions("aimsn=s" => \$botsn, |
| ); | ); |
| $oscar = Net::OSCAR->new(); | $oscar = Net::OSCAR->new(); |
| #$room = Net::OSCAR::Connection::Chat; | my $dbh = DBI->connect("DBI:mysql:database=$dbname;host=$dbhost", |
| "$dbusername", "$dbpw", | |
| {'RaiseError' => 1}); | |
| sub get_seen_status { | |
| my($sn) = @_; | |
| } | |
| sub signon_done { | sub signon_done { |
| print "[OK]\n"; | print "[OK]\n"; |
| Line 123 sub chat_im_in { | Line 149 sub chat_im_in { |
| } | } |
| } | } |
| else { | else { |
| $chat->chat_send("Syntax: !seen <screenname>"); | $chat->chat_send("Syntax: !seen <em>screenname</em>"); |
| } | } |
| } | } |