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 :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
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] Thu, 14 January 2016 23:36 Go to previous messageGo to previous message
Kinetix is currently offline  Kinetix
Messages: 3
Registered: January 2016
Karma:
Junior Member
add to buddy list
ignore all messages by this user
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: Sat Dec 07 05:27:05 EST 2024

Total time taken to generate the page: 0.08094 seconds