[IRCServices Coding] OperServ UPDATE suggestion

Andrew Church achurch at achurch.org
Wed Jan 1 14:25:10 PST 2003


     Use the Source, Luke.  UPDATE (modules/operserv/main.c:do_update())
sets the global variable "save_data" to 1, which causes the main loop to
tell all modules to save their data.  The do_save_data() in operserv/main.c
is only the OperServ part of that process, and only handles the OperServ
database for obvious reasons.

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/

>This is a multi-part message in MIME format.
>
>--Boundary_(ID_iiHC64a6A6NdaLuY3JRsCA)
>Content-type: text/plain; charset=iso-8859-1
>Content-transfer-encoding: 7BIT
>
>I think it would be better when using OperServ UPDATE would update *all* databases. Correct me if I'm wrong, but it looks like it only updates the OperServ DB:
>
>modules/operserv/main.c:
>
>
>/* Callback for saving data. */
>
>static int do_save_data(void)
>{
>    sync_operserv_db(OperDBName);
>    return 0;
>}
>
>
>I tried to add this (with the appropriate static char's):
>
>
>/* Callback for saving data. */
>
>static int do_save_data(void)
>{
>    sync_channel_db(ChanDBName);
>    sync_operserv_db(OperDBName);
>    sync_statserv_db(StatDBName);
>    return 0;
>}
>
>
>and I couldn't get it to work.
>
>Ideas?
>
>
>
>/Patrick Fish
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.427 / Virus Database: 240 - Release Date: 12/6/2002
>
>--Boundary_(ID_iiHC64a6A6NdaLuY3JRsCA)
>Content-type: text/html; charset=iso-8859-1
>Content-transfer-encoding: 7BIT
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
><HTML><HEAD>
><META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
><META content="MSHTML 6.00.2800.1126" name=GENERATOR>
><STYLE></STYLE>
></HEAD>
><BODY bgColor=#ffffff>
><DIV><FONT face=Arial size=2>I think it would be better when using&nbsp;OperServ 
>UPDATE would update *all* databases. Correct me if I'm wrong, but it looks like 
>it only updates the OperServ DB:</FONT></DIV>
><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
><DIV><FONT face=Arial size=2>modules/operserv/main.c:</FONT></DIV>
><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><FONT face=Arial size=2>
><DIV><BR>/* Callback for saving data. */</DIV>
><DIV>&nbsp;</DIV>
><DIV>static int do_save_data(void)<BR>{<BR>&nbsp;&nbsp;&nbsp; 
>sync_operserv_db(OperDBName);<BR>&nbsp;&nbsp;&nbsp; return 0;<BR>}<BR></DIV>
><DIV>&nbsp;</DIV>
><DIV>I tried to add this (with the appropriate static char's):</DIV>
><DIV>&nbsp;</DIV>
><DIV><BR>/* Callback for saving data. */</DIV>
><DIV>&nbsp;</DIV>
><DIV>static int do_save_data(void)<BR>{<BR>&nbsp;&nbsp;&nbsp; 
>sync_channel_db(ChanDBName);<BR>&nbsp;&nbsp;&nbsp; 
>sync_operserv_db(OperDBName);<BR>&nbsp;&nbsp;&nbsp; 
>sync_statserv_db(StatDBName);<BR>&nbsp;&nbsp;&nbsp; return 0;<BR>}<BR></DIV>
><DIV>&nbsp;</DIV>
><DIV>and I couldn't get it to work.</DIV>
><DIV>&nbsp;</DIV>
><DIV>Ideas?</DIV>
><DIV>&nbsp;</DIV>
><DIV>&nbsp;</DIV>
><DIV>&nbsp;</DIV>
><DIV>/Patrick Fish</DIV>
><DIV>&nbsp;</DIV>
><DIV><BR>---<BR>Outgoing mail is certified Virus Free.<BR>Checked by AVG 
>anti-virus system (<A 
>href="http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: 6.0.427 / 
>Virus Database: 240 - Release Date: 12/6/2002</DIV></FONT></BODY></HTML>
>
>--Boundary_(ID_iiHC64a6A6NdaLuY3JRsCA)--
>------------------------------------------------------------------
>To unsubscribe or change your subscription options, visit:
>http://www.ircservices.za.net/mailman/listinfo/ircservices-coding