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

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

Author Topic: irc.php  (Read 15618 times)

0 Members and 1 Guest are viewing this topic.

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
irc.php
« on: July 22, 2007, 04:22:20 am »
Code: [Select]
Fatal error: Call to a member function message() on a non-object in C:\aobots\Be
bot\modules\IRC.php on line 234

Code: [Select]
$this -> irc -> message(SMARTIRC_TYPE_CHANNEL, $this -> bot -> settings -> get("Irc", "Channel"), $ircmsg);
Code: [Select]
Bot Client:
 v0.5.0.svn(snapshot)

need I say more..:)  go the first post at least :)
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: irc.php
« Reply #1 on: July 22, 2007, 10:43:05 am »
This hasn't been changed at all, are you sure you are loading the SmartIRC class?

EDIT: Another reason this error can happen is when you call the send_irc() function while you aren't connected to IRC yet.
« Last Edit: July 22, 2007, 12:41:34 pm by Alreadythere »

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: irc.php
« Reply #2 on: July 23, 2007, 02:54:01 am »
This hasn't been changed at all, are you sure you are loading the SmartIRC class?

EDIT: Another reason this error can happen is when you call the send_irc() function while you aren't connected to IRC yet.

on the org bots I dont have this even configured anymore.. i am using a separate bot for IRC access.. but I am afraid to restart that bot due to this.. not sure if something was done unexpectantly or not.
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: irc.php
« Reply #3 on: July 23, 2007, 12:08:58 pm »
No real need to load the IRC module on bots not using IRC at all.

Anyways, in the send_irc() function in Bot.php the safety checks were wrong, though I think they would just crash the bot, not send all to IRC. Fixed in SVN versions.

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: irc.php
« Reply #4 on: July 24, 2007, 05:46:18 am »
Still same thing, I will double check make sure I have everything correct when I copied the source over to the live bots.  and the live bot I am testing it on, dosent have IRC setup at all.  I know I could just _irc.php but then that would also affect the IRC bot I have running also.   I am using the startup.bat argument option to run multiple bots from the same directory.  maybe eventually we could have and configuration put in to turn off modules from loading say like in the bot.conf

irc.php = Off  //On/Off option

but as of right now I am still getting that same error.
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: irc.php
« Reply #5 on: July 24, 2007, 10:26:56 am »
You could use the $module_directories variable. Move IRC.php into a subfolder, e.g. modules/irc/, and then include this in the conf files of the bots using IRC.
Code: [Select]
$module_directories = "modules/irc";

Offline Nytridr

  • BeBot Expert
  • ****
  • Posts: 262
  • Karma: +0/-0
    • Rising Sun
Re: irc.php
« Reply #6 on: July 25, 2007, 05:55:33 pm »
ok after removing the IRC.php and putting it in to a differnt folder I was getting a fatal error untill I added Tichy's little thing. 

Code: [Select]
// Relays $msg to IRC module (and from there after formatting to IRC channel)
function relay_to_irc($msg)
{
                {
                        if ($this -> bot -> settings -> get("irc", "connected"))
                        {
                               $this -> bot -> irc -> send_irc("", "", $this -> bot -> irc -> strip_formatting($msg));
                        }
                }
    }
It was just this
Code: [Select]
//$this -> bot -> irc -> send_irc("", "", $msg);
you know what is kind of funny is with the IRC.php module in my IRC bot that I use isnt having any problems.  it seems as long as you have IRC setup and connecting then it runs fine, but if you have it off in the other bots, then it really dont like it and gives you the previous error I posted.  May need to add checks to anything that sends out over the IRC to see if we are even going to connect to it, and if we aren't then dont run that part of the mod.
Co-Prez of Rising Sun RK1 (1st & only org I will ever belong to)

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: irc.php
« Reply #7 on: July 25, 2007, 06:31:24 pm »
Just replace that with $this -> bot -> send_irc() with the same arguments, in that function there is a full check for IRC.

Going to fix this error in the SVN now.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

* Who's Online
  • Dot Guests: 187
  • 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