Author: Fish
Date: Sat Jun 11 14:12:47 2005
New Revision: 357
Modified:
branches/3.0/ChangeLog
branches/3.0/SecureServ.c
branches/3.0/SecureServ.h
branches/3.0/scan.c
branches/3.0/update.c
Log:
w00ps, wrong module before
Modified: branches/3.0/ChangeLog
==============================================================================
--- branches/3.0/ChangeLog (original)
+++ branches/3.0/ChangeLog Sat Jun 11 14:12:47 2005
@@ -2,6 +2,7 @@
Fish (F), Mark (M), DeadNotBuried (D)
==============================================================================
3.0.a3-dev - Mark (M)
+ - secure.irc-chat.net update reports now moved to core (F)
- Fix up dns_lookup prototype (F)
- we send IP address, not hostname, to secure.irc-chat.net to aid for DNSBL support (F)
- Update to FetchRows handlers to take size parameter. (M)
Modified: branches/3.0/SecureServ.c
==============================================================================
--- branches/3.0/SecureServ.c (original)
+++ branches/3.0/SecureServ.c Sat Jun 11 14:12:47 2005
@@ -435,11 +435,14 @@
AddTimer( TIMER_TYPE_INTERVAL, JoinNewChan, "JoinNewChan", SecureServ.stayinchantime );
if( SecureServ.monchancycle )
AddTimer( TIMER_TYPE_INTERVAL, MonBotCycle, "MonBotCycle", SecureServ.monchancycletime );
- dns_lookup( "secure.irc-chat.net", adns_r_a, GotHTTPAddress, NULL );
- LoadMonChans();
- if( SecureServ.autoupgrade )
+
+ if ((SecureServ.updateuname[0] != 0) && (SecureServ.updatepw[0] != 0)) {
+ AutoUpdate();
AddTimer( TIMER_TYPE_INTERVAL, AutoUpdate, "AutoUpdate", SecureServ.autoupgradetime );
- /* here, we run though the channel lists, as when we were booting, we were not checking. */
+ } else if (SecureServ.autoupgrade == 1) {
+ irc_chanalert (ss_bot, "No valid Username/Password configured for SecureServ Dat File Update");
+ }
+ LoadMonChans();
GetChannelList( ScanChannel, NULL );
return NS_SUCCESS;
}
Modified: branches/3.0/SecureServ.h
==============================================================================
--- branches/3.0/SecureServ.h (original)
+++ branches/3.0/SecureServ.h Sat Jun 11 14:12:47 2005
@@ -137,7 +137,6 @@
int ss_cmd_set_updateinfo(CmdParams *cmdparams, SET_REASON reason);
int ss_cmd_set_autoupdate_cb (CmdParams *cmdparams, SET_REASON reason);
int ss_cmd_set_autoupdatetime_cb (CmdParams *cmdparams, SET_REASON reason);
-void GotHTTPAddress(void *data, adns_answer *a);
int AutoUpdate(void);
/* OnJoin.c */
Modified: branches/3.0/scan.c
==============================================================================
--- branches/3.0/scan.c (original)
+++ branches/3.0/scan.c Sat Jun 11 14:12:47 2005
@@ -418,10 +418,10 @@
int i;
/* send an update to secure.irc-chat.net */
- if ((SecureServ.sendtosock > 0) && (SecureServ.report == 1)) {
+ if (SecureServ.report == 1) {
ircsnprintf(buf2, 3, "%c%c", SecureServ.updateuname[0], SecureServ.updateuname[1]);
ircsnprintf(buf, 1400, "%s\n%s\n%s\n%s\n%s\n%d\n", SecureServ.updateuname, crypt(SecureServ.updatepw, buf2), ve->name, u->hostip, MODULE_VERSION, SecureServ.datfileversion);
- i = sendto(SecureServ.sendtosock, buf, strlen(buf), 0, (struct sockaddr *) &SecureServ.sendtohost, sizeof(SecureServ.sendtohost));
+ sendtoMQ(UPDATE_SSREPORT, buf, strlen(buf));
}
#endif
}
Modified: branches/3.0/update.c
==============================================================================
--- branches/3.0/update.c (original)
+++ branches/3.0/update.c Sat Jun 11 14:12:47 2005
@@ -154,38 +154,6 @@
}
}
-void GotHTTPAddress(void *data, adns_answer *a)
-{
- char *url;
- int i, len, ri;
-
- SET_SEGV_LOCATION();
- adns_rr_info(a->type, 0, 0, &len, 0, 0);
- for(i = 0; i < a->nrrs; i++) {
- ri = adns_rr_info(a->type, 0, 0, 0, a->rrs.bytes +i*len, &url);
- if (!ri) {
- /* ok, we got a valid answer, lets maybe kick of the update check.*/
- SecureServ.sendtohost.sin_addr.s_addr = inet_addr(url);
- SecureServ.sendtohost.sin_port = htons(2334);
- SecureServ.sendtohost.sin_family = AF_INET;
- SecureServ.sendtosock = socket(AF_INET, SOCK_DGRAM, 0);
- strlcpy(SecureServ.updateurl, url, SS_BUF_SIZE);
- nlog (LOG_NORMAL, "Got DNS for Update Server: %s", url);
- if ((SecureServ.updateuname[0] != 0) && SecureServ.updatepw[0] != 0) {
- AutoUpdate();
- } else {
- if (SecureServ.autoupgrade == 1) irc_chanalert (ss_bot, "No valid Username/Password configured for update checking. Aborting update check");
- }
- } else {
- irc_chanalert (ss_bot, "DNS error Checking for updates: %s", adns_strerror(ri));
- }
- ns_free (url);
- }
- if (a->nrrs < 1) {
- irc_chanalert (ss_bot, "DNS Error checking for updates");
- }
-}
-
int AutoUpdate(void)
{
SET_SEGV_LOCATION();
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.