Reloadfunc does not update modules

Back to PHP-IRC Bugs

Page: 2  
From User Message Body
Mad_Clog
Post #750
user avatar
Member
Date: 4:46 pm, Jul 1 2008
Posts: 176


Looks allright, try adding a function to your mod and make it callable from a channel, then reload again to check the number of functions loaded.

dracozny
Post #751
Member
Date: 5:01 pm, Jul 1 2008
Posts: 30


ok adding a function and using reloadfunc will add a new function without needing to shut it down.
if I modify a function such as uncomment one of those debug lines toward the bottom of my mod the bot completely ignores it.

Mad_Clog
Post #752
user avatar
Member
Date: 5:08 pm, Jul 1 2008
Posts: 176


There's no way the bot ignores part of a code change.
It either reloads your mod(s) or it doesn't.

dracozny
Post #753
Member
Date: 5:13 pm, Jul 1 2008
Posts: 30


its not giving me an error when i comment and uncomment
//$this->ircClass->privMsg('#timezone' , $GLOBALS['holiday']['sydney'] . ' sydney');
the only way this one takes effect is if I completely shut it down.

I added a simple function as you asked
public function slap_me($line,$args) {
$this->ircClass->notice($line['fromNick'], "are you an idiot");
}
and it loaded it just fine.
so the question still remains why will it update a new function but not an existing one, I just deleted that new function and it updated as well.

dracozny
Post #754
Member
Date: 5:25 pm, Jul 1 2008
Posts: 30


and as another test I remade that new function, reloaded, then changed that function, and reloaded, no changes were taken.

just to completely verify that its not my module I wrote a new one and removed my clock module.
Code

<?php
    class test_mod extends module {
        
        public $title = "test module";
        public $author = "dracozny";
        public $version = "0.1";
        
        public function init()
        {
            $GLOBALS['test'] = "1";
            $this->timerClass->addTimer("clocktimer", $this, "clockfunc", "", 60, true);
        }
        
        public function clockfunc()
        {
            $this->ircClass->amsg($GLOBALS['test']);
            $GLOBALS['test'] = $GLOBALS['test'] *$GLOBALS['test'] + "1";
            return true;
        }
    }
?>

the only change added was multiplying the global by itself and adding 1.
the result after reloadfunc
1
2
3
4
shutdown restart
1
2
5
etc..
and just like before there are no error messages

Last edited by dracozny at 4:58 am, Jul 2 2008

   

Previous Page Pages (2) [ 1 2 ]  

Back to PHP-IRC Bugs