ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/src/services.C
(Generate patch)

Comparing ermyth/src/services.C (file contents):
Revision 1.6 by pippijn, Tue Aug 28 22:18:31 2007 UTC vs.
Revision 1.7 by pippijn, Thu Aug 30 19:56:26 2007 UTC

3 * Rights to this code are documented in doc/pod/license.pod. 3 * Rights to this code are documented in doc/pod/license.pod.
4 * 4 *
5 * Copyright © 2005-2007 Atheme Project (http://www.atheme.org) 5 * Copyright © 2005-2007 Atheme Project (http://www.atheme.org)
6 */ 6 */
7 7
8static char const rcsid[] = "$Id: services.C,v 1.6 2007/08/28 22:18:31 pippijn Exp $"; 8static char const rcsid[] = "$Id: services.C,v 1.7 2007/08/30 19:56:26 pippijn Exp $";
9 9
10#include <boost/foreach.hpp> 10#include <boost/foreach.hpp>
11 11
12#include "atheme.h" 12#include "atheme.h"
13#include <account/myuser.h> 13#include <account/myuser.h>
90 channel_t *c; 90 channel_t *c;
91 user_t *u; 91 user_t *u;
92 chanuser_t *cu; 92 chanuser_t *cu;
93 bool isnew = false; 93 bool isnew = false;
94 mychan_t *mc; 94 mychan_t *mc;
95 metadata *md; 95 metadata::item *md;
96 time_t ts; 96 time_t ts;
97 97
98 u = user_find_named (nick); 98 u = user_find_named (nick);
99 if (!u) 99 if (!u)
100 return; 100 return;
101 c = channel_find (chan); 101 c = channel_find (chan);
102 if (c == NULL) 102 if (c == NULL)
103 { 103 {
104 mc = mychan_find (chan); 104 mc = mychan_t::find (chan);
105 if (chansvs.changets && mc != NULL) 105 if (chansvs.changets && mc != NULL)
106 { 106 {
107 /* Use the previous TS if known, registration 107 /* Use the previous TS if known, registration
108 * time otherwise, but never ever create a channel 108 * time otherwise, but never ever create a channel
109 * with TS 0 -- jilles */ 109 * with TS 0 -- jilles */
186 service_t *svs; 186 service_t *svs;
187 mychan_t *mc; 187 mychan_t *mc;
188 188
189 if (name == NULL) 189 if (name == NULL)
190 return; 190 return;
191 mc = mychan_find (name); 191 mc = mychan_t::find (name);
192 foreach (service_pair &sp, services) 192 foreach (service_pair &sp, services)
193 { 193 {
194 svs = sp.second; 194 svs = sp.second;
195 if (svs == chansvs.me && mc != NULL && config_options.join_chans) 195 if (svs == chansvs.me && mc != NULL && config_options.join_chans)
196 continue; 196 continue;
446 } 446 }
447 } 447 }
448} 448}
449 449
450void 450void
451command_fail (sourceinfo_t *si, faultcode_t code, char const * const fmt, ...) 451command_fail (sourceinfo_t *si, fault::code code, char const * const fmt, ...)
452{ 452{
453 va_list args; 453 va_list args;
454 char buf[BUFSIZE]; 454 char buf[BUFSIZE];
455 455
456 va_start (args, fmt); 456 va_start (args, fmt);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines