ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/ircd.c
(Generate patch)

Comparing ircd-hybrid/trunk/src/ircd.c (file contents):
Revision 2978 by michael, Fri Jan 31 19:09:37 2014 UTC vs.
Revision 3321 by michael, Tue Apr 15 16:02:56 2014 UTC

# Line 29 | Line 29
29   #include "list.h"
30   #include "ircd.h"
31   #include "channel.h"
32 #include "channel_mode.h"
32   #include "client.h"
33   #include "event.h"
34   #include "fdlist.h"
35   #include "hash.h"
36   #include "irc_string.h"
37   #include "ircd_signal.h"
38 < #include "s_gline.h"
38 > #include "gline.h"
39   #include "motd.h"
40   #include "conf.h"
41   #include "hostmask.h"
43 #include "numeric.h"
44 #include "packet.h"
42   #include "parse.h"
43   #include "irc_res.h"
44   #include "restart.h"
# Line 49 | Line 46
46   #include "s_auth.h"
47   #include "s_bsd.h"
48   #include "log.h"
52 #include "s_misc.h"
49   #include "s_serv.h"      /* try_connections */
50   #include "send.h"
51   #include "whowas.h"
52   #include "modules.h"
53   #include "memory.h"
54   #include "mempool.h"
59 #include "hook.h"
55   #include "ircd_getopt.h"
56   #include "supported.h"
57   #include "watch.h"
# Line 140 | Line 135 | make_daemon(void)
135  
136   static int printVersion = 0;
137  
138 < static struct lgetopt myopts[] = {
138 > static struct lgetopt myopts[] =
139 > {
140    {"configfile", &ConfigFileEntry.configfile,
141     STRING, "File to use for ircd.conf"},
142    {"glinefile",  &ConfigFileEntry.glinefile,
# Line 168 | Line 164 | static struct lgetopt myopts[] = {
164   void
165   set_time(void)
166   {
171  static char to_send[IRCD_BUFSIZE];
167    struct timeval newtime = { .tv_sec = 0, .tv_usec = 0 };
168  
169    if (gettimeofday(&newtime, NULL) == -1)
# Line 178 | Line 173 | set_time(void)
173      sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
174                           "Clock Failure (%s), TS can be corrupted",
175                           strerror(errno));
176 <    restart("Clock Failure");
176 >    server_die("Clock Failure", 1);
177    }
178  
179    if (newtime.tv_sec < CurrentTime)
180    {
181 <    snprintf(to_send, sizeof(to_send),
182 <             "System clock is running backwards - (%lu < %lu)",
183 <             (unsigned long)newtime.tv_sec, (unsigned long)CurrentTime);
184 <    report_error(L_ALL, to_send, me.name, 0);
181 >    ilog(LOG_TYPE_IRCD, "System clock is running backwards - (%lu < %lu)",
182 >         (unsigned long)newtime.tv_sec, (unsigned long)CurrentTime);
183 >    sendto_realops_flags(UMODE_DEBUG, L_ALL, SEND_NOTICE,
184 >                         "System clock is running backwards - (%lu < %lu)",
185 >                         (unsigned long)newtime.tv_sec,
186 >                         (unsigned long)CurrentTime);
187      set_back_events(CurrentTime - newtime.tv_sec);
188    }
189  
# Line 197 | Line 194 | set_time(void)
194   static void
195   io_loop(void)
196   {
197 <  while (1 == 1)
197 >  while (1)
198    {
199      /*
200       * Maybe we want a flags word?
# Line 217 | Line 214 | io_loop(void)
214      {
215        dlink_node *ptr = NULL, *ptr_next = NULL;
216        DLINK_FOREACH_SAFE(ptr, ptr_next, listing_client_list.head)
217 <      {
221 <        struct Client *client_p = ptr->data;
222 <        assert(client_p->localClient->list_task);
223 <        safe_list_channels(client_p, client_p->localClient->list_task, 0);
224 <      }
217 >        safe_list_channels(ptr->data, 0);
218      }
219  
220      /* Run pending events, then get the number of seconds to the next
# Line 240 | Line 233 | io_loop(void)
233        rehash(1);
234        dorehash = 0;
235      }
236 +
237      if (doremotd)
238      {
239        motd_recache();
240        sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
241 <                           "Got signal SIGUSR1, reloading motd files");
241 >                           "Got signal SIGUSR1, reloading motd file(s)");
242        doremotd = 0;
243      }
244    }
# Line 300 | Line 294 | initialize_server_capabs(void)
294    add_capability("EOB", CAP_EOB, 1);
295    add_capability("TS6", CAP_TS6, 0);
296    add_capability("CLUSTER", CAP_CLUSTER, 1);
303 //  add_capability("FAKEHOST", CAP_FAKEHOST, 1);
297    add_capability("SVS", CAP_SVS, 1);
298 +  add_capability("CHW", CAP_CHW, 1);
299   #ifdef HALFOPS
300    add_capability("HOPS", CAP_HOPS, 1);
301   #endif
# Line 479 | Line 473 | main(int argc, char *argv[])
473    me.localClient = &meLocalUser;
474    dlinkAdd(&me, &me.node, &global_client_list);  /* Pointer to beginning
475                                                     of Client list */
482  /* Initialise the channel capability usage counts... */
483  init_chcap_usage_counts();
484
476    ConfigFileEntry.dpath      = DPATH;
477 +  ConfigFileEntry.spath      = SPATH;
478 +  ConfigFileEntry.mpath      = MPATH;
479    ConfigFileEntry.configfile = CPATH;    /* Server configuration file */
480    ConfigFileEntry.klinefile  = KPATH;    /* Server kline file         */
481    ConfigFileEntry.glinefile  = GPATH;    /* Server gline file         */

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)