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 3055 by michael, Wed Feb 26 18:38:06 2014 UTC vs.
ircd-hybrid/branches/8.2.x/src/ircd.c (file contents), Revision 3725 by michael, Sat May 31 16:29:38 2014 UTC

# Line 25 | Line 25
25   */
26  
27   #include "stdinc.h"
28 < #include "s_user.h"
28 > #include "user.h"
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"
43 > #include "res.h"
44   #include "restart.h"
45   #include "rng_mt.h"
46 < #include "s_auth.h"
46 > #include "auth.h"
47   #include "s_bsd.h"
48   #include "log.h"
49 < #include "s_misc.h"
53 < #include "s_serv.h"      /* try_connections */
49 > #include "server.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 177 | 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)
# Line 198 | 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 218 | 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 <      {
222 <        struct Client *client_p = ptr->data;
223 <        assert(client_p->localClient->list_task);
224 <        safe_list_channels(client_p, client_p->localClient->list_task, 0);
225 <      }
217 >        safe_list_channels(ptr->data, 0);
218      }
219  
220      /* Run pending events, then get the number of seconds to the next
# Line 241 | 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 302 | Line 295 | initialize_server_capabs(void)
295    add_capability("TS6", CAP_TS6, 0);
296    add_capability("CLUSTER", CAP_CLUSTER, 1);
297    add_capability("SVS", CAP_SVS, 1);
298 < #ifdef HALFOPS
298 >  add_capability("CHW", CAP_CHW, 1);
299    add_capability("HOPS", CAP_HOPS, 1);
307 #endif
300   }
301  
302   /* write_pidfile()
# Line 463 | Line 455 | main(int argc, char *argv[])
455    /* Check to see if the user is running us as root, which is a nono */
456    if (geteuid() == 0)
457    {
458 <    fprintf(stderr, "Don't run ircd as root!!!\n");
458 >    fprintf(stderr, "ERROR: This server won't run as root/superuser\n");
459      return -1;
460    }
461  
# Line 479 | Line 471 | main(int argc, char *argv[])
471    me.localClient = &meLocalUser;
472    dlinkAdd(&me, &me.node, &global_client_list);  /* Pointer to beginning
473                                                     of Client list */
482  /* Initialise the channel capability usage counts... */
483  init_chcap_usage_counts();
484
474    ConfigFileEntry.dpath      = DPATH;
475 +  ConfigFileEntry.spath      = SPATH;
476 +  ConfigFileEntry.mpath      = MPATH;
477    ConfigFileEntry.configfile = CPATH;    /* Server configuration file */
478    ConfigFileEntry.klinefile  = KPATH;    /* Server kline file         */
479    ConfigFileEntry.glinefile  = GPATH;    /* Server gline file         */

Diff Legend

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