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

Comparing ermyth/src/ptasks.C (file contents):
Revision 1.8 by pippijn, Wed Sep 5 11:23:15 2007 UTC vs.
Revision 1.9 by pippijn, Sun Sep 9 20:05:52 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: ptasks.C,v 1.8 2007/09/05 11:23:15 pippijn Exp $"; 8static char const rcsid[] = "$Id: ptasks.C,v 1.9 2007/09/09 20:05:52 pippijn Exp $";
9 9
10#include "atheme.h" 10#include "atheme.h"
11#include "servers.h"
11#include <account/myuser.h> 12#include <account/myuser.h>
12#include <account/mynick.h> 13#include <account/mynick.h>
13#include <account/kline.h> 14#include <account/kline.h>
14#include <account/svsignore.h> 15#include <account/svsignore.h>
15#include <common/random.h> 16#include <common/random.h>
70void 71void
71handle_stats (user_t *u, char req) 72handle_stats (user_t *u, char req)
72{ 73{
73 kline_t *k; 74 kline_t *k;
74 node_t *n; 75 node_t *n;
75 kline_vector::iterator klit = klnlist.begin (); 76 kline_t::list_type::iterator klit = kline_t::list.begin ();
76 kline_vector::iterator klet = klnlist.end (); 77 kline_t::list_type::iterator klet = kline_t::list.end ();
77 uplink_t *uplink; 78 uplink_t *uplink;
78 soper_t *soper; 79 soper_t *soper;
79 int i, j; 80 int i, j;
80 char fl[10]; 81 char fl[10];
81 82
716 if (u->offenses == 2) 717 if (u->offenses == 2)
717 { 718 {
718 kline_t *k; 719 kline_t *k;
719 720
720 /* kline them the third time */ 721 /* kline them the third time */
721 k = kline_add ("*", u->host, "ten minute ban: flooding services", 600); 722 k = kline_t::create ("*", u->host, "ten minute ban: flooding services", 600);
722 k->setby = sstrdup (chansvs.nick); 723 k->setby = sstrdup (chansvs.nick);
723 724
724 snoop ("FLOOD:KLINE: \2%s\2", u->nick); 725 snoop ("FLOOD:KLINE: \2%s\2", u->nick);
725 726
726 return 1; 727 return 1;
736{ 737{
737 mynick_t *mn; 738 mynick_t *mn;
738 739
739 if (nicksvs.me == NULL || nicksvs.no_nick_ownership || u->myuser == NULL || u->myuser->flags & MU_WAITAUTH) 740 if (nicksvs.me == NULL || nicksvs.no_nick_ownership || u->myuser == NULL || u->myuser->flags & MU_WAITAUTH)
740 return false; 741 return false;
741 mn = mynick_find (u->nick); 742 mn = mynick_t::find (u->nick);
742 return mn != NULL && mn->owner == u->myuser; 743 return mn != NULL && mn->owner == u->myuser;
743} 744}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines