コード例 #1
0
ファイル: irc.c プロジェクト: joaompinto/ptlink.irc.services
static char *LocalAddress;
static char *ServerName;
static char *ServerDesc;
static char *RemoteServer;
static int RemotePort;
static char *ServerPass;

/*
 * List of dbconf items we provide
 */
dbConfItem dbconf_provides[] =
{
    DBCONF_WORD_OPT(LocalAddress, NULL,
    "IP Address services should bind to before connecting to the IRC Server")
    DBCONF_WORD(ServerName, "services.ptlink.net",
    "Services Server Name")
    DBCONF_STR(ServerDesc, "PTlink IRC Services 3",
    "Services Server Description")
    DBCONF_WORD(RemoteServer, "localhost",
    "Hostname/IP of the IRC server for the services connection")
    DBCONF_INT(RemotePort, "6667",
    "Port number of the IRC server for the services connection")
    DBCONF_WORD(ServerPass, "servpass",
    "Password for the server connection, must match the C/N password")
    {
        NULL
    }
};


/** Local variables **/
コード例 #2
0
ファイル: ns_photo.c プロジェクト: diegoagudo/taps-services
  MOD_FUNC(nickserv_suser)  
MOD_END

/** Internal functions declaration **/
int ev_ns_photo_nick_info(IRC_User* user, u_int32_t *snid);

    
/** Local dconf settings **/
static char *BaseURL;

/*
 * List of dbconf items we provide
 */
dbConfItem dbconf_provides[] =
{
  DBCONF_WORD(BaseURL, "http://www.pt-link.net/services/", 
    "Base URL for the web services")
  {NULL}
};

/* this is called before load and at services rehash */
int mod_rehash(void)
{
  if(dbconf_get_or_build(mod_info.name, dbconf_provides) < 0 )
  {
    errlog("Error reading dbconf!");
    return -1;
  }
  return 0;
}

/** Local variables **/