Anope IRC Services

Anope Development => Modules => Topic started by: epic on November 18, 2012, 10:04:44 PM

Title: help with bs_quote
Post by: epic on November 18, 2012, 10:04:44 PM
Hi, i try to install bs_quote.c, but when i try to load the mod with /os modload bs_quote  say this:

"18:50 -OperServ(services@battle.cl)- Imposible cargar modulo bs_quotes " (unable to load)

please a little help.... and sorry my english, i'm from Chile...
Title: Re: help with bs_quote
Post by: Thomas Edwards on November 18, 2012, 10:13:47 PM
What version of Anope are you running?
Have you consulted docs/MODULES in your Anope Source directory?
Title: Re: help with bs_quote
Post by: epic on November 18, 2012, 10:21:26 PM
1.8.7 and i try with http://modules.anope.org/index.php?page=view&id=242

i read that doc, and i can load other mod (redirect) and work OK, but i need this bs_quote, but i`m an ignorant in this and i can't running that mod :c
Title: Re: help with bs_quote
Post by: Thomas Edwards on November 18, 2012, 10:25:00 PM
Have you closely followed the instructions here:

https://raw.github.com/anope/anope/1.8/docs/MODULES

These instructions are in the docs directory.
Title: Re: help with bs_quote
Post by: epic on November 18, 2012, 10:28:21 PM
yes, in this case i made the step Nº 5 (i.e.  upload file in dir, "make module" and " make install") this work fine, but the mod don't load...
Title: Re: help with bs_quote
Post by: Thomas Edwards on November 18, 2012, 10:30:33 PM
Are there any errors displayed when compiling the module?
Title: Re: help with bs_quote
Post by: epic on November 18, 2012, 10:34:58 PM
i try again, and after "make modules":

../../include -c bs_quotes.c
bs_quotes.c: In function âdo_view_quoteâ:
bs_quotes.c:509:40: warning: variable âchanâ set but not used [-Wunused-but-set-variable]
gcc -shared ../mod_version.o bs_quotes.o -o bs_quotes.so
make all in dummy...
make[2]: Entering directory `/home/irc/anope-1.8.7/src/modules/dummy'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/irc/anope-1.8.7/src/modules/dummy'
make[1]: Leaving directory `/home/irc/anope-1.8.7/src/modules'
*** All done, now (g)make install to install Anope/Modules

Title: Re: help with bs_quote
Post by: Thomas Edwards on November 18, 2012, 10:40:13 PM
After that have you ran "make install"?
Title: Re: help with bs_quote
Post by: epic on November 18, 2012, 10:42:07 PM
yes, and no warning or error....
Title: Re: help with bs_quote
Post by: Thomas Edwards on November 18, 2012, 10:43:54 PM
Is there a file names bs_quote.so in services/modules/?
Title: Re: help with bs_quote
Post by: epic on November 18, 2012, 10:46:31 PM
yes
Title: Re: help with bs_quote
Post by: Thomas Edwards on November 18, 2012, 10:47:42 PM
Now try /msg operserv modload bs_quote from your IRC Server.
Title: Re: help with bs_quote
Post by: epic on November 18, 2012, 10:51:05 PM
Imposible cargar modulo bs_quote  (unable to load)
Title: Re: help with bs_quote
Post by: Thomas Edwards on November 18, 2012, 11:00:03 PM
I've noticed you're compiling bs_quotes and not bs_quote, Have you tried /msg operserv modload bs_quotes
Title: Re: help with bs_quote
Post by: epic on November 18, 2012, 11:10:30 PM
sorry... y paste bad...

Imposible cargar modulo bs_quotes (unable to load)
Title: Re: help with bs_quote
Post by: epic on November 19, 2012, 01:02:13 AM
i tried restarting the services and adding the line to services.conf, but nothing... please help!
Title: Re: help with bs_quote
Post by: epic on November 19, 2012, 11:24:58 PM
someone please?
Title: Re: help with bs_quote
Post by: VisioN on November 19, 2012, 11:32:29 PM
unable to load doesnt give us much information really. Please paste the logs anope writes when it tries to load the module. You can find that in the directory /services/logs. Also, it'd be nice if you could translate what's in there ;)
Title: Re: help with bs_quote
Post by: epic on November 19, 2012, 11:43:24 PM
when i try "make modules" say this:

./../include -c bs_quotes.c
bs_quotes.c: In function âdo_view_quoteâ:
bs_quotes.c:509:40: warning: variable âchanâ set but not used [-Wunused-but-set-variable]
gcc -shared ../mod_version.o bs_quotes.o -o bs_quotes.so
make all in dummy...
make[2]: Entering directory `/home/irc/anope-1.8.7/src/modules/dummy'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/irc/anope-1.8.7/src/modules/dummy'
make[1]: Leaving directory `/home/irc/anope-1.8.7/src/modules'
*** All done, now (g)make install to install Anope/Modules


and the services log say this:
[Nov 19 20:38:30 2012] Trying to load module [bs_quotes]
[Nov 19 20:38:30 2012] [bs_quotes]: Missing config options!
[Nov 19 20:38:30 2012] bs_quotes requested unload...
[Nov 19 20:38:30 2012] [bs_quotes]: Module Unloaded
[Nov 19 20:38:30 2012] Module loading status: 6 (Module Error, Error during load time or module returned MOD_STOP)

sorry my ignorance, but i don`t know what i need to configure...
Title: Re: help with bs_quote
Post by: VisioN on November 19, 2012, 11:47:46 PM
there is your answer then. You need to add the configuration directives the module needs in your services.conf , cause the module will not load without them. If you check the module you will see which configuration options you need to add for it to work. Then you will need to reload your services configuration with /os reload and finally load your module with /os modload .
Title: Re: help with bs_quote
Post by: epic on November 20, 2012, 12:20:55 AM
i add this  in services.conf in last line

QuoteMySQLHost "localhost" - The hostname for the MySQL server (for TCP connections)
QuoteMySQLPort 3306 - The port for the MySQL server (for TCP connections)
QuoteMySQLSocket "x/xxx/" - The UNIX socket file for the MySQL server
QuoteMySQLUser "xxxxxxxx" - The username to use
QuoteMySQLPassword "xxxxx" - The password for the specified username
QuoteMySQLDatabase "database" - The database to use for the quotes
QuoteMySQLTable "bs_quotes" - The table to use
QuoteEnableMultiLine - Enable multi-line support, disabled by default

but i don't know if this is what i have to do...
this is the log:

[Nov 19 21:15:19 2012] Trying to load module [bs_quotes]
[Nov 19 21:15:19 2012] module error: too many config. params
[Nov 19 21:15:19 2012] module error: too many config. params
[Nov 19 21:15:19 2012] module error: too many config. params
[Nov 19 21:15:19 2012] module error: too many config. params
[Nov 19 21:15:19 2012] [bs_quotes] Can't connect to MySQL server
[Nov 19 21:15:19 2012] bs_quotes requested unload...
[Nov 19 21:15:19 2012] [bs_quotes]: Module Unloaded
[Nov 19 21:15:19 2012] Module loading status: 6 (Module Error, Error during load time or module returned MOD_STOP)
Title: Re: help with bs_quote
Post by: VisioN on November 20, 2012, 02:13:45 AM
no its not, you have to actually fill in the options, not just copy paste them as they are :(
Title: Re: help with bs_quote
Post by: epic on November 20, 2012, 02:39:06 AM
the other thing who i edit was the "mysql configuration" from services.conf ...
Title: Re: help with bs_quote
Post by: epic on November 20, 2012, 02:57:01 AM
can i paste the modules and try to help me to config please??? i need that mod :c
Title: Re: help with bs_quote
Post by: epic on November 20, 2012, 01:15:00 PM
say "couldn't connect with mysql", but the adress is good... and my user and pass are good too...
Title: Re: help with bs_quote
Post by: epic on November 20, 2012, 03:12:36 PM
thanks to all... i finnaly can run that mod :)
Title: Re: help with bs_quote
Post by: VisioN on November 20, 2012, 07:14:26 PM
do you know what a mySQL server is?? have you installed one ? If not you need to learn/do so.
Title: Re: help with bs_quote
Post by: epic on November 21, 2012, 11:19:54 PM
do you know what a mySQL server is?? have you installed one ? If not you need to learn/do so.

i finally can run that mod.... thanks