|
kakaroto
|
 |
« Reply #15 on: June 03, 2009, 10:32:27 pm » |
|
Hi, I got your plugin and I tested it a few times, it never disable any plugin, it worked normally.. so I 'm not sure exactly why it happens for you and not for me.. anyways, i took a quick look at your code and sorry but it's really bad! first, use 'variable' not 'global'... secondly, use ::plugins::UnloadPlugin instead of just calling 'deinit'.. third, you do [open oldquotes.txt], that's bad, because it will try to write to /usr/share/amsn/oldquotes.txt, you should instead use $HOME to write in the user's profile directory. You also try to open plugins/autoquoter/quotes.txt.. but what if the user installed the plugin in ~/.amsn/plugins and not in /usr/share/amsn/plugins, it won't work.. you must save your $dir received in the Init proc into a namespace variable and use it like this : [open [file join $dir quotes.txt]] You should also use the 'after cancel' instead of the $run variable... You should use plugins_log instead of status_log, you should use 'catch' in order to catch errors when doing 'unset' or 'open'... your last quote will never be shown because when you set it, you increment the index counter and you check if it > num_frases, then you set the index to 0 and change the psm again you never check whether you are online or offline... you can't change the psm when offline, so you must make sure that the ::MSN::myStatusIs != FLN... that's about it, that's what I saw when i quickly browsed through the code...
|