/[LeafOK_CVS]/innwebd/BBS_fun.cpp
ViewVC logotype

Diff of /innwebd/BBS_fun.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Fri Jun 25 07:01:51 2004 UTC Revision 1.2 by sysadm, Wed Jun 30 12:50:18 2004 UTC
# Line 85  CString BBS_fun::LML(const CString& sour Line 85  CString BBS_fun::LML(const CString& sour
85                                  {                                  {
86                                          tag_result="]";                                          tag_result="]";
87                                  }                                  }
88                                    if (tag_str == "image")
89                                    {
90                                            tag_result=tag_arg;
91                                    }
92                                  if (tag_str == "bwf")                                  if (tag_str == "bwf")
93                                  {                                  {
94                                          tag_result="****";                                          tag_result="****";
# Line 100  CString BBS_fun::LML(const CString& sour Line 104  CString BBS_fun::LML(const CString& sour
104                                  }                                  }
105                          }                          }
106                          if (p_start-p_current>0)                          if (p_start-p_current>0)
107                                  result_str = result_str + source_str.Mid(p_current,p_start-p_current) + tag_result;                                  result_str = result_str + source_str.Mid(p_current,p_start-p_current);
108                          else                          result_str += tag_result;
                                 result_str += tag_result;  
109                          p_current=p_end+1;                          p_current=p_end+1;
110                  }                  }
111                  else                  else
# Line 118  CString BBS_fun::LML(const CString& sour Line 121  CString BBS_fun::LML(const CString& sour
121          return result_str;          return result_str;
122  }  }
123    
124  CString BBS_fun::ip_mask(const CString& ip)  CString BBS_fun::ip_mask(const CString& ip, int level)
125  {  {
126          int dot_pos;          int dot_pos;
127    
128          dot_pos=ip.Find('.');          switch(level)
129          if (dot_pos == -1)          {
130                  return CString();                  case 0:
131                            return ip;
132          dot_pos=ip.Find('.',dot_pos+1);                  case 1:
133          if (dot_pos == -1)                          dot_pos=ip.Find('.');
134                  return CString();                          if (dot_pos == -1)
135                                    return CString();
136          return (ip.Left(dot_pos+1) + "*.*");                          return (ip.Left(dot_pos+1) + "*");
137                    case 2:
138                            dot_pos=ip.Find('.');
139                            if (dot_pos == -1)
140                                    return CString();
141                            dot_pos=ip.Find('.',dot_pos+1);
142                            if (dot_pos == -1)
143                                    return CString();
144                            return (ip.Left(dot_pos+1) + "*.*");
145            }
146            return ip;
147  }  }
148    
149  CString BBS_fun::FB2TXT(CString source_str)  CString BBS_fun::FB2TXT(CString source_str)


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1