ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/branches/1.0.x/src/config.c
(Generate patch)

Comparing hopm/trunk/src/config.c (file contents):
Revision 5052 by michael, Mon Dec 22 11:56:03 2014 UTC vs.
Revision 5109 by michael, Wed Dec 24 13:26:29 2014 UTC

# Line 90 | Line 90 | void config_init()
90   {
91     /* Init IRC block */
92     IRCItem = MyMalloc(sizeof *IRCItem);
93   memset(IRCItem, 0, sizeof *IRCItem);
93     IRCItem->channels = list_create();
94     IRCItem->performs = list_create();
95  
96     /* Init Options block */
97     OptionsItem = MyMalloc(sizeof *OptionsItem);
99   memset(OptionsItem, 0, sizeof *OptionsItem);
98  
99     /* Init OPM block */
100     OpmItem = MyMalloc(sizeof *OpmItem);
103   memset(OpmItem, 0, sizeof *OpmItem);
101     OpmItem->blacklists = list_create();
102  
103     /* Init list of User blocks */
# Line 120 | Line 117 | void config_setup()
117   {
118  
119     /* Setup IRC Block Defaults */
120 <   IRCItem->away = DupString("I'm a bot, don't message me");
121 <   IRCItem->mode = DupString("+cs");
122 <   IRCItem->nick = DupString("bopm");
123 <   IRCItem->nickserv = DupString("");
127 <   IRCItem->password = DupString("");
120 >   IRCItem->mode = xstrdup("+cs");
121 >   IRCItem->nick = xstrdup("hopm");
122 >   IRCItem->nickserv = xstrdup("");
123 >   IRCItem->password = xstrdup("");
124     IRCItem->port = 6667;
125 <   IRCItem->oper = DupString("undefined");
126 <   IRCItem->username = DupString("bopm");
127 <   IRCItem->realname = DupString("Blitzed Open Proxy Monitor");
128 <   IRCItem->server = DupString("myserver.blitzed.org");
129 <   IRCItem->vhost = DupString("");
130 <   IRCItem->connregex = DupString("\\*\\*\\* Notice -- Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*");
131 <   IRCItem->kline = DupString("KLINE %u@%h :Open Proxy found on your host. Please visit www.blitzed.org/proxy?ip=%i for more information.");
125 >   IRCItem->oper = xstrdup("undefined");
126 >   IRCItem->username = xstrdup("hopm");
127 >   IRCItem->realname = xstrdup("Hybrid Open Proxy Monitor");
128 >   IRCItem->server = xstrdup("irc.example.org");
129 >   IRCItem->vhost = xstrdup("");
130 >   IRCItem->connregex = xstrdup("\\*\\*\\* Notice -- Client connecting: ([^ ]+) \\(([^@]+)@([^\\)]+)\\) \\[([0-9\\.]+)\\].*");
131 >   IRCItem->kline = xstrdup("KLINE %u@%h :Open Proxy found on your host.");
132  
133  
134     /* Setup options block defaults */
135     OptionsItem->negcache = 0;   /* 0 disabled negcache */
136 <   OptionsItem->pidfile = DupString("bopm.pid");
136 >   OptionsItem->pidfile = xstrdup("hopm.pid");
137     OptionsItem->dns_fdlimit = 50;
138     OptionsItem->scanlog = NULL;
139  
140     /* Setup OPM block defaults */
141 <   OpmItem->sendmail = DupString("/usr/sbin/sendmail");
142 <   OpmItem->dnsbl_from = DupString("");
143 <   OpmItem->dnsbl_to = DupString("");
141 >   OpmItem->sendmail = xstrdup("/usr/sbin/sendmail");
142 >   OpmItem->dnsbl_from = xstrdup("");
143 >   OpmItem->dnsbl_to = xstrdup("");
144   }
145  
146   void yyerror(const char *str)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines