Reloadfunc does not update modules

Back to PHP-IRC Bugs

Page: 1  
From User Message Body
dracozny
Post #732
Member
Date: 7:57 pm, May 27 2008
Posts: 30


it worked at first when I just had line saying hello to the room, but once I started adding more code reloadfunc will not update any code changes I made.

current version PHP-IRC v2.2.1 [04/08/06]

Mad_Clog
Post #737
user avatar
Member
Date: 5:17 pm, Jun 3 2008
Posts: 176


reloadfunc doesn't reload the module when it has any errors in it.
I suggest you check that first.

Should give you a message saying you have errors though...

dracozny
Post #741
Member
Date: 12:40 am, Jun 20 2008
Posts: 30


Missing argument 2 for clockworx_mod_0668e861e83b4ea2ccb0f7177130ff97::clockfunc(), called in /home/ellipse32/php-irc-2.2.1/timers.php on line 142 and defined in /home/ellipse32/php-irc-2.2.1/parser.php(411) : eval()'d code on line 115


this is the only warning I get, and I am not sure what is needed to correct

Mad_Clog
Post #742
user avatar
Member
Date: 6:41 pm, Jun 20 2008
Posts: 176


Does it pickup your code changes when you manually restart the bot? (as in shutdown, boot)

Also you could put your mod on a pastebin site and leave a link here so folks can have a look at whats going on.
That might help solve the problem

dracozny
Post #744
Member
Date: 2:13 am, Jun 30 2008
Posts: 30


yes if I manually restart the bot it will use my module as written but still likes to give that warning.

the code is a bit messy, I try to keep it clean but quick and dirty fixes happen.
http://ircforex.pastebin.com/m5ac13b19

I do plan on rewriting this to some extent, but if you have an idea on what I did wrong it will help.

Last edited by dracozny at 6:48 am, Jun 30 2008

Mad_Clog
Post #745
user avatar
Member
Date: 4:58 pm, Jun 30 2008
Posts: 176


1) Did you code this yourself?
2) Don't use sleep() in this bot, it only causes problems
3) you're calling your clockfunc function (from a timer) with no arguments, where as it requires 2 arguments.

dracozny
Post #746
Member
Date: 5:35 pm, Jun 30 2008
Posts: 30


1) yes I coded it myself.

2)sleep is used only in the mysql queries to avoid spamming the server. only temporary until I can figure out a better array.

3) no arguments were needed. options? ok maybe a duh factor i deleted $arg and $line from the clock function and that fixed the timer error.
but I found another error I need to fix


Last edited by dracozny at 4:46 am, Jul 1 2008

dracozny
Post #747
Member
Date: 5:31 am, Jul 1 2008
Posts: 30


http://ircforex.pastebin.com/m1e511352

Ok I fixed almost all errors and warnings but I have one question, the only error left is on variables that are unset, why on earth do I have to set it when I clearly am asking if they are unset by is($variable === NULL) and this is an acceptable practice according to PHP documentation.
well I declared it as NULL from the start which fixed that, so on start up and even on reloadfunc I do not see any errors or warnings, however it still will not utilize the module updates without a total shutdown and restart.

Mad_Clog
Post #748
user avatar
Member
Date: 4:39 pm, Jul 1 2008
Posts: 176


First off,
don't
use
sleep();
If you're worried about the bot flooding out play with the settings in bot.conf
if you need some time between function class use the timer class, that's what it's there for.

secondly, to check if a variable is set use isset().
and what response do you from your bot when you do a reloadfunc?

Last edited by Mad_Clog at 4:44 pm, Jul 1 2008

dracozny
Post #749
Member
Date: 4:42 pm, Jul 1 2008
Posts: 30


[10:22:27] (clockworxDEV@ircForex) > :Dracozny!dracozny@drunktrading.com PRIVMSG clockworxDEV :admin et1swcar reloadfunc
Rehashing Function File, please wait...


Successfully loaded 70 functions into memory.
[10:22:32] (clockworxDEV@ircForex) > PRIVMSG Dracozny :--> Function reload complete

[10:22:33] (clockworxDEV@ircForex) > PRIVMSG Dracozny :--> ADMIN RELOADFUNC Requested



   

  Pages (2) [ 1 2 ] Next Page

Back to PHP-IRC Bugs