From 4705381691cba08c7d3e6ef982e2335bb7672960 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 2 Apr 2005 19:28:32 +0000 Subject: Added DNS class to documentation git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@952 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/users_8cpp-source.html | 235 +++++++++++++++++---------------- 1 file changed, 118 insertions(+), 117 deletions(-) (limited to 'docs/module-doc/users_8cpp-source.html') diff --git a/docs/module-doc/users_8cpp-source.html b/docs/module-doc/users_8cpp-source.html index 8fdd3a919..9fdea3e20 100644 --- a/docs/module-doc/users_8cpp-source.html +++ b/docs/module-doc/users_8cpp-source.html @@ -48,127 +48,128 @@ 00041 fd = lastping = signon = idle_lastmsg = nping = registered = 0; 00042 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; 00043 haspassed = false; -00044 strcpy(result,""); -00045 for (int i = 0; i < MAXCHANS; i++) -00046 { -00047 this->chans[i].channel = NULL; -00048 this->chans[i].uc_modes = 0; -00049 } -00050 invites.clear(); -00051 } -00052 +00044 dns_done = false; +00045 strcpy(result,""); +00046 for (int i = 0; i < MAXCHANS; i++) +00047 { +00048 this->chans[i].channel = NULL; +00049 this->chans[i].uc_modes = 0; +00050 } +00051 invites.clear(); +00052 } 00053 -00054 -00055 char* userrec::GetFullHost() -00056 { -00057 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost); -00058 return result; -00059 } -00060 +00054 +00055 +00056 char* userrec::GetFullHost() +00057 { +00058 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost); +00059 return result; +00060 } 00061 -00062 char* userrec::GetFullRealHost() -00063 { -00064 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host); -00065 return result; -00066 } -00067 -00068 bool userrec::IsInvited(char* channel) -00069 { -00070 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -00071 { -00072 if (i->channel) { -00073 if (!strcasecmp(i->channel,channel)) -00074 { -00075 return true; -00076 } -00077 } -00078 } -00079 return false; -00080 } -00081 -00082 void userrec::InviteTo(char* channel) -00083 { -00084 Invited i; -00085 strlcpy(i.channel,channel,CHANMAX); -00086 invites.push_back(i); -00087 } -00088 -00089 void userrec::RemoveInvite(char* channel) -00090 { -00091 log(DEBUG,"Removing invites"); -00092 if (channel) -00093 { -00094 if (invites.size()) -00095 { -00096 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -00097 { -00098 if (i->channel) -00099 { -00100 if (!strcasecmp(i->channel,channel)) -00101 { -00102 invites.erase(i); -00103 return; -00104 } -00105 } -00106 } -00107 } -00108 } -00109 } -00110 -00111 bool userrec::HasPermission(char* command) -00112 { -00113 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; -00114 char* myclass; -00115 char* mycmd; -00116 char* savept; -00117 char* savept2; -00118 -00119 // are they even an oper at all? -00120 if (strchr(this->modes,'o')) -00121 { -00122 log(DEBUG,"*** HasPermission: %s is an oper",this->nick); -00123 for (int j =0; j < ConfValueEnum("type",&config_f); j++) -00124 { -00125 ConfValue("type","name",j,TypeName,&config_f); -00126 if (!strcmp(TypeName,this->oper)) -00127 { -00128 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper); -00129 ConfValue("type","classes",j,Classes,&config_f); -00130 char* myclass = strtok_r(Classes," ",&savept); -00131 while (myclass) -00132 { -00133 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass); -00134 for (int k =0; k < ConfValueEnum("class",&config_f); k++) -00135 { -00136 ConfValue("class","name",k,ClassName,&config_f); -00137 if (!strcmp(ClassName,myclass)) -00138 { -00139 ConfValue("class","commands",k,CommandList,&config_f); -00140 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList); -00141 +00062 +00063 char* userrec::GetFullRealHost() +00064 { +00065 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host); +00066 return result; +00067 } +00068 +00069 bool userrec::IsInvited(char* channel) +00070 { +00071 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00072 { +00073 if (i->channel) { +00074 if (!strcasecmp(i->channel,channel)) +00075 { +00076 return true; +00077 } +00078 } +00079 } +00080 return false; +00081 } +00082 +00083 void userrec::InviteTo(char* channel) +00084 { +00085 Invited i; +00086 strlcpy(i.channel,channel,CHANMAX); +00087 invites.push_back(i); +00088 } +00089 +00090 void userrec::RemoveInvite(char* channel) +00091 { +00092 log(DEBUG,"Removing invites"); +00093 if (channel) +00094 { +00095 if (invites.size()) +00096 { +00097 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00098 { +00099 if (i->channel) +00100 { +00101 if (!strcasecmp(i->channel,channel)) +00102 { +00103 invites.erase(i); +00104 return; +00105 } +00106 } +00107 } +00108 } +00109 } +00110 } +00111 +00112 bool userrec::HasPermission(char* command) +00113 { +00114 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +00115 char* myclass; +00116 char* mycmd; +00117 char* savept; +00118 char* savept2; +00119 +00120 // are they even an oper at all? +00121 if (strchr(this->modes,'o')) +00122 { +00123 log(DEBUG,"*** HasPermission: %s is an oper",this->nick); +00124 for (int j =0; j < ConfValueEnum("type",&config_f); j++) +00125 { +00126 ConfValue("type","name",j,TypeName,&config_f); +00127 if (!strcmp(TypeName,this->oper)) +00128 { +00129 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper); +00130 ConfValue("type","classes",j,Classes,&config_f); +00131 char* myclass = strtok_r(Classes," ",&savept); +00132 while (myclass) +00133 { +00134 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass); +00135 for (int k =0; k < ConfValueEnum("class",&config_f); k++) +00136 { +00137 ConfValue("class","name",k,ClassName,&config_f); +00138 if (!strcmp(ClassName,myclass)) +00139 { +00140 ConfValue("class","commands",k,CommandList,&config_f); +00141 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList); 00142 -00143 mycmd = strtok_r(CommandList," ",&savept2); -00144 while (mycmd) -00145 { -00146 if (!strcasecmp(mycmd,command)) -00147 { -00148 log(DEBUG,"*** Command %s found, returning true",command); -00149 return true; -00150 } -00151 mycmd = strtok_r(NULL," ",&savept2); -00152 } -00153 } -00154 } -00155 myclass = strtok_r(NULL," ",&savept); -00156 } -00157 } -00158 } -00159 } -00160 return false; -00161 } -00162 +00143 +00144 mycmd = strtok_r(CommandList," ",&savept2); +00145 while (mycmd) +00146 { +00147 if (!strcasecmp(mycmd,command)) +00148 { +00149 log(DEBUG,"*** Command %s found, returning true",command); +00150 return true; +00151 } +00152 mycmd = strtok_r(NULL," ",&savept2); +00153 } +00154 } +00155 } +00156 myclass = strtok_r(NULL," ",&savept); +00157 } +00158 } +00159 } +00160 } +00161 return false; +00162 } 00163 -
Generated on Mon Mar 28 21:09:26 2005 for InspIRCd by +00164 +
Generated on Sat Apr 2 19:27:01 2005 for InspIRCd by doxygen 1.3.3
-- cgit v1.2.3