[SimBot-commits] CVS: simbot/plugins httpd.pl,1.2,1.3 recap.pl,1.17,1.18
Status: Abandoned
Brought to you by:
kstange
|
From: Kevin S. <ks...@us...> - 2005-07-27 17:37:27
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15100/plugins Modified Files: httpd.pl recap.pl Log Message: What exactly did I do? I stole some old code from a perl script I had written, then I totally rewrote it anyway. This adds htmlize, which converts IRC control codes into HTML for use with the httpd plugin. I made recap use it and output in HTML, and I don't know why CVS says httpd.pl has been changed. Index: httpd.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/httpd.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- httpd.pl 27 Jul 2005 02:44:33 -0000 1.2 +++ httpd.pl 27 Jul 2005 17:37:18 -0000 1.3 @@ -98,4 +98,4 @@ sub cleanup_httpd { plugin_id => 'httpd', event_plugin_load => \&messup_httpd, event_plugin_unload => \&cleanup_httpd, -); \ No newline at end of file +); Index: recap.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/recap.pl,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -p -r1.17 -r1.18 --- recap.pl 27 Jul 2005 02:44:33 -0000 1.17 +++ recap.pl 27 Jul 2005 17:37:18 -0000 1.18 @@ -115,8 +115,8 @@ sub recap_page { my ($request, $response) = @_; # $response->code(RC_OK); - $response->push_header('Content-Type', 'text/plain'); - $response->content(join("\n", @backlog)); + $response->push_header("Content-Type", "text/html"); + $response->content(&SimBot::htmlize(join("\n", @backlog))); } # Register Plugin @@ -140,7 +140,7 @@ sub recap_page { event_channel_part => \&record_recap, event_server_nick => \&nick_change, ); - + $SimBot::hash_plugin_httpd_pages{'/recap'} = { 'title' => "Current Chatter", 'handler' => \&recap_page, |