Anope Development > Modules

Update a module

(1/1)

Keiro:
Hi,

I have a module that seems to be needing an update to work with Anope 2.x... although I could've sworn I had it working fine on Anope 2.x...

These are the warnings I get when I compile the module:

This is for RPGServ

--- Code: ---Scanning dependencies of target rpgserv.so
[ 87%] Building CXX object modules/CMakeFiles/rpgserv.so.dir/rpgserv/rpgserv.o
/home/user/anopedev/anope-2.0.1-source/modules/rpgserv/rpgserv.cpp:93:13: warning: ‘mt’ defined but not used [-Wunused-variable]
  static int mt[MERS_N]; /* State vector */
             ^
/home/user/anopedev/anope-2.0.1-source/modules/rpgserv/rpgserv.cpp:94:13: warning: ‘mti’ defined but not used [-Wunused-variable]
  static int mti; /* Index into mt */
             ^
/home/user/anopedev/anope-2.0.1-source/modules/rpgserv/rpgserv.cpp:298:22: warning: ‘Anope::string dtoa(double)’ defined but not used [-Wunused-function]
 static Anope::string dtoa(double num)
                      ^
--- End code ---

This is for the other modules that plug into RPGServ:

--- Code: ---Scanning dependencies of target rs_roll+.so
[ 90%] Building CXX object modules/CMakeFiles/rs_roll+.so.dir/rpgserv/rs_roll+.o
/home/user/anopedev/anope-2.0.1-source/modules/rpgserv/rs_roll+.cpp: In member function ‘virtual void CommandRSRollPlus::Execute(CommandSource&, const std::vector<Anope::string>&)’:
/home/user/anopedev/anope-2.0.1-source/modules/rpgserv/rs_roll+.cpp:168:32: warning: ‘Y’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      myroll2 = myroll2 + myroll;
                                ^
/home/user/anopedev/anope-2.0.1-source/modules/rpgserv/rs_roll+.cpp:178:38: warning: ‘X’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    std::sort(dicerolls, dicerolls + X);
                                      ^
--- End code ---

--- Code: ---Scanning dependencies of target rs_exalted.so
[ 89%] Building CXX object modules/CMakeFiles/rs_exalted.so.dir/rpgserv/rs_exalted.o
Linking CXX shared module rs_exalted.so
[ 89%] Built target rs_exalted.so
Scanning dependencies of target rs_fudge.so
[ 89%] Building CXX object modules/CMakeFiles/rs_fudge.so.dir/rpgserv/rs_fudge.o
/home/keiro/anopedev/anope-2.0.1-source/modules/rpgserv/rs_fudge.cpp: In member function ‘virtual bool CommandRSFudge::OnHelp(CommandSource&, const Anope::string&)’:
/home/keiro/anopedev/anope-2.0.1-source/modules/rpgserv/rs_fudge.cpp:138:7: warning: unused variable ‘dicemax’ [-Wunused-variable]
   int dicemax = Config->GetModule("rpgserv")->Get<int>("dicemax","30");
       ^
/home/keiro/anopedev/anope-2.0.1-source/modules/rpgserv/rs_fudge.cpp:139:7: warning: unused variable ‘sidemax’ [-Wunused-variable]
   int sidemax = Config->GetModule("rpgserv")->Get<int>("sidemax","100");
       ^
--- End code ---

Naturally, I do have the modules in question and can provide them to whoever is willing to help me get these fixed so it works in Anope 2.x

Edit: Looks like RPGServ loads fine but requires: [08:47:29AM] <08@Global> Module rpgserv couldn't load due to configuration problems: rpgserv: <client> must be defined

Adam:
So configure the module properly so it will load?

Keiro:

--- Quote from: Adam on April 01, 2015, 04:51:22 PM ---So configure the module properly so it will load?

--- End quote ---

Not sure how it's supposed to be configured. There's really no documentation for defining what it needs. I'm currently reading the Anope docs right now. Just spotted the e-mail for this topic.

Edit: Including a pastebin of the rpgserv.cpp: https://pastebin.com/NGLiLt2w

See, I'm not a developer. I know enough to be dangerous. I can set things up provided there's documentation for it... but I checked, there wasn't any documentation that came with the module in question. There's a few more modules that came with RPGServ which seems to extend the functionality of RPGServ.

But again, I'm no developer so I'm not sure what I'm looking at when I check out the code to glean any sort of information that might could go towards configuring it properly.

I did, however, copy a chanserv.conf file to rpgserv.conf and edited it... now RPGServ does come online, but it doesn't seem to do any of the functions that it would normally do.

If I could please get help with that too, I'd be eternally grateful. It also would allow me to attach documentation to the RPGServ in the event I need to recompile and forget what exactly needed doing if I somehow manage to lose everything. (There's backups, but you know, better safe than sorry.)

Adam:
I don't know how the module needs to be configured, I did not create the module. Perhaps ask the author?

Keiro:

--- Quote from: Adam on April 01, 2015, 05:28:34 PM ---I don't know how the module needs to be configured, I did not create the module. Perhaps ask the author?

--- End quote ---

Neither do I. I found the logs that contained the location of where I got this from. Have contacted them but I suspect they're not the original author.

But! I did manage to get RPGServ to load... but it's not responding to anything. I'll have to create a separate topic for that issue and ask for further troubleshooting/config help.

My OP still stands, though... I'd like to get this module's warning issues taken care of.

Edit: Got it all working. Turns out that I did in fact contact the author. Oops. Well, good to know for the future... <_<;

*coughs* I'm good to go, now.

Navigation

[0] Message Index

Go to full version