Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: m_sql_authentication and multiple DB  (Read 386 times)

0 Members and 1 Guest are viewing this topic.

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 182
    • French Eggdrop community
m_sql_authentication and multiple DB
« on: September 18, 2019, 10:09:29 PM »

Hello there,

I was wondering if it was possible to use separate DB with this module. Seems that no because only one engine can be set.

Do you think it could be possible to modify it to have more than one DB engine used ?

McDeffice

  • Anope User
  • Offline Offline
  • Posts: 6
Re: m_sql_authentication and multiple DB
« Reply #1 on: September 28, 2019, 05:39:29 PM »

Hello uncle CrazyCat,
You tried to add a block in "module {name = "m_mysql"}" by changing the value of name in "mysql {name = "mysql/main" }"

Code: [Select]
module
{
name = "m_mysql"

mysql
{
/* The name of this service. */
name = "mysql/main"
database = "anope"
server = "127.0.0.1"
username = "anope"
password = "mdp"
port = 3306
}
mysql
{
name = "mysql/secondary"
database = "anope"
server = "Host.Of.secondary.db"
username = "anope"
password = "mdp"
port = 3306
}
}
and in the module change "mysql/main" to "mysql/secondary"
Code: [Select]
module
{
name = "m_sql_authentication"

/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
engine = "mysql/secondary"

I did not try. this is a guess of solution
Logged

CrazyCat

  • Anope User
  • Offline Offline
  • Posts: 182
    • French Eggdrop community
Re: m_sql_authentication and multiple DB
« Reply #2 on: October 01, 2019, 03:27:37 PM »

Hi McDefice :)

I think I didn't explain clearly my problem.
I already use m_sql_authentication with a DB which is not the one used by anope. But I'm looking for a way to use two databases for m_sql_authentication, doing something like:
Code: [Select]
module
{
name = "m_sql_authentication"
engine = "mysql/firstsite"
}
module
{
name = "m_sql_authentication"
engine = "mysql/secondsite"
}
The intention is to allow users from different websites to log in the network with their community identifiants.
Pages: [1]   Go Up