collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Wtb automatic !irc connect  (Read 10206 times)

0 Members and 1 Guest are viewing this topic.

Offline Waqu

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Wtb automatic !irc connect
« on: November 23, 2010, 07:57:41 pm »
Wtb automatic !irc connect after loosing irc connection after whatever reason the irc desided to go offline, but the game chat still works.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Wtb automatic !irc connect
« Reply #1 on: November 27, 2010, 10:52:04 pm »
Check out the irc reconnect setting which should do what you want :)
BeBot Founder and Fixer Kingpin

Offline Waqu

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #2 on: December 03, 2010, 01:16:24 pm »
Reconnect:  On
  Description: Should the bot automatically reconnect to IRC?
  Change to: [ On | Off ]

But the problem is, it doesnt reconnect.

Offline Malaxia

  • BeBot Rookie
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #3 on: December 29, 2010, 03:36:48 pm »
I have the same issue, my bots are connected through IRC and there's only 1 of the 3 dimension that is automatically connected each time I restart the bots. Annoying since I have no admin on RK2...

Where is it handled? Maybe I can find a fix for that.

Offline GBH

  • BeBot Hero
  • ******
  • Posts: 69
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #4 on: January 10, 2011, 02:11:50 pm »
Just a note.

This only seems to work by re-connecting on a bot restart.

What it doesn't do is to reconnect to IRC if the chat server splits or you get some random timeout. that needs a manual !irc connect or a restart.

G

Offline Waqu

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #5 on: January 12, 2011, 01:43:05 pm »
Yes bot reconnects after restarting the bot, but what i need is the auto-reconnect after random timeout. Can we get that somehow?

Offline Waqu

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #6 on: February 10, 2011, 09:26:40 pm »
No one cares?

Offline redmagician

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #7 on: May 11, 2011, 06:11:59 am »
I've spent a lot of time trying to tackle down the cause of the issue.
I went from rewriting IRC.php to updating SmartIRC.php to the latest version to finally a simple modification.
It's been a brutal two days but I finally have the most straightforward solution I could come up with.

The issue stems from a lack of error checking in SmartIRC.php
The code in IRC.php actually works beautifully provided there are some changes to SmartIRC.php

There are two ways to fix auto reconnect.
You could update to the latest version of SmartIRC, provided you update about four lines of code (the socket_select timeout and the external dependencies).
This would also mean changing _rawreceive() in IRC.php to listenOnce() which essentially does the same thing.

What I suggest is to just modify the SmartIRC.php that's inside the Sources directory of the bot.
I've included a modified version as an attachment.
Inside the function _rawreceive() I added the following snippet of code.

if ($rawdata === false) {
// reading from the socket failed, the connection is broken
return false;
}

This should be added right above the line "$this->_checktimer();"
That line only appears once inside SmartIRC.php so that's a rather nice way of identifying where the code should go.

P.S.
I would not say that no one cares but I would imagine the amount of people that use IRC are few.
The ones who do use IRC either put up with the issue or don't seem to be driven to fix the issue themselves.

Offline Waqu

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #8 on: May 11, 2011, 03:15:32 pm »
Thanks for the modified file, now just have to wait and see if it reconnects or not.

Offline Waqu

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #9 on: June 26, 2011, 03:01:44 pm »
Seems to be working fine now.

Offline Zweiblum

  • BeBot Apprentice
  • ***
  • Posts: 135
  • Karma: +0/-0
Re: Wtb automatic !irc connect
« Reply #10 on: July 17, 2011, 11:00:03 am »
thx for this

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 213
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal