src/users.c File Reference

#include "main.h"
#include "users.h"
#include "chan.h"
#include "modules.h"
#include "tandem.h"
#include <netinet/in.h>
#include <arpa/inet.h>
Include dependency graph for users.c:

Go to the source code of this file.

Functions

 char ((char *)(global[113]))[121]
struct chanset_t *(*) struct (global[93]))
 char ((char *) global[123])[]
 char ((char *) global[118])[121]
int(*) int (global[102]))
 int ((int(*)(char *)) global[141])(char *uhost)
int equals_ignore (char *uhost)
 int ((int(*)(char *)) global[142])(char *ign)
 void ((void(*)(char *, char *, char *, time_t)) global[140])(char *ign
 int ((int(*)(char *, struct userrec **)) global[54])(char *file

Variables

struct dcc_t *struct global [92]
struct userrec *struct *(* struct )(global[95]))
int int(* int )(global[107])) = 10
Tcl_Interp *(* Tcl_Interp )(global[128]))
char * from
char char * mnote

Function Documentation

char ( (char *)  global[118]  ) 
char ( (char *)  global[123]  ) 
char ( (char *)(global[113])   ) 
int equals_ignore ( char *  uhost  ) 

Definition at line 66 of file users.c.

References igrec::flags, global_ign, igrec::igmask, IGREC_PERM, igrec::next, and rfc_casecmp.

00067 {
00068   struct igrec *u = global_ign;
00069 
00070   for (; u; u = u->next)
00071     if (!rfc_casecmp(u->igmask, uhost)) {
00072       if (u->flags & IGREC_PERM)
00073         return 2;
00074       else
00075         return 1;
00076     }
00077   return 0;
00078 }

int ( (int(*)(char *, struct userrec **))  global[54]  ) 
Type Constraints
int ( (int(*)(char *))  global[142]  ) 

Definition at line 80 of file users.c.

References global_ign, igrec::next, nfree, noshare, NULL, rfc_casecmp, shareout, str_escape, and strncpyz.

00081 {
00082   int i, j;
00083   struct igrec **u;
00084   struct igrec *t;
00085   char temp[256];
00086 
00087   i = 0;
00088   if (!strchr(ign, '!') && (j = atoi(ign))) {
00089     for (u = &global_ign, j--; *u && j; u = &((*u)->next), j--);
00090     if (*u) {
00091       strncpyz(temp, (*u)->igmask, sizeof temp);
00092       i = 1;
00093     }
00094   } else {
00095     /* find the matching host, if there is one */
00096     for (u = &global_ign; *u && !i; u = &((*u)->next))
00097       if (!rfc_casecmp(ign, (*u)->igmask)) {
00098         strncpyz(temp, ign, sizeof temp);
00099         i = 1;
00100         break;
00101       }
00102   }
00103   if (i) {
00104     if (!noshare) {
00105       char *mask = str_escape(temp, ':', '\\');
00106 
00107       if (mask) {
00108         shareout(NULL, "-i %s\n", mask);
00109         nfree(mask);
00110       }
00111     }
00112     nfree((*u)->igmask);
00113     if ((*u)->msg)
00114       nfree((*u)->msg);
00115     if ((*u)->user)
00116       nfree((*u)->user);
00117     t = *u;
00118     *u = (*u)->next;
00119     nfree(t);
00120   }
00121   return i;
00122 }

int ( (int(*)(char *))  global[141]  ) 

Definition at line 56 of file users.c.

References global_ign, igrec::igmask, match_useraddr, and igrec::next.

00057 {
00058   struct igrec *ir;
00059 
00060   for (ir = global_ign; ir; ir = ir->next)
00061     if (match_useraddr(ir->igmask, uhost))
00062       return 1;
00063   return 0;
00064 }

int(*) int ( global  [102]  ) 
struct chanset_t*(*) struct ( global  [93]  )  [read]
void ( (void(*)(char *, char *, char *, time_t))  global[140]  ) 

Variable Documentation

char* from
time_t time_t global[129] [read]

Definition at line 45 of file users.c.

int(* int)(global[102])) ( global  [107]  )  = 10 [read]

Definition at line 39 of file modules.h.

char char* mnote

Definition at line 124 of file users.c.

struct chanset_t*(* struct)(global[93])) ( global  [95]  )  [read]
Tcl_Interp*(* Tcl_Interp)(global[128]))

Generated on 7 Sep 2016 for Eggdrop by  doxygen 1.6.1