DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • July 31, 2010, 03:50:24 AM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1]   Go Down
  Print  
Author Topic: set_module_pref  (Read 1566 times)
0 Members and 1 Guest are viewing this topic.
James
Guest
« on: September 12, 2004, 08:11:55 PM »

Is there a way to do a set_module_pref for another user?  I'm writing a module that needs to alter flags on another user.  I see the ability to do this in get_module_pref, the last argument accepts a user ID for another user, but what about for set_module_pref.  
Logged
Kendaer
Global Moderator
Mod God
*****
Offline Offline

Posts: 1806


Once a dragon, always a dragon


View Profile WWW
« Reply #1 on: September 12, 2004, 08:50:54 PM »

Is there a way to do a set_module_pref for another user?  I'm writing a module that needs to alter flags on another user.  I see the ability to do this in get_module_pref, the last argument accepts a user ID for another user, but what about for set_module_pref.  

Maybe you should look at the function definition in lib/modules.php?

You'd see it reads as follows (in 0.9.8-pre.6)
function set_module_pref($name,$value,$module=false,$user=false)

Now, can you answer your question on your own? Smiley
Logged

Ex co-developer of LotGD
James
Guest
« Reply #2 on: September 12, 2004, 09:06:14 PM »

Yes -- I'm not a moron.  I guess I just missed that one, because in the testmodule (where I was referencing my information), it just says:

// get_module_pref(settingname[, modulename[, user]]):

and

// set_module_pref(settingname, value[, modulename]):
Logged
SaucyWench
Mod God
*****
Offline Offline

Posts: 2241


I'm a good girl.


View Profile WWW
« Reply #3 on: September 13, 2004, 05:48:46 AM »

Kendaer wasn't treating you like a moron. I can tell you from experience, he is wanting you to learn the answers yourself by pointing you in the right direction, rather than holding your hand, and he isn't doing it to be condescending but to genuinely help you to help yourself. You learn far more that way. I have learned a tremendous amount thanks to Kendaer telling me to figure things out on my own rather than him just fixing all my mistakes for me.
Logged

SaucyWench
Owner of GemDust.com and Darton City proudly hosted by LunarPages
Spider
Guest
« Reply #4 on: September 13, 2004, 06:42:32 AM »

Kendaer wasn't treating you like a moron. I can tell you from experience, he is wanting you to learn the answers yourself by pointing you in the right direction, rather than holding your hand, and he isn't doing it to be condescending but to genuinely help you to help yourself. You learn far more that way. I have learned a tremendous amount thanks to Kendaer telling me to figure things out on my own rather than him just fixing all my mistakes for me.

besides, it's way more fun that way Smiley
Logged
phofire
Guest
« Reply #5 on: September 13, 2004, 10:56:24 AM »

granted he has appeared more blunt throught the 0.9.8 development phase, but thats just made things more entertaining . . especialy with certain people
Logged
Kendaer
Global Moderator
Mod God
*****
Offline Offline

Posts: 1806


Once a dragon, always a dragon


View Profile WWW
« Reply #6 on: September 13, 2004, 11:19:38 AM »

I am and have always been a very blunt person.  I value that sort of forthright honesty and won't coddle people unless I have some reason to.

I only stop being blunt when I have actually promised some level of support for something, at which point, I paint on my happy face and give the support I promised.   Since 0.9.8 is pre-release, there is no 'user support' offered, which means you all get my full and blunt self Smiley

And as Saucy points out, my intention is to help you guys learn how  to find things out for yourself.   Looking at the source and the function definitions is *always* the authoritative source.  You have a valid point that the testmodule.php documentation is out of date.  It is.  I'll try and get a chance to bring it up to date sometime soon, but that's not a hard and fast promise, and I welcome other people taking some of those really simple tasks on and doing it.  I'm very open to making textual changes if they come pre-packaged.  Heck, I'm open to most changes that come that way.. As I've said elsewhere, a unix-style context diff is best since it lets me apply it to the source code and go.  A couple of you have figured out how to generate these, so I will leave that explanation to them.

My goal out of all of this is to have a large pool of people who are familiar and competant to work with the 0.9.8 source so that good modifications come out of it and so that other people contribute and feel comfortable contributing to the core code if changes need to be made there as well.  I firmly believe changes *shouldn't* need to be made there, but I also know that's idealistic Smiley  For instance, I spent a fair chunk of this weekend ripping apart the pvp code and factoring it so that something Aes wanted to do with the world map could be done cleanly.  (his original implementation struck both of us as hackish and wrong) [Speaking of which Aes, the modified code is running on logd-beta.dragoncat.net, feel free to check it out].  I'd love for other people to feel comfortable enough with the source that when something like that becomes obviously needed (as it was here) that they are willing and able to do it, able to submit those changes to me, and able to have them sound and solid so that I can just review them and add them.

Look for instance at the iterations I went through with Chaosmaker's commentary mod.  His code changes are now part of the core.  Dut and I have been talking about a way to break skills out so that they are modularized/modularizable.  I haven't had a chance to review his last effort yet, but I'll probably get to it within the next week or so.  I know Aes has and I have been talking about some things that I want to get done that he felt were a good challenge for him.

Will I be tough when reviewing those things?  hell yes.  Just ask Dut or Chaosmaker, or heck, even ask Aes about some of my comments about his worldmap module.   But at the same time, I try to encourage any changes I feel are really useful, innovative or inventive and which bring something to the game which is either new or make things easier in terms of interface/ability for the people who are writing content.

I'm also very outspoken and will say when I see things I don't like.   I know I've pissed more than a few of you off at various times.  I'll make no apologies for that.  I'm a very tough person to impress and I want the code to be the best it can be.  If that bothers you, sorry Smiley
Logged

Ex co-developer of LotGD
James
Guest
« Reply #7 on: September 13, 2004, 03:47:40 PM »

I guess I see some of your points....maybe I just took it wrong.  It just seemed a bit smart assish.
Logged
Kendaer
Global Moderator
Mod God
*****
Offline Offline

Posts: 1806


Once a dragon, always a dragon


View Profile WWW
« Reply #8 on: September 13, 2004, 08:09:48 PM »

I am sorry if you felt I was being a smart-ass James, that honestly wasn't my intent.

My intent was to (slightly humorously) point you at the correct place to find the right answers.

My apologies if my humour fell flat.
Logged

Ex co-developer of LotGD
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Who's Online
23 Guests, 1 User
spector
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search