FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » ircbot with NickServ and IRCS support.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ircbot with NickServ and IRCS support. [message #187042 is a reply to message #168700] Fri, 15 January 2016 04:36 Go to previous messageGo to previous message
Kinetix is currently offline  Kinetix
Messages: 3
Registered: January 2016
Karma:
Junior Member
Hi all,

In the past couple of days I've been testing fudforum and wound up testing this plugin. Due to some apparent changes in PHP, this script will have a tough time connecting over SSL to servers that use self-signed certificates. It might be worthwhile to have some full adjustment of the config values for this plugin to turn on/off certificate validation, but for me I just adjusted the script directly. Here's the diff:

diff ircbot.php ircbot.php.bak
109,114c109
<               $context = stream_context_create();
<               stream_context_set_option($context, "ssl", "verify_peer", false);
<               stream_context_set_option($context, "ssl", "allow_self_signed", true);
<
< //            $server['SOCKET'] = fsockopen('ssl://' .  $ini['IRCBOT_HOST'], $ini['IRCBOT_PORT'], $errno, $errstr, 2);
<               $server['SOCKET'] = stream_socket_client('ssl://' .  $ini['IRCBOT_HOST'] . ':' . $ini['IRCBOT_PORT'], $errno, $errstr, 2, STREAM_CLIENT_CONNECT, $context);
---
>               $server['SOCKET'] = fsockopen('ssl://' .  $ini['IRCBOT_HOST'], $ini['IRCBOT_PORT'], $errno, $errstr, 2);



Enjoy!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: shoutbox
Next Topic: Help on -- Advertisement banners ?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 08:27:16 GMT 2024

Total time taken to generate the page: 0.05008 seconds